Topic: Android NPP push protocol and LLCP specification

Hello can anyone tell me if Android's NPP push protocol is according to the NFC forum LLCP specification.  According to the NPP protocol it pushes NDEF messages like:

1. Connect to LLCP socket with service name com.android.npp
2. Send the NPP Header following by NDEF Entries as defined in the Data Format section
3. Disconnect the LLCP socket

http://static.googleusercontent.com/ext … otocol.pdf


Looking at the log I found that Android sends the Connect LLCP using 0x06 0x0F as the first 2 bytes followed by the service name. So it is using PDU Type 1011 which according to NFC forum is Reserved. Also the service name is not according to the NFC forum LLCP service uri specification which should be something like urn:nfc:sn:<servicename>.

also while sending the NPP data it doesn't follow any of the LLCP forum specific messages. It just pushes NDEF messages with ist own NPP header without using any of the defined LLCP message exchange format.

So can anyone tell me how does the android NPP push protocol is implemented on top of LLCP?

Re: Android NPP push protocol and LLCP specification

Yes, NPP is on top of LLCP.

There is a demo example of NPP in libnfc-llcp project.

Romuald Conty

Re: Android NPP push protocol and LLCP specification

I wanted to know is that whether the NPP uses NFC-forum LLCP specification connection-oriented or connection-less communication. I can't find any of such message header in NPP protocol. It sends Service Name to the target NOT using LLCP CONNECT PDU. Also the exchange of NDEF message is done without using PDU Types like I or UI.
So, is it enough for any implementation with LLCP magic bytes in the ATR to be LLCP implementation?

Re: Android NPP push protocol and LLCP specification

Android is using LLCP correctly, except the service name format (which should have been "urn:nfc:xsn:android.com:npp" or another valid URI). The bytes 0x06 and 0x0FF you mention are most likely the service name parameter type (0x06) and service name length (len("com.android..npp") == 15). The PDU header octests must be somewhere before.

Re: Android NPP push protocol and LLCP specification

Thank you for the explanation.