2022-11-10 12:26 AM
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
Solved! Go to Solution.
2022-11-11 02:30 AM
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
2022-11-10 01:43 AM
Hi,
can you provide some information about the tag being used (manufacturer and model)?
0x87 means timeout. Possible causes:
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
2022-11-10 01:58 AM
2022-11-10 02:31 AM
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
2022-11-10 05:20 PM
yes, 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
2022-11-11 02:30 AM
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
2022-11-11 09:45 AM
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
2022-11-11 05:37 PM
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
2022-11-11 05:37 PM
i used ST25TN card but i need to integrate different cards
thanks for reply