MIFARE Plus reader

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MIFARE Plus reader

5,531 Views
Serhii
Contributor II

Hi,


I am developing a MIFARE Plus reader in SL3 mode and I am using the NFC Reader Library, but I can't find information on using the functions from this library in the docstore. I know that there is a description of this library for MIFARE Classic and MIFARE Ultralight (UM10663), is there the same document for MIFARE Plus?

Best regards.

0 Kudos
24 Replies

4,575 Views
Viktor_
Contributor I

 

 

0 Kudos

5,138 Views
Serhii
Contributor II

Thank you for the reply @Kan_Li .
Yes, I have a file (Sw375622), but I don't see an example in it that describes how to read MIFARE Plus, is there an example somewhere that describes a sequence of functions to read MIFARE Plus?

0 Kudos

5,145 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hello @Serhii ,

 

The extended version of NFC reader library contains the code for Mifare Plus, and you may request it from NXP doc store. please kindly refer to the following for more details.

nfc reader lib ec version.png

 

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

4,787 Views
germano
Contributor II

Hi @Kan_Li I'm looking for the extended version of nfc reader library.

I have high access to "Products -> NFC & Contactless Reader Solutions -> NFC Frontend Solutions", but I only see the public version of the library and I cannot find the sw375622, can you tell me where I can find this file?

0 Kudos

4,778 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @germano ,

 

The path is "MIFARE ICs > Application Notes > NFC Reader Library", but if you still have this problem, you have to request a higher access right.

 

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

5,096 Views
Serhii
Contributor II

Hello again @Kan_Li,

I found and built a project which is in the library for MIFARE Classic. It works and I decided to make a MIFARE Plus read based on this example. I added these definitions to my project:

  • NXPBUILD__PH_NDA_MFP
  • NXPBUILD__PHAL_MFP_SW
  • NXPBUILD__PHPAL_I14443P4_SW
  • NXPBUILD__PHPAL_I14443P4A_SW

I see that P4 and P4A are activated correctly and then I run the command:

phalMfp_AuthenticateSL3(psalMFP, 1, 0x4000, 0,0, bLenDivInput, pDivInput,bLenPcdCap2, pPcdCap2In, pPcdCap2Out, pPcdCap2);

But I get status 0x0201 - which corresponds to PH_ERR_IO_TIMEOUT, I can't understand why this happens and how I can solve it.

Best regards.

0 Kudos

5,087 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hello @Serhii ,

 

Mifare Plus is delivered initially in SL0, have you switched it to SL3 already? You may request the full version of data sheet for mifare plus from NXP doc store for more details regarding this topic.

 

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

5,085 Views
Serhii
Contributor II

Hi @Kan_Li 

Yes, I have Mifare Plus and it is already converted to SL3. I am wondering why when I send phalMfp_AuthenticateSL3 I get a timeout error, and if I put the wrong key block for this command I get the error that I specified the wrong block, how do I solve this problem?

0 Kudos

5,077 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hello @Serhii ,

 

Which NFC reader library are you working on? Is it possible to share your application code for a review?

 

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

5,074 Views
Serhii
Contributor II

I use the library in the docstore (Sw375622).

 

 

 

 

        /* Card detected */
        /* Get the tag types detected info */
        status = phacDiscLoop_GetConfig(pDiscLoop, PHAC_DISCLOOP_CONFIG_TECH_DETECTED, &wTagsDetected);

        /* Check for Status */
        if ((status & PH_ERR_MASK) == PH_ERR_SUCCESS)
        {
            /* Check for Type A tag detection */
            if (PHAC_DISCLOOP_CHECK_ANDMASK(wTagsDetected, PHAC_DISCLOOP_POS_BIT_MASK_A))
            {
                /* Check for MIFARE Classic */
            	DEBUG_PRINTF ("\nSAK: 0x%x",pDiscLoop->sTypeATargetInfo.aTypeA_I3P3[0].aSak);

            	if (0x20 == (pDiscLoop->sTypeATargetInfo.aTypeA_I3P3[0].aSak & 0x20))//if (0x08 == (pDiscLoop->sTypeATargetInfo.aTypeA_I3P3[0].aSak & 0x08))
                {

                    DEBUG_PRINTF ("\nUID: ");
                    phApp_Print_Buff(pDiscLoop->sTypeATargetInfo.aTypeA_I3P3[0].aUid,pDiscLoop->sTypeATargetInfo.aTypeA_I3P3[0].bUidSize);

                    bFirstAuth = 1;
                    wBlockNo = 0x4000;
                    bLenDivInput = 0;
                    bLenPcdCap2 = 0;

                    status = phalMfp_AuthenticateSL3(psalMFP, bFirstAuth, wBlockNo, 1,0, bLenDivInput, pDivInput,0, pPcdCap2In, pPcdCap2Out, pPcdCap2);
                    CHECK_STATUS(status);

                    //TODO Read command

                    DEBUG_PRINTF("\nPlease Remove the Card\n\n");

                    /* Field RESET */
                    status = phhalHw_FieldReset(pHal);
                    CHECK_STATUS(status);

                    /* Make sure that example application is not detecting the same card continuously */
                    do
                    {
                        /* Send WakeUpA */
                        status = phpalI14443p3a_WakeUpA(pDiscLoop->pPal1443p3aDataParams,
                                                        pDiscLoop->sTypeATargetInfo.aTypeA_I3P3[0].aAtqa);

                        /* Check for Status */
                        if (status != PH_ERR_SUCCESS)
                        {
                            break; /* Card Removed, break from the loop */
                        }

                        /* Send HaltA */
                        status = phpalI14443p3a_HaltA(pDiscLoop->pPal1443p3aDataParams);
                        CHECK_STATUS(status);

                        /* Delay - 5 milli seconds*/
                        status = phhalHw_Wait(pDiscLoop->pHalDataParams, PHHAL_HW_TIME_MILLISECONDS, 5);
                        CHECK_STATUS(status);

                    }while(1);
                }
            }
        }

 

 

 

 

Debug log

Reader chip RC660: 0x1a

Ready to detect

SAK: 0x20
UID: 04 2E 6D 5A 6C 5C 80
Error - (0x0201) has occurred : 0xCCEE CC-Component ID, EE-Error code. Refer-ph_Status.h

Please Remove the Card


I found the following that I am not getting a response from the card:
wOption = 8000
pTxBuffer = 70004000
status = 0 (PH_ERR_SUCCESS)
But next:
wOption = 4000
pTxBuffer = 0
status = 0x0201 (PH_ERR_IO_TIMEOUT)

In other words, I don't get the RndB number from the card

0 Kudos

4,967 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hello @Serhii ,

 

Thanks for the sharing! Looks like the SL3 authentication command was not issued at the right state, did you also download the full version of data sheet for Mifare plus? It contains the flow for authentication under SL3. Please kindly refer to the following for details.

mfp data sheet.png

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

4,961 Views
Serhii
Contributor II

Hi @Kan_Li,

Thanks for the reply, can you tell me the path to this file because a search on docstore gives no results.

0 Kudos

4,949 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hello @Serhii ,

 

The path to this file is "MIFARE ICs > MIFARE Plus > Product Description", but if you still can not find it, you may have to request a higher access right.

 

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

4,947 Views
Serhii
Contributor II

I have a high level of access, but I don't have this "MIFARE ICs > MIFARE Plus > Product Description" path, I don't have a "MIFARE Plus" section in "MIFARE ICs"

Serhii_0-1612860577955.png

I only have "MIFARE Plus EV2" but it does not have the file you told me.

If such a path exists and the "HIGH" access level is not enough, what do I need to do to raise my access level even higher and get the file I want?

0 Kudos

4,944 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hello @Serhii ,

 

From the path of "MIFARE ICs -> MIFARE Plus EV2 -> Product description", you may still find the full version of data sheet, select the category of "Product data sheet" which can also be used as a reference.

 

Hope that helps,

 

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

4,941 Views
Serhii
Contributor II

I can ask you to send me this file (Ds163735) by private message. I have a signed NDA. Because reading "Ds522332 - MF1 P(H)X2 - MIFARE Plus EV2 (3.2)" that you told me about does not give me full understanding of what I am doing wrong. I have the Level 3 and Level 4 protocol activation successfully activated, but I cannot authenticate to SL3 to gain access to read the card.

0 Kudos

4,857 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hello @Serhii ,

 

I just replied your private message.

 

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

4,669 Views
Viktor_
Contributor I

Have the same problem - can't find Ds163735 document (only ds522332).

0 Kudos

4,658 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @Viktor_ ,

 

You have to sign NDA at first and then request a higher access right from the doc store.

 

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

4,648 Views
Viktor_
Contributor I

I have already signed the NDA.

And have "High" access rights (full access) on docstore. See the attached files.

 

 

0 Kudos