I am working on a school project to connect the pn532 with a nfc phone. I am using the seeedstudio nfc controller and the library they have, with some code that I am adding. My questions are related to the connection and discovery stage of the protocol.
Question 1: What to respond when the initiator sends a CONNECT command to the DSAP = 1 "discovery service". Bellow I explain the results of the protocol.
Phones used to test were(gs4, note 2):
Situation 1:
- the phone sends me 05 20 06 this is a CONNECT command to SAP =1 in the receiver device, then I respond with the CC command 81 84 2 2 0 78.
- then they send me an IPDU with the URI of the application in the foreground, I keep sending command as per the llcp-snep protocol in the nfc forum and everything finish cool. *The problem is that I don't want the URI of the application in the foreground, I want the NDEF message data of that application instead.*
Situation 2:
- the phones send to the pn532 11 20 , this is a CONNECT command to SAP =4 in the receiver device, then I respond with the command CC 81 84 2 2 0 78.
After this the phone send me the NDEF data as is suppose to be.
Now my questions are:
Why some times the phone send me the CONNECT command to the SAP =1 and some times to SAP=4?
What command I have to response for the 05 20 06 ?