AnsweredAssumed Answered

Using PN512 with Android

Question asked by Benjamin Binder on Sep 16, 2016
Latest reply on Nov 7, 2016 by jimmychan

Hi,

 

I am actually trying to use an PNEV512 board to communicate with an android phone. Actually I can do the Selftest and receive the raw data of the Smartphone.

Now I am trying to transmit data to the phone.

Basically I am using the Configure command with:


(0x04); //SENS_RES
(0x00); //SENS_RES
(0x08); //NFCID 1 (08h ?)
(0xA1); //NFCID 1
(0xA3); //NFCID 1
(0x40); //SEL_RES
(0x01); //PollingResp
(0xFE); //PollingResp
(0xB2); //NFCID2
(0xB3); //NFCID2
(0xB4); //NFCID2
(0xB5); //NFCID2
(0xB6); //NFCID2
(0xB7); //NFCID2
(0xC0); //PAD
(0xC1); //PAD
(0xC2); //PAD
(0xC3); //PAD
(0xC4); //PAD
(0xC5); //PAD
(0xC6); //PAD
(0xC7); //PAD
(0x23); //SYS Code
(0x45); //SYS Code
(0xB8); //NFCID3

 

and the Autocoll command. After that my Tx and Rx Register are saying 212kb/s and Felica mode (is also working with active mode)

 

Now I can send the Attribute Response and it seems that this command is received by the phone, because the phone is sending a command to change the channel to 414kb/s. This works as well. But after the channel switch the Phone is not reading messages anymore. (It's the same when I stay in the 212kb/s channel).

 

This is an example what's happening:

 

25 D4 00 F2 71 35 6C F3 56 AA 8D A1 40 00 00 00 32 46 66 6D 01 01 12 02 02 07 FF 03 02 00 13 04 01 64 07 01 03

1F D5 01 08 A1 A3 B2 B3 B4 B5 B6 B7 B8 00 00 00 0E 32 46 66 6D 01 01 11 03 02 00 13 04 01 96   

//Activation seems to be transmitted because the phone sends a new command 

 

06 D4 04 00 12 03
04 D5 05 00

//Switching channel and sending RES in new channel again

06 D4 04 00 12 03

04 D5 05 00

 

06 D4 06 00 00 00
06 D5 07 00 00 00

//DEP_RES seems not to be received from the phone because it continues with a superviser PDU

 

04 D4 06 80
04 D5 07 80

 

04 D4 06 80
04 D5 07 80

 

04 D4 06 80
04 D5 07 80

//After this the phone uses again in 212kb/s

 

 

Additionally I'm using the transceive command with (nearly) no break in between . Can I use it or do I have take care of the timing by myself?

Or can anyone tell me what could also be a reason for this behaviour (Maybe it is configured wrongly)?

 

 

 

Thanks in advice,

Benjamin 

Outcomes