Using PN512 with Android

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Using PN512 with Android

1,312件の閲覧回数
benjaminbinder
Contributor I

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 

0 件の賞賛
返信
1 返信

975件の閲覧回数
jimmychan
NXP TechSupport
NXP TechSupport

Some ideas of investigation:

Is the PN512 configuration properly switched to 424kbps when receiving the PSL_REQ (after sending PSL_RES) ?

Does the first DEP exchange (related to SYMM frames) well transmitted at 424kbps (both way) ?

What is the timing between first DEP_REQ (SYMM frame send from phone) and the Attention PDU ? Does it match the WT of the ATR_RES from PN512 ? According to LLCP specification, LLCP LTO parameter must be alaways inferior to NFCIP1 WT parameter, is it insured in present case ?

 

FYI, we don't have PN512 SW stack for Android, however the ReaderLibrary delivey for Linux can easily be ported into Android environment. It just requires creation of dedicated makefiles.

0 件の賞賛
返信