Latest information

Following several inputs on our mailing-list showing users are having difficulties to use our package with the Nfc Simulator environment, we have prepared a new file to hopefully help those who are simply trying to use NFC on a Android simulator. This new file can be found on the Downloads page.

This new file contains a VirtualBox appliance. You will need to install Oracle VirtualBox software as a prerequisite. It is also recommended that the user has some experience with this software already, before attempting to use the image we provide. Note that we only support the Windows version currently, because the Connection Center software runs on this system only. It is probably possible to use another host OS, but requires some changes in the network environment.

The VirtualBox appliance we provide contains an image of Android (built from Jelly Bean 4.2.2_r1 for this first appliance release) built from the AOSP (“vbox_x86-eng” target) with very few changes besides integration of Open NFC (the changes are listed at the end of this post for reference). It is pre-configured to connect to the Nfc Simulator running on the host system, and should not require any additional change.

Steps to use this appliance:

Install VirtualBox if you do not have it already

Install the appliance. A new Virtual Machine is created.

Download the Open NFC Core or SDK edition corresponding to the Open NFC release of the appliance.

Start the “Connection Center” software from the Open NFC Core or SDK edition.

In the “Connection” tab, enable Accept service client connections from other machines and Accept service provider connections from other machines. Restart the Connection Center software in order to enable these changes.

Start the NFC Simulator software from the Open NFC Core or SDK edition.

Now, you can start the Virtual Machine. Once boot is complete, you should see activity in the NFC Simulator.

Using adb

It is possible to use “adb” with this Virtual Machine in order to install new applications and/or get android logs, access android shell, etc.

In the network properties of the Virtual Machine, check/adapt if needed the port mapping setting of the first network connection. By default, host port 5557 is mapped to guest port 5555 (adb port).

Tell your adb instance on the host to connect to this emulator: adb connect localhost:5557

Once connected, you can use adb as usual: adb devices, …

Using the system console

It is possible to access the kernel logs and android console on this image. Both consoles are configured to use /dev/ttyS0 (serial port). The first serial port is configured in VirtualBox to redirect to a software pipe \\.\pipe\androidVM (this name can be changed in the Virtual Machine properties if needed). Using for example the PuTTY software, it is possible to connect to this software pipe (simply configure the name \\.\pipe\androidVM for the “Serial line” parameter) and get a working console.

Using Peer-to-peer or Beam

It is perfectly possible to emulate two devices. Follow this procedure in that case:

Clone your virtual machine to create a second entity

Edit the name of the serial port software pipe, and the port mapping properties in the network configuration of the new machine to avoid conflict between both machines.

Start one instance of the Connection Center; one instance of the NFC Simulator, then start your first virtual machine, and finally your second virtual machine. You should see the lights of the second reader light up in the NFC Simulator.

How this virtual machine was built

The primary code was fetched from the AOSP following standard Android procedure. Then we made the following changes:

Follow Open NFC porting guide to integrate Open NFC. In the configuration of the build, enable the Simulator and disable firmware update and UICC policy by default. Edit the connection_center_access file to use the Simulator by default.

We are happy to announce our final release of Open NFC 4.5.1 is now also available for the Android 4.2, Jelly Bean platform. If you are interested in getting this edition of Open NFC for a different Android platform, please contact us.

Please refer to the release notes of the Core Edition for the list of changes compared to previous versions.

You can find the source code for this release in the Downloads page. Please refer to the included “MAN_NFC_1212-345 Open NFC – Android Jelly Bean 4.2.1 – Porting Guide.pdf” document for information on how to integrate this release in your device.

We have completely redesigned the architecture of this porting to be far less intrusive in the Android system. As a result, our new delivery integrates more smoothly in the Android file system, it is also more maintainable and stable. Our Porting Guide document has been rewritten accordingly — if you were using the previous release and want to migrate to this new archive, we strongly encourage you to contact us.

We are releasing today this new porting based on Open NFC 4.5.0 for Ice Cream Sandwich (4.0.4_r1) and Jelly Bean (4.1.2_r1) releases. We have also released a version based on Open NFC 4.4.3 for Jelly Bean. All these files can be found as usual on the Downloads page.

This new architecture main features are:

We are using the “vanilla” Java files. As a result, the exact same set of features from Android is supported with Open NFC.

An optional package called Open NFC Extensions is available to access additional “proprietary” features such as access to a Secure Element, Card Emulation, etc.

Except as noted otherwise, this content is licensed under the terms of the Apache 2.0 License.
For details and restrictions, see the Content License.
Open NFC is a registered trademark of Inside Secure, All logos and graphics are copyrighted.