New: XDA launches forum for app developers. Discuss coding, tools, marketing, and more.
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
Nasu no Yoichi
Old
#1  
Junior Member - OP
Thanks Meter 0
Posts: 1
Join Date: Jul 2012
Default [Q] nfc-tools on Android?

Has anyone tried porting anything based on libnfc (libnfc.org), such as nfc-tools (code.google.com/p/nfc-tools), to Android?

I've heard of the odd person or two managing to cross-compile libnfc for Android and get it working with an external reader, but I'm more interested in getting nfcutils and mfoc to run on my Galaxy Nexus...
 
duky_duke
Old
#2  
Junior Member
Thanks Meter 0
Posts: 2
Join Date: Jul 2012
Hi,

I was looking for the same thing as you.

Indeed some people succeeded to compile libnfc on android (android 2.3 if I remember well) and they have published a little outdated tutorial.
The problem that is their porting use libusb and permits to use an external NFC reader connected via the phone USB link.

I think you are most interested in using the internal one.

On my galaxy SIII, the NFC device seems to use an I2C link (the device is /dev/pn544). So you will need to make a libnfc "driver" for your device wich link to the I2C. I you look into libnfc code, you have some code to mange serial links but it seems a little experimental.

Moreover, there is already a driver and a lib that manage your NFC device, so you'll probably have some conflicts by trying to add libnfc.

The built-in lib is libnfc-nxp wich also includes drivers, hardware abstraction and a upper level libraries (called "FRI") providing services to manage cryptography, NDEF messages and so on. This lib is completely different from the linux libnfc.

So if you want to get lib-utils working, you will probably need to compile them after developing a wrapper between libnfc functions using libnfc-nxp. (or something like this)

In my knowledge, nobody did the job yet.

I found some tries to recode mfoc utility in an android apk but nothing functional yet (and there is often no recent activity of these projects).

Sorry.