2022-08-29 04:36 AM
Hello, I want to ask how to read, write to tag using st25r95 as nfc reader.
The mcu used in my system is dsPIC33EP128GS805 and the target tag is NT3H2111 of NXP
https://community.st.com/s/question/0D53W000014zGpESAU/st25r95-data-read-and-write-problem-iso1443a
I refer to the above link as the content of the post is similar to my situation.
Below is what I have done.
Through the above process, I received the UID normally. It seems that the uprotected user memory can be accessed without authentication, but I couldn't find in the spec what the communication protocol with st25r95 is.
In the specification of the tag, the read command consists of cmd 0x30(1byte) and memory addr(1byte) and CRC(2byte). Can I put the configuration contents in the data area of the sendRecv protocol of st25r95?
there is any example of command related to type2 communication?
Thank you.
Solved! Go to Solution.
2022-08-29 04:56 AM
Hi,
before sending the READ command after the anti collision and Select commands, make sure to configure the proper Frame Waiting Time. The default timeout value when not set in the protocolSelect is suited for anti collision but an higher value is needed for READ (5ms) command and WRITE command (usually 10ms in NFC Forum T2T specs). See Table 28 in the tag datasheet. You just need to send a new protocolSelect command before the READ command with the appropriate PP:MM:DD parameters (e.g. PP=0x00, MM=0x21, DD=0x00, FDT = 10ms).
See https://community.st.com/s/question/0D50X0000AFqKjkSQF/why-does-my-cr95hf-respond-with-0x87-timeout-or-no-tag-after-successfully-writing-to-a-ntag216-nfc-forum-type-2-compliant-tag for a similar issue and more details.
If this solves your issue, would you please mark this answer as best?
Thanks
Rgds
BT
2022-08-29 04:56 AM
Hi,
before sending the READ command after the anti collision and Select commands, make sure to configure the proper Frame Waiting Time. The default timeout value when not set in the protocolSelect is suited for anti collision but an higher value is needed for READ (5ms) command and WRITE command (usually 10ms in NFC Forum T2T specs). See Table 28 in the tag datasheet. You just need to send a new protocolSelect command before the READ command with the appropriate PP:MM:DD parameters (e.g. PP=0x00, MM=0x21, DD=0x00, FDT = 10ms).
See https://community.st.com/s/question/0D50X0000AFqKjkSQF/why-does-my-cr95hf-respond-with-0x87-timeout-or-no-tag-after-successfully-writing-to-a-ntag216-nfc-forum-type-2-compliant-tag for a similar issue and more details.
If this solves your issue, would you please mark this answer as best?
Thanks
Rgds
BT
2022-08-29 06:59 PM
Thank you for quick response. I will check it out as you said!
2022-08-30 12:52 AM
I tried the method you recommended by modifying the protocol select value before reading. But I couldn't read. :crying_face: (If I change the protocol setting before reading, the read bit is not set in the polling check after the tag read message, so no information can be read.)
Below is the sequence I tried and the values.
Is there something wrong with the value sent to st25r95? or is there something I'm doing wrong?
2022-08-30 01:20 AM
Hi,
make sure to use a sendRecv command: for example 00 04 03 30 01 28 for READ block 1
00 04 03 30 01 28
28
^^____ Transmission flags
(Append CRC, 8 bits in last bytes)
30 01
^^ ^^________ T2T READ BLOCK 1
03
^^______________ Length
04
^^_________________ SendRecv command
00
^^____________________ SPI control byte (SPI send)
Rgds
BT
2022-08-30 02:02 AM
Oh, I made a mistake!
Problem solved!