Hi,
In my product, I use the PN5190 with NFC Lib to read different types of cards. I’m having an issue with one customer: the device reads original MIFARE Classic cards without problems, but this customer has already deployed a mix of cards using NXP chips and Infineon chips.
The NXP cards can be read just fine. However, with the Infineon cards, the device is unable to authenticate. I’m using as a base the simplified API demo, and these cards are detected as: “Type A Layer 3 card with merged ATQA”. The ATQA is 0x0400 and the SAK is 0x88, but on the NXP chip the SAK shows 0x08.
First, I tried running the same code that I use for MIFARE Classic, but authentication fails. If I modify the SAK in PeerInfo.uTi.uInitiator.tIso14443_3a.bSak, I get the same result. Likely, the real data is kept in the reader and the peer info isn’t “bidirectional.” I’ve checked the examples, but there’s no information for this specific situation. Any info on how to read compatible cards?
I can read the card with my phone and it works fine (maybe slower than an original NXP card, but it works). The sector 0 dump is:
XXXXXXXXC188040043242BCE0001020E
XXXXXXXXXXXXXXXX0000000000000000
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
XXXXXXXXXXXXFF078069XXXXXXXXXXXX
NFC Lib returns this error code:
ErrorInfo Comp: 0x0 type: 0x0
The result of sending the authenticate command is 0x20000.
Any example?
Thanks in advance.
Hello @Saydev
Hope you are doing well.
Layer 3 covers anti-collision, UID selection and card activation, while ISO 14443 layer 4 presents a set of standardized commands for data exchange. Basic Tags/Cards stop after Layer 3 and use proprietary memory-read/write commands instead of Layer 4.
Since your customer is using third-party PICCs, you will need to implement the proprietary/custom command set for your device.
Also, please refer to NxpNfcRdlib -> types -> ph_Status.h for the Status Code definitions.
Regards,
Eduardo.
Good news,
I've been able to read the card, i simply changed the way to read the card from simplified API to the approach shown in the NfcrdlibEx4_MIFAREClassic.c example, the macro phalMfc_Authenticate seems to work just fine with these cards while MFC_AUTHENTICATE was failing.