Topic: Google/Samsung Nexus S: libnfc-nxp is not libnfc

Hi, those that have pulled the new Android 2.3 "Gingerbread" source code released today: It seems that libnfc is now officially part of Android, see platform/external/libnfc-nxp.git

The "-nxp" suffix suggests it's catering to NXP's PN544 found inside the Nexus S, currently the only NFC equipped Android device.

Now, the only NFC capability exposed in the Android Java API for now is simple tag reading -- now I am wondering whether P2P functionality would be accessible to apps via additional native and/or Java code, and whether that would require rooting the Nexus S or not. (The last commit says "disable NFC P2P functionality", uh oh seems like root will be required to undo that.)

The situation seems similar to Bluetooth where limited Bluetooth functionality is available in the official Java API but most of what the BlueZ stack offers can be accessed via additional Java code like Bluecove.

If anyone managed to get their mittens on a Nexus S and/or can judge this by looking at the code, your feedback appreciated. Access to NFC P2P functionality decides whether I will buy a Nexus S or not.

Re: Google/Samsung Nexus S: libnfc-nxp is not libnfc

I may have been too quick -- the upon closer inspection the code doesn't look like libnfc (from that is) at all. So it's a different libnfc, one published by NXP.

So the question would be whether maybe's libnfc can replace theirs, both to allow P2P and generally for more open access to Android device's NFC functionality?

Re: Google/Samsung Nexus S: libnfc-nxp is not libnfc

The java bindings are in platform/packages/apps/Nfc.git, the jni/com_android_nfc_NativeNfcManager.cpp shows all relevant functions are exposed, including card emulation. The class suggest P2P is available, however the published API interface does not match up with the java source in that folder. Very little PN544 specific code shows up in the sources, suggesting NXP kept most of the relevant logic in the firmware of PN544. EEPROM settings within PN544 seem to configure SE/SWP mode and card emulation. Beyond that expect card emulation to be controlled by the secure element, which is under very tight control of Google or the NMOs.

Re: Google/Samsung Nexus S: libnfc-nxp is not libnfc

As this is not strictly libnfc-related I guess future posts should go to the Nexus S forum at XDA developers:

Seems like someone has already started a thread on NFC: