Stuck in reading data from T2T cards...

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

Stuck in reading data from T2T cards...

1,287件の閲覧回数
Strooom
Contributor I

Hi, am I writing a driver for the PN7150 and it should read NDEF data from a tag.

So far I can detect the tag and read a block of data, and this data makes sense. However this only works with one particular card I have, all other cards can be detected but when I try to read data, they respond with NACK

I am stuck as to why some T2T card responds, and other cards NACK. Can you give me some help to have this solved. Below is some dump of the NCI messages which should clarify what I am describing.

1. This is the log from the card which works :

RF Interface Activated Notification
[0x00] = 0x60 : messageType = Notification, PacketBoundaryFlag = Final, GroupID = RF Management,
[0x01] = 0x05 : opCode = RF Interface Activated Notification
[0x02] = 0x17 : payload length = 23
[0x03] = 0x01 : RF Discovery ID = 1
[0x04] = 0x01 : RF Interface = Frame RF Interface
[0x05] = 0x02 : RF Protocol = T2T
[0x06] = 0x00 : RF TechnologyAndMode = NFC_A_PASSIVE_POLL_MODE
[0x07] = 0xFF : Max Data Payload = 255
[0x08] = 0x01 : Initial Number of Credits = 1
[0x09] = 0x0C : Length of RF Technology Specific Parameters = 12
[0x0A..0x0B] = SENS_RES Response = 0x44 0x00
[0x0C] = 0x07 : NFC ID1 Length = 7
[0x0D..0x13] = NFC ID1 : 0x04 0x2B 0xB9 0xAA 0x28 0x63 0x80
[0x16] = 0x00 : RF TechnologyAndMode = NFC_A_PASSIVE_POLL_MODE
[0x17] = 0x00 : Transmit Bitrate
[0x18] = 0x00 : Receive Bitrate
[0x19] = 0x00 : Length of Activation parameters

Sending a READ command, for block 3
[0x00] = 0x00 : messageType = Data, PacketBoundaryFlag = Final,
[0x01] = 0x00 : connection ID = 0
[0x02] = 0x02 : payload length = 2
[0x03..0x04] = payload data : 0x30 0x03

Core Connection Credits Notification (omitted)

Read response, with meaningfull data from block 3
[0x00] = 0x00 : messageType = Data, PacketBoundaryFlag = Final,
[0x01] = 0x00 : connection ID = 0
[0x02] = 0x11 : payload length = 17
[0x03..0x13] = payload data : 0xE1 0x10 0x12 0x00 0x01 0x03 0xA0 0x0C 0x34 0x03 0x00 0xFE 0x00 0x00 0x00 0x00 0x00


2. Here is an example of a very similar card, (only difference I can see is length of UID)

RF Interface Activated Notification
[0x00] = 0x60 : messageType = Notification, PacketBoundaryFlag = Final, GroupID = RF Management,
[0x01] = 0x05 : opCode = RF Interface Activated Notification
[0x02] = 0x14 : payload length = 20
[0x03] = 0x01 : RF Discovery ID = 1
[0x04] = 0x01 : RF Interface = Frame RF Interface
[0x05] = 0x02 : RF Protocol = T2T
[0x06] = 0x00 : RF TechnologyAndMode = NFC_A_PASSIVE_POLL_MODE
[0x07] = 0xFF : Max Data Payload = 255
[0x08] = 0x01 : Initial Number of Credits = 1
[0x09] = 0x09 : Length of RF Technology Specific Parameters = 9
[0x0A..0x0B] = SENS_RES Response = 0x04 0x00
[0x0C] = 0x04 : NFC ID1 Length = 4
[0x0D..0x10] = NFC ID1 : 0x2C 0x26 0x3E 0xD5
[0x13] = 0x00 : RF TechnologyAndMode = NFC_A_PASSIVE_POLL_MODE
[0x14] = 0x00 : Transmit Bitrate
[0x15] = 0x00 : Receive Bitrate
[0x16] = 0x00 : Length of Activation parameters

Sending a READ command, for block 3
[0x00] = 0x00 : messageType = Data, PacketBoundaryFlag = Final,
[0x01] = 0x00 : connection ID = 0
[0x02] = 0x02 : payload length = 2
[0x03..0x04] = payload data : 0x30 0x03

Core Connection Credits Notification (omitted)

Read response, I think 0x04 means NACK

[0x00] = 0x00 : messageType = Data, PacketBoundaryFlag = Final,
[0x01] = 0x00 : connection ID = 0
[0x02] = 0x02 : payload length = 2
[0x03..0x04] = payload data : 0x04 0x00



Engineer by Day, Maker by Night
0 件の賞賛
返信
3 返答(返信)

1,264件の閲覧回数
Strooom
Contributor I

Hello Ricardo,

* If you let me know what extra logging could be helpful, I will try to provide that. I think I have completely decoded the RF_INTF_ACTIVATED_NTF message, so this should be sufficient to determine what type of card it is, and how to read data from it.

* About the cards : the only T2T card which works is the one provided with the PN7150 evaluation board (OM 5578). Pictures of the card are attached.  All other cards I use for testing are returning a NACK. Those cards are a collection from all kinds of sources. I only took the T2T cards. Reading the UID of those cards works fine, and all other NCI messages are normal. But the NCI does not really tell how to read payload data from a card, so maybe I am doing something wrong here. 

My assumption is that for a T2T card I can simply read 4 blocks at a time with a READ command. Maybe the card needs other commands first in order to be ready for reading...

* I could try to port the SW4325 example, but this is a major effort (as I have to port the FreeRTOS used in the example), and as I already have a good NCI driver, I'd like to build further on that.

 

 

Engineer by Day, Maker by Night
0 件の賞賛
返信

1,257件の閲覧回数
nxf58474
NXP Employee
NXP Employee

Hi,

 

But, what are the other cards you are using? With the log the only information we have is the UID and that is a T2T.

 

It is strange why it cannot read the Capability Container (Block Address 3) in your second log. In your first log you can read the Capability Container (0xE1 0x10 0x12 0x00) and the next 13 bytes of the user memory (0x01 0x03 0xA0 0x0C 0x34 0x03 0x00 0xFE 0x00 0x00 0x00 0x00 0x00).

 

Could you try to read both tags with the NFC TagInfo app (using the full scan tab)?

 

Regards,

Ricardo

0 件の賞賛
返信

1,275件の閲覧回数
nxf58474
NXP Employee
NXP Employee

Hi,

 

Hope you are doing well. You are right, the only difference is the UID. But, unfortunately your log does not provide us with any information we can use to identify your issue.

 

What T2T are you using in both cases? Have you try with other T2T?

 

By any chance, have you tried porting our NXP-NCI MCUXpresso example Project to your host MCU?

 

Regards,

Ricardo

0 件の賞賛
返信