Re: Using PN512 to communicate with Mifare Desfire EV1 card

Forum MIFARE SmartCard IC`s MIFARE DESFire Using PN512 to communicate with Mifare Desfire EV1 card Re: Using PN512 to communicate with Mifare Desfire EV1 card

Re: Using PN512 to communicate with Mifare Desfire EV1 card

5. April 2013 at 10:19
Dear Trong Quyen,

yes, you are missing the protocol.

What I can see from your code:

You have activated the protocol using CID = 0 (no CID).
You send a PPS, requesting not to change the bit rate: why do you do that? It is not only needless, but even not allowed according to the ISO/IEC 14443.
So simply remove the PPS (even though the MIFARE DESfire accepts it).

Then in the following (first) command you need to use the I-Block format of the ISO14443-4, as I mentioned above: PCB + Payload + CRC
In you specific case the first PCB is 02 (hex). So you must send:

02 5A 00 00 00 + 2 bytes CRC (CRC is done automatically by the PN512, if enabled)

If you use the RD710 in 14443 Layer 4 communication, the MIFAREDiscover does this 14443-4 protocol, and you only see the payload. Try the same in 14443 Layer 3 communication (which does not do the 14443-4 protocol), and you see the same behavior like with the PN512 board...

For details regarding the protocol, please refer to the ISO/IEC 14443 documents. This is neither MIFARE DESFire related nor PN512 related.

BR,
Renke
+ 0  |  - 0