cancel
Showing results for 
Search instead for 
Did you mean: 

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

GPaiv.1
Associate III

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.

1 ACCEPTED SOLUTION

Accepted Solutions
Brian TIDAL
ST Employee

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

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

11 REPLIES 11
Brian TIDAL
ST Employee

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

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

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.

Brian TIDAL
ST Employee

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

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

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

Brian TIDAL
ST Employee

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

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

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.

Brian TIDAL
ST Employee

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

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Hi Brian,

I think, maybe the problem is a block " txbuf " in "mifareUlReadNBytes()".

This specific block had 2 values for standard, the first value is " txBuf[0] = MIFARE_UL_CMD_READ = 0x30 " and the second value is " txBuf[1] = startAdrr = 0x00 ", and that is the format of tx block send by RFID.

In the manual of other Board a have this info:

In this case, this command refers to this tx block is using to read an EPROM memory and my info is not in the EPROM memory.

Now, the command using by cell phone use this protocol in the Tx Block:

This command is using by cell phone and receives the right answer, but when I using in my code I don't receives the right answer.

has another command can be used for request info in the SIC4310-full?

Rgds.

Gabriel.

Brian TIDAL
ST Employee

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

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.