Skip to main content
Visitor II
November 10, 2022
Solved

CR95HF read tag ISO14443A response 0x87 0x01 0x90

  • November 10, 2022
  • 6 replies
  • 2131 views

i'm read data into block 0 but response 0x87.

anybody help me fix it, thanks you so much.

I don't know where is wrong?.

[drv95HF_ReceiveSPIResponse]Response: 55 00 00 00 

[drv95HF_SendSPICommand]Send comand: 02 07 02 00 00 00 00 02 02 

[drv95HF_ReceiveSPIResponse]Response: 00 00 

[drv95HF_SendSPICommand]Send comand: 09 04 3A 00 5A 04 

[drv95HF_ReceiveSPIResponse]Response: 00 00 

[drv95HF_SendSPICommand]Send comand: 09 04 68 01 01 DF 

[drv95HF_ReceiveSPIResponse]Response: 00 00 

[drv95HF_SendSPICommand]Send comand: 04 02 26 07 

[drv95HF_ReceiveSPIResponse]Response: 80 05 04 00 28 00 00 

[drv95HF_SendSPICommand]Send comand: 04 03 93 20 08 

[drv95HF_ReceiveSPIResponse]Response: 80 08 5E 17 82 5B 90 28 00 00 

[drv95HF_SendSPICommand]Send comand: 04 08 93 70 5E 17 82 5B 90 28 

[drv95HF_ReceiveSPIResponse]Response: 80 06 08 B6 DD 08 00 00 

[drv95HF_ReceiveSPIResponse]Response: 55 00 00 00 

[drv95HF_SendSPICommand]Send comand: 02 07 02 00 04 01 00 03 03 

[drv95HF_ReceiveSPIResponse]Response: 00 00 

[drv95HF_SendSPICommand]Send comand: 09 04 3A 00 5A 04 

[drv95HF_ReceiveSPIResponse]Response: 00 00 

[drv95HF_SendSPICommand]Send comand: 09 04 68 01 01 DF 

[drv95HF_ReceiveSPIResponse]Response: 00 00 

[drv95HF_SendSPICommand]Send comand: 04 03 30 00 28 

[drv95HF_ReceiveSPIResponse]Response: 87 01 90 

    This topic has been closed for replies.
    Best answer by Ulysses HERNIOSUS

    Hi,

    you seem not be aware of UIDF1. So likely the card is not personalized that way. Also reading block 1 will not work without cryptography and mutual authentication using crypto1.

    ST does not provide code for supporting MifareClassic cryptography.

    Please also see https://community.st.com/s/question/0D53W000014zGpESAU/st25r95-data-read-and-write-problem-iso1443a

    Best Regards, Ulysses

    6 replies

    Technical Moderator
    November 10, 2022

    Hi,

    can you provide some information about the tag being used (manufacturer and model)?

    0x87 means timeout. Possible causes:

    • tag takes too long to respond to the 0x30 00 READ command (i.e Frame Waiting Time on reader side is too short)
    • tag does not support the read command.

    Note: the protocolSelect command you used ("02 07 02 00 04 01 00 03 03" ) has ST reserved bytes (in bold). I would recommend not to use those reserved bytes

    Rgds

    BT

    Hvu m.1Author
    Visitor II
    November 10, 2022

    thanks for reply

    i use lib provice by ST

    lib_iso14443Apcd.c

    lib_iso14443Apcd.h

    • the tag support read command, sure

    i will remove reserved bytes and try again

    Technical Moderator
    November 10, 2022

    Hi,

    I guess you are using a Mifare classic tag. For your information, reading block 0 after cascade level 1 anti-collision in such tags is only possible for UIDF1 personnalization. This was my rational for asking more information about the tag (model/manufacturer/personalization). Feel free also to share details about your hardware setup: do you use a custom board or a ST board (X-NUCLEO-NFC03A1 or M1054B transceiver board) or other ST board?

    Regarding the library, for new projects we recommend to use our RFAL which provides a common API for the various ST25R readers (see ST25 embedded NFC library).

    Rgds

    BT

    Hvu m.1Author
    Visitor II
    November 11, 2022

    0693W00000WI42FQAT.jpg0693W00000WI42KQAT.jpgyes, i have use mifare classic and this board connect to STM32F103C6T6

    because flash capacity of stm32f10c6t6 is small so i need more optimized library

    after i remove remove reserved bytes the result is as follows (read block 1)

    [drv95HF_SendSPICommand]Send comand: 02 05 02 00 00 00 00 

    [drv95HF_ReceiveSPIResponse]Response: 00 00 

    [drv95HF_SendSPICommand]Send comand: 09 04 3A 00 5A 04 

    [drv95HF_ReceiveSPIResponse]Response: 00 00 

    [drv95HF_SendSPICommand]Send comand: 09 04 68 01 01 DF 

    [drv95HF_ReceiveSPIResponse]Response: 00 00 

    [drv95HF_SendSPICommand]Send comand: 04 02 26 07 

    [drv95HF_ReceiveSPIResponse]Response: 80 05 04 00 28 00 00 

    [drv95HF_SendSPICommand]Send comand: 04 03 93 20 08 

    [drv95HF_ReceiveSPIResponse]Response: 80 08 5E 17 82 5B 90 28 00 00 

    [drv95HF_SendSPICommand]Send comand: 04 08 93 70 5E 17 82 5B 90 28 

    [drv95HF_ReceiveSPIResponse]Response: 80 06 08 B6 DD 08 00 00 

    [drv95HF_ReceiveSPIResponse]Response: 55 00 00 00 

    [drv95HF_SendSPICommand]Send comand: 02 05 02 00 04 21 00 

    [drv95HF_ReceiveSPIResponse]Response: 00 00 

    [drv95HF_SendSPICommand]Send comand: 09 04 3A 00 5A 04 

    [drv95HF_ReceiveSPIResponse]Response: 00 00 

    [drv95HF_SendSPICommand]Send comand: 09 04 68 01 01 DF 

    [drv95HF_ReceiveSPIResponse]Response: 00 00 

    [drv95HF_SendSPICommand]Send comand: 04 03 30 01 28 

    [drv95HF_ReceiveSPIResponse]Response: 90 04 04 24 00 00 

    Technical Moderator
    November 11, 2022

    Hi,

    you seem not be aware of UIDF1. So likely the card is not personalized that way. Also reading block 1 will not work without cryptography and mutual authentication using crypto1.

    ST does not provide code for supporting MifareClassic cryptography.

    Please also see https://community.st.com/s/question/0D53W000014zGpESAU/st25r95-data-read-and-write-problem-iso1443a

    Best Regards, Ulysses

    Hvu m.1Author
    Visitor II
    November 12, 2022

    i see. but i don't see any way to send MifareClassic cryptography.

    I'm having a hard time finding documentation to solve this problem

    thanks for reply

    Technical Moderator
    November 11, 2022

    Hi,

    In your trace:

    "[drv95HF_SendSPICommand]Send comand: 04 03 30 01 28 

    [drv95HF_ReceiveSPIResponse]Response: 90 04 04 24 00 00"

    90 04 04 24 00 00 means a 4-bits ACK/NAK reply has been received from the tag. This is a NAK reply (value 4h: invalid operation). This is caused by trying to read the block #1 whereas the mutual authentication has not been performed as explained by Ulysses.

    I would recommend to use ST25TN tags that support READ command without specific proprietary authentication/cryptography.

    Rgds

    BT

    Hvu m.1Author
    Visitor II
    November 12, 2022

    i used ST25TN card but i need to integrate different cards

    thanks for reply