AnsweredAssumed Answered

Polling/Read/Write Mifare-Defire ?

Question asked by Trong-Nghia Cheng on Oct 20, 2017

Firstly: I'm requesting for access the " Example 10 – MIFARE DESFire " Sample Code.

 

So, I'm analysing the code from "NfcrdlibEx4_MIFAREClassic", File "NfcrdlibEx4_MIFAREClassic.c"


This following code does not work as I expected

 

       

        do
        {
            /* Field OFF */
            status = phhalHw_FieldOff(pHal);
            CHECK_STATUS(status);

            status = phhalHw_Wait(pDiscLoop->pHalDataParams,PHHAL_HW_TIME_MICROSECONDS, 5100);
            CHECK_STATUS(status);

            /* Configure Discovery loop for Poll Mode */
            status = phacDiscLoop_SetConfig(pDiscLoop, PHAC_DISCLOOP_CONFIG_NEXT_POLL_STATE, PHAC_DISCLOOP_POLL_STATE_DETECTION);
            CHECK_STATUS(status);

            /* Run Discovery loop */
            status = phacDiscLoop_Run(pDiscLoop, PHAC_DISCLOOP_ENTRY_POINT_POLL);

        }while((status & PH_ERR_MASK) != PHAC_DISCLOOP_DEVICE_ACTIVATED); /* Exit on Card detection */

The status should be 16523 (as expected value in NfcrdlibEx1_BasicDiscoveryLoop), but I got 16517 for "Mifare Desfire" and 16516 without any card.

 

I'm trying to understand the functions and parameters, but it is huge.

 

Update 20.10.2017-14:12 :
I could download the file "sw375616 - NFC Reader Library v05.07.00 including MIFARE DESFire, MIFARE Plus and ICODE DNA modules (1.6).zip" from docStore, but I cannot unpack the file? Why not?

Outcomes