Hi,
I'm working on a Mifare Classic R/W device involving a PN5190 and I've been facing an unknown error lately.
The project uses the NXP's NFC lib and I managed to read and write data on a Mifare Classic tag's sector weeks ago on another project.
I successfully identified the type of tag used, got the UID...
But when I try to read data on a block (after field and card re-activation), calling phalMfc_Read() returns a 0x782 error and I can figure out what this means. I tried to run step-by-step really deep in the library but it becomes really hard to understand...
Any idea?
Thanks in advance for your help.
Solved! Go to Solution.
Hello,
For MIFARE Classic, after authentication Read/Write block operations may be performed, so you should call phalMfc_Authenticate() to authenticate any block of the sector that you want to access, once authenticated successfully, you can access to all blocks of the same sector.
Hope my reply help to you, thanks!
Best regards,
Kelly
Technical Support
NXP Semiconductor
Hello,
For MIFARE Classic, after authentication Read/Write block operations may be performed, so you should call phalMfc_Authenticate() to authenticate any block of the sector that you want to access, once authenticated successfully, you can access to all blocks of the same sector.
Hope my reply help to you, thanks!
Best regards,
Kelly
Technical Support
NXP Semiconductor
Hello,
Thanks for your answer!
That's right, the problem was that the mecanism set to avoid reauthentication when not required was not synchronized with the upper layer of the software to reset this mecanism when the tag is reactivated.
So yes, it definitely was due to a missing of authentication...
I just don't understand why I didn't manage to understand the error code
Thank you for your help!
Hello,
I checked the related code, the errorcode=0x0782 should be occurred in phpalMifare_Sw_ExchangeL3() -> phhalHw_Exchange() status = PHPAL_MIFARE_ERR_NAK4(line 144) and then finally return PH_ADD_COMPCODE(status, PH_COMP_PAL_MIFARE) = 0x0782(line 205). This is MIFARE product NAK4 response code, its detail mean may be related your application, so you could double check your application parts.
Hope my reply help to you, thanks!
Best regards,
Kelly
Technical SupportNXP Semiconductor