Skip to main content
Visitor II
September 16, 2022
Solved

CR95HF communication with ST25TA02KB-D, why the RATS command fail to answer ?

  • September 16, 2022
  • 2 replies
  • 1012 views

Hello,

I'm new to RFID and I have troubles with the RATS command of the ISO-14443 standard. I am currently working with a CR95HF (reader) and a ST25TA02KB-D (tag). The uC driving the reader is an Arduino UNO, this part is working fine so far.

My issue is that I can't manage to have an answer from the tag when sending the RATS command. The error I get is the 87 : "Frame wait time out" according to the reader datasheet.

I found similar issues and the main culprit seems to be the Frame Waiting Time :

Link 1

Link 2

Link 3

But even with this parameter set to 10ms I can't get a valid answer to the RATS command.

Here is a capture of the data exchange between the Arduino UNO and the CR95HF until the RATS command :

Protocol selection (FDT = 10ms) :

>>> 00 02 05 02 00 00 21 00

<<< 00 00

REQA :

>>> 00 04 02 26 07

<<< 80 05 42 00 28 00 00

ANTICOLLISION (there is only one tag in the reader field) :

>>> 00 04 03 93 20 08

<<< 80 08 88 02 E3 00 69 28 00 00

SELECT :

>>> 00 04 08 93 70 88 02 E3 00 69 28

<<< 80 06 04 DA 17 08 00 00

RATS :

>>> 00 04 03 E0 50 28

<<< 87 00

Since I am a newbie in RFID, is there an obvious error that I made in the reader/tag exchange ?

I tried with higher FDT value and even another tag type (LXMS33HCNK-171) but I still have this error.

Any advice to what I could try to overcome this issue ?

My end goal is to access the NDEF user memory and the tag's counter.

Thanks,

JR

    This topic has been closed for replies.
    Best answer by Brian TIDAL

    Hello Jérôme,

    in your trace, the reply to SELECT Cascade Level 1 (93 70 88 02 E3 00 69) is 04 which mean UID non complete (see 80 06 04 DA 17 08 00 00). As the ST25TA02KB has a 7-byte unique identifier (UID), ANTICOLLISION Cascade Level 2 (95 20) has to be performed to retrieve the 3 remaining bytes of the UID after SELECT Cascade Level 1 where only the first 4 bytes have been found (02 E3 00 69). As you tag has not been "fully" selected, it cannot answer to the RATS.

    I would suggest to use ST25 RFAL library that implements the full collision resolution, the ISO-DEP protocol. See https://github.com/stm32duino/X-NUCLEO-NFC03A1 for a port on top of STM32 nucleo board (I believe some adaptations will be needed for your Arduino UNO board).

    Rgds

    BT

    2 replies

    Technical Moderator
    September 16, 2022

    Hello Jérôme,

    in your trace, the reply to SELECT Cascade Level 1 (93 70 88 02 E3 00 69) is 04 which mean UID non complete (see 80 06 04 DA 17 08 00 00). As the ST25TA02KB has a 7-byte unique identifier (UID), ANTICOLLISION Cascade Level 2 (95 20) has to be performed to retrieve the 3 remaining bytes of the UID after SELECT Cascade Level 1 where only the first 4 bytes have been found (02 E3 00 69). As you tag has not been "fully" selected, it cannot answer to the RATS.

    I would suggest to use ST25 RFAL library that implements the full collision resolution, the ISO-DEP protocol. See https://github.com/stm32duino/X-NUCLEO-NFC03A1 for a port on top of STM32 nucleo board (I believe some adaptations will be needed for your Arduino UNO board).

    Rgds

    BT

    JRoud.1Author
    Visitor II
    September 16, 2022

    Nice, now it works :

    ANTICOLLISION CL1 :

    >>> 00 04 03 93 20 08

    <<< 80 08 88 02 E3 00 69 28 00 00

    SELECT CL1 :

    >>> 00 04 08 93 70 88 02 E3 00 69 28

    <<< 80 06 04 DA 17 08 00 00

    ANTICOLLISION CL2 :

    >>> 00 04 03 95 20 08

    <<< 80 08 1E B2 7B 9A 4D 28 00 00

    SELECT CL2 :

    >>> 00 04 08 95 70 1E B2 7B 9A 4D 28

    <<< 80 06 20 FC 70 08 00 00

    RATS :

    >>> 00 04 03 E0 50 28

    <<< 80 0A 05 75 80 60 02 BB 58 08 00 00

    Thank you it was indeed the missing cascade level 2 !

    I am exploring the GIT repository for the remaining steps I need to achieve.