Topic: NDEF push protocol

Since Android now has NFC read and write capabilities (de-facto only on the Nexus S as of Feb 2011) I am looking into libnfc for the PC side of an Android-to-PC NFC data transfer.

This could e.g. be used to establish a Bluetooth connection between phone and PC and use Bluetooth to transfer further data.

The Android documentation speaks of an "NDEF push protocol" and a URI: com.android.npp that any device would have to implement that wants to converse with an Android phone.

What's this "NDEF push protocol"? The googletubes wouldn't reveal much about this.

What role does the URI play in this protocol?

In this protocol a feature that can be added to libnfc?

Thanks for clarifications.

Re: NDEF push protocol

Hello htcdude,

htcdude wrote:

I am looking into libnfc for the PC side of an Android-to-PC NFC data transfer.

Ok.

htcdude wrote:

This could e.g. be used to establish a Bluetooth connection between phone and PC and use Bluetooth to transfer further data.

Around this subject you should also be interested in "NFC-Forum Connection Handover" specification.

htcdude wrote:

What's this "NDEF push protocol"?

If I understand correctly, NDEF Push Protocol isn't yet specified by NFC-Forum but implemented in Android 2.3.3
According to "ForegroundNdefPush" example, this seems to be the way to send NDEF message in P2P mode between two Nexus S device.
http://developer.android.com/resources/ … fPush.html

I think npp (NDEF Push Protocol) is the enhancement described here:

android developpers site wrote:

The platform also provides a limited peer-to-peer communication protocol and API. Foreground Activities can use the API to register an NDEF message that will get pushed to other NFC devices when they connect.

http://developer.android.com/sdk/android-2.3.3.html

htcdude wrote:

In this protocol a feature that can be added to libnfc?

libnfc is currently a low level layer, but we hope to release something higher level in few weeks. BTW, to implement correctly a protocol its better to have the specs or we will have to reverse-engine the protocol, very time consumming.

Romuald Conty

Re: NDEF push protocol

rconty wrote:

Hello htcdude,
If I understand correctly, NDEF Push Protocol isn't yet specified by NFC-Forum but implemented in Android 2.3.3

...

BTW, to implement correctly a protocol its better to have the specs or we will have to reverse-engine the protocol, very time consumming.

That's right, it doesn't seem to be specified by the NFC forum and I don't want to reverse engineer it either. So if someone has something on this please post here, whether it will get incorporated into libnfc is another question.

Re: NDEF push protocol

Now Android 2.3.3 is out incl. source and it seems their protocol is just writing NDEF messages over an LLCP connection. LLCP is defined by the NFC Forum as a multiplexing protocol on top of ISO 18092 and allows multiple applications to communicate concurrently over 1 NFC P2P connection similar to TCP or Bluetooth L2CAP with a similar concept of port numbers.

LLCP and therefore this Android NDEF push protocol are not yet in libnfc from what I understand so a PC with libnfc is at this time still far away from being able to communicate with an Android device.

Re: NDEF push protocol

Hello,
Yep, that's right LLCP is missing in libnfc, btw if you want to implement it, your contribution will be more than welcome.

Currently there is no contributor who need LLCP and no sponsor to implement it in the libnfc, so there is no support. BTW, LLCP is a part of NFC-Forum so soon or far, LLCP will be integrated in libnfc.

If there are people interesting in coding some LLCP support, feel free to notice here, and we can maybe find a way to work together.

Bye.

Romuald Conty

Re: NDEF push protocol

Official specification here. Because of the popularity of Android I expect this to become big soon, would be nice to have LLCP just for this reason. Maybe some LLCP code can be borrowed from open-nfc.org if the licenses are compatible.

7 (edited by rconty 2011-03-07 02:49:12)

Re: NDEF push protocol

rconty wrote:

If there are people interesting in coding some LLCP support, feel free to notice here, and we can maybe find a way to work together.

I'm interested. (I'll also try to email you.)

@ektimo: Edited to prevent from spamming your mailbox.

Re: NDEF push protocol

ektimo wrote:

I'll also try to email you.

My email address @libnfc.org doesn't work correctly... I'll try to reach somebody to fix it.

Romuald Conty

Re: NDEF push protocol

I forgot, but obviously Android's NFC stack libnfc-nxp is open source too and obviously provides LLCP. Both this one and Open NFC are Apache 2.0 license which is "backwards compatible" with the GPL if I'm not mistaken so it would be interesting to see whether their LLCP code can be grafted onto libnfc, saving a lot of development effort.

Re: NDEF push protocol

htcdude wrote:

I forgot, but obviously Android's NFC stack libnfc-nxp is open source too and obviously provides LLCP. Both this one and Open NFC are Apache 2.0 license which is "backwards compatible" with the GPL

libnfc is under LGPL, not GPL but it's also "backward compatible"...

htcdude wrote:

if I'm not mistaken so it would be interesting to see whether their LLCP code can be grafted onto libnfc, saving a lot of development effort.

The main problem is not technical one, its a human time problem... That's a thing to point out where we could find help or sources code to be based on, that's another thing to do the job.
So feel free, take sources and merge it into libnfc, purpose a working patch and I'll be happy to commit it into trunk :-)

Thank you for point us the links, but talking about OpenNFC, did you see any public sources for Linux or Windows ? Inside Secure doesn't do Free/Libre softwares, they do OpenSource (understand marketing-source only). Sources should be available since more than one year on PC platform, but have you browse their website ? did you see any public version control system ?

I'm really sorry about that, but that's a fact:

February 3rd, 2010, they talk...
http://news.softpedia.com/news/Open-NFC … 3981.shtml

2010-02-05: they talk a lot...
http://www.linuxfordevices.com/c/a/News … -Open-NFC/

And there are many articles that said "soon available", but if you go on their site now (2011-03-05), you will see there is no more sources than Android ones
http://www.open-nfc.org/
The latest news is dated from 2010/06/04...
And on SF.net:
http://sourceforge.net/projects/open-nfc/
Interesting to see:

SF.net wrote:

Registered:  2010-04-21
Release Date: 2011-03-02

So now, they cry:
FEBRUARY 9, 2011
http://www.androidguys.com/2011/02/09/o … released/#
February 10th, 2011
http://www.nearfieldcommunicationsworld … ip-market/

Please understand that I'm really sorry about that, plus around one year ago I tried to get closer with the Inside Contactless team, and call them to optain the code and trying to see if libnfc and OpenNFC could do something together... I tried to convinced them to -really- open their sources, share development, create a community, etc. like all real Free/Libre softwares developers do. But they said me that libnfc wasn't at professionnal grade (which is probably true, but who know about their OpenNFC ?) and they said they don't want to share the sources without a interesting business plan in their flavour...
I was a bit disapointed to see one more company that does OpenSource softwares to make profits-only oriented business.

So, to focus on our problem, yes; you are more than welcome to contribute LLCP even the sources comes from APL licenced. And all contributors are welcome, even small and big companies if they contribute to provide a real Libre software.
So, libnfc-nxp, OpenNFC developers, welcome! :-)

As the opposite, I have to say that NXP do some -small- progress against Free/Libre softwares, even libnfc:
http://www.libnfc.org/community/topic/2 … er-manual/
Note: That's not what you could expect as the best, but that's a start... and they don't ask me a favorable business plan oO

Romuald Conty

Re: NDEF push protocol

rconty wrote:

Thank you for point us the links, but talking about OpenNFC, did you see any public sources for Linux or Windows ?

I didn't but in the special case of LLCP I'm sort of assuming the code would be "high-level" enough as not to be too closely tied to the underlying platform or hardware.

Re: NDEF push protocol

rconty wrote:

If I understand correctly, NDEF Push Protocol isn't yet specified by NFC-Forum but implemented in Android 2.3.3

It's not gonna be the NDEF Push Protocol but the NFC Forum works on releasing the Simple NDEF Exchange Protocol specification for exactly that same purpose. The NFC Forum page at http://www.nfc-forum.org/specs/spec_dashboard/ is a bit outdated w.r.t. the status of that specification, it's actually much closer to release.

/Stephen

Re: NDEF push protocol

BTW, it seems that the OpenNFC is now available for all the announced platforms. Check the site...