Skip to main content
Visitor II
March 24, 2021
Solved

How I read the info of a protocol ISO14443A using kit ST25R3911B-disco and lib the RFAL?

  • March 24, 2021
  • 6 replies
  • 4354 views

I'm trying to read the information from another RFID card, the idea is to send a request for it and receive the answer 00010203040506070809, the card that is sending this info is SIC4310-full using the ISO14443 protocol.

I tried to use the function "mifareUlReadNBytes (uint8_t startAddr, uint8_t * readbuf, uint8_t length, uint8_t * actLength)" but the "readbuf" only returns me 0.

I am sure that the other card (SIC4310-full) is working because through a mobile app I can verify its operation.

I would like to know if I am using the correct RFAL lib function and how I can send this request to receive the information I want.

Gabriel.

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

    Hi Gabriel,

    as explained in my previous post, the UlReadNBytes function is intended to read T2T tag memory using the NFC Forum T2T Read command (standard command). I would suggest you copy this function to create you own function sending the proprietary command to retrieve the data. You just need to replace the 0x30 (READ) by the proprietary command (0xB2? RxUR?) and copy the related parameters. As the datasheet does not seem to be public, I can hardly comment further.

    Rgds

    BT

    6 replies

    Technical Moderator
    March 24, 2021

    Hi,

    have you performed the anti-collision procedure so that the tag is in Active state?

    I would suggest also to update to the latest GUI software and ST25R3911B-DISCO firmware .

    Rgds

    BT

    GPaiv.1Author
    Visitor II
    March 24, 2021

    Hi,

    I'm using de "ISO14443Select()" for select de card than I using, I think this function will had anti-colision procedure already.

    I already using a latest GUI software and ST25R3911B-DISCO firmware .

    Rgds

    Gabriel.

    Technical Moderator
    March 24, 2021

    Hi Gabriel,

    have you first set the RF field on thanks to the iso14443AInitialize()? what is the return code of iso14443AInitialize?

    What is the return code of iso14443ASelect() and what are the values of the various field of the card parameter?

    What is the return code of UlReadNBytes()?

    Note: those functions are not RFAL functions but interface functions for the GUI dispatcher.

    Rgds

    BT

    GPaiv.1Author
    Visitor II
    March 24, 2021

    Hi Brian,

    Yes, first I set the RF field to the iso14443AInitialize(). The return code was 0.

    In the iso14443Select():

    Return code = 0.

    card.uid[0] = 57

    card.uid[1] = 2

    card.uid[2] = 0

    card.uid[3] = 0

    card.uid[4] = 5

    card.uid[5] = 5

    card.uid[6] = 244

    card.uid[7] = 0

    card.uid[8] = 0

    card.uid[9] = 0

    card.actlength = 7

    card.atqa[0] = 68

    card.atqa[1] =   0

    card.sak[0] = 0

    card.sak[1] = 0

    card.sak[2] = 8

    card.cascadelevels = 2

    card.collision = false

    mifareUlReadNBytes():

    Return code 0

    rxBuf:

    39 2 b3 0 5 5 f4 f4 48 0 0 0 0

    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

    Technical Moderator
    March 24, 2021

    Hi Gabriel,

    the dump of the card parameter seems to be incomplete. Can you copy again the values of the various field of the card structure? What is the value of the perform_anticollision parameter when calling iso14443Select? make sure to have perform_anticollision = 1

    Rgds

    BT

    GPaiv.1Author
    Visitor II
    March 24, 2021

    Hi Brian,

    Yes, I can.

    The struct of all card values are:

    Return code = 0.

    card.uid[0] = 0x39

    card.uid[1] = 0x02

    card.uid[2] = 0x00

    card.uid[3] = 0x00

    card.uid[4] = 0x05

    card.uid[5] = 0x05

    card.uid[6] = 0xf4

    card.uid[7] = 0x00

    card.uid[8] = 0x00

    card.uid[9] = 0x00

    card.actlength = 0x07

    card.atqa[0] = 0x44

    card.atqa[1] = 0x00

    card.sak[0] = 0x00

    card.sak[1] = 0x00

    card.sak[2] = 0x08

    card.cascadelevels = 0x02

    card.collision = false

    I debug code and, I have sure the variable perform_antisollision = 1.

    Technical Moderator
    March 24, 2021

    Hi,

    if the return code of UlReadNBytes is 0, it means the call is successful. I guess you have read block #0 (startAddr). The result of T2T READ command is 16 bytes (4 blocks). What is the retuned value of actLength?

    Rgds

    BT

    Technical Moderator
    March 24, 2021

    Hi,

    UlReadNBytes is intended to read the EEPROM of the tag device; this uses the READ (0x30) command followed by a block number and it returns this block of memory followed by the 3 next blocks of the EEPROM. If you want to execute other commands (proprietary), you will have to implement those commands.

    Rgds

    BT

    GPaiv.1Author
    Visitor II
    March 25, 2021

    Hi Brian,

    I don't need to read the EEPROM, I will need to read a FLASH memory of the Board SIC-4310, Because this board read a continuous signal and send via RFID, I need to read this signal.

    Do you have a suggestion for me of the other function can I use to read the FLASH memory of the SIC4310-full board?

    Rgds,

    Gabriel.

    Technical Moderator
    March 25, 2021

    Hi Gabriel,

    as explained in my previous post, the UlReadNBytes function is intended to read T2T tag memory using the NFC Forum T2T Read command (standard command). I would suggest you copy this function to create you own function sending the proprietary command to retrieve the data. You just need to replace the 0x30 (READ) by the proprietary command (0xB2? RxUR?) and copy the related parameters. As the datasheet does not seem to be public, I can hardly comment further.

    Rgds

    BT