MFRC522 communication with MiFARE classic 1k card

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

MFRC522 communication with MiFARE classic 1k card

158 次查看
ashishtbm
Contributor I

Hii, I am new to RFID and MFRC522. And wanted to develop a simple access control with that. I didn't wanted to use any readymade library as I didn't want to miss any protocol. My host microcontroller is STM32F103. I have progressed as follows,

1) Sent the REQA command and got back ATQA from PICC (command consisted of just one byte of which 7 bits was sent as REQA is a 7 bit command, 0x26)

2) Sent anticollision CL1 command and PICC responded with 4 bytes UID and one additional byte which was XOR of all the UID bytes. (Command was a two byte command, 0x93 and 0x20 with no CRC byte)

3) Now I am sending the select CL1 command (2 byte command 0x93 and 0x70 along with 4 UID bytes. But I am not receiving anything from PICC and my FIFO level remains zero. I should be receiving a SAK response from PICC.

What may be the problem with this?

My command 1 and 2 was not having any CRC. Does step 3 requires CRC byte?

Whether CRC is necessary at all? In what commands is it necessary? I am not able to get this answer from any document.

I checked the card with reader from my phone, it is receiving a SAK and able to read the entire 1k memory as well, which shows that card is ok.

My Tx speed setting is 106kBd. Only one card present in the field. I tried with other cards as well but same problem persists.

In Status2Reg of MFRC522, ModemState bits are 101 after sending transcieve command with Select CL1 which means it's waiting for data.

Am I doing anything wrong with the framing of the command? I am not putting PICC in halt state.

I am clueless as of now.

I have not put up the code as I am sure that code is not the problem but something conceptual I am missing on with respect to PICC command.

Please help.

 

 

0 项奖励
1 回复

108 次查看
Fabian_R
NXP TechSupport
NXP TechSupport

 

This is Fabian, I've been assigned to support your case.

I appreciate your interest in our products.

First I have to say that MRFC522 is a non-recommended new design product. We highly recommend to please take a look at MFRC630 Plus. This is a front-end device as well and it can be implemented in a register-level command as shown in the following application note: https://www.nxp.com/docs/en/application-note/AN12657.pdf

 

Regarding the implementation of this, I'm very sorry but I can't deepen into the implementation since the free online support I can provide is limited to the use of our newest evaluation kits using our NFC Reader Library. My recommendation would be to please take a look at the ISO14443-3/4 specifications to properly implement the commands with the respective CRC since it is indicated in some commands that CRC is required in both specifications.

 

Best Regards,
Fabian
0 项奖励