Problem with Mifare Desfire EV1

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

Problem with Mifare Desfire EV1

4,564 Views
marcinbaliniak
Contributor II

Hi,

I've just tried to implement basic access to Desfire EV1 tags and later to the EV2. 

I've modified one of examples and also added some functions to interact with EV1 tag but function phalMfdf_CreateApplication() fails with status:

Error - (0x1988) has occurred : 0xCCEE CC-Component ID, EE-Error code. Refer-ph_Status.h

I can't find description about this status in ph_Status.h so don't know what is the problem.

Here is part of the code, Init and version read are OK.

/* Initialize the MF DesFire EV1 component */
status = phalMfdf_Sw_Init(&alMfdf, /**< [In] Pointer to this layer's parameter structure */
sizeof(phalMfdf_Sw_DataParams_t), /**< [In] Specifies the size of the data parameter structure */
&palMifare_Sw, /**< [In] Pointer to a palMifare component context */
NULL, /**< [In] Pointer to Key Store data parameters */
NULL, /**< [In] Pointer to a Crypto component context for encryption */
NULL, /**< [In] Pointer to a CryptoRng component context */
pHal); /**< [In] Pointer to the HAL parameters structure */
CHECK_SUCCESS(status);

status = phalMfdf_Sw_GetVersion(&alMfdf,
pVersion);

CHECK_SUCCESS(status);

DEBUG_PRINTF("Version info:\n\t");
phApp_Print_Buff( pVersion, 7);
DEBUG_PRINTF("\n\t");
phApp_Print_Buff( pVersion+7, 7);
DEBUG_PRINTF("\n\t");
phApp_Print_Buff( pVersion+14, 14);

/* Create Application */
status = phalMfdf_CreateApplication(&alMfdf, /**< [In] Pointer to parameters data structure */
0x03, /**< [In] Option to indicate whether this application has ISO Fid and DF */
aAID, /**< [In] 3 byte AID, LSB First */
0x0F, /**< [In] Key Settings 1 - 1 Byte */
0x21, /**< [In] Key Settings 2 - 1 Byte */
aISOFileId_A, /**< [In] Two byte ISO File Id, LSB First */
aISODFName, /**< [In] ISO DF Name. Maximum 16 bytes */
bDFLen); /**< [In] Length of DF Name provided above */
CHECK_SUCCESS(status);

I have also question about access to full NXPLib with sources and examples for EV1 and EV2. I've found information that is available under NDA. Our company already signed NDA nad we have an access to docstore, but I can't find full NXPLib there. I have full access to PN5180 chip but can't find NXPlib + EV1/EV2 support. How and where I can find this sources?

BR,

Marcin.

Tags (4)
0 Kudos
Reply
3 Replies

3,913 Views
marcinbaliniak
Contributor II

Ok, I've found answer about error code 0x1988 - application already exists. But Second question is still valid.

I also have a question about functions for Desfire cards. I found that only basics commands are implemented (create app/file, etc) but can't find functions like authorize, format card etc. Does it come with NDA sources or should be implemented by the user.

0 Kudos
Reply

3,913 Views
marcinbaliniak
Contributor II

Sorry for another post, but didn't get any answer.

Does the NXP provide additional sources for Desfire EV1 and EV2 under NDA ? I can browse all documents for PN5180 but can't find any additional sources for NXP Lib. In the NXP lib folders I found some information about additional components in CMakeLists.txt like phalMfpEv1, phalMfdfEv2, etc. but can't find it in docstore.

Where I can find this sources ?

BR,

Marcin.

0 Kudos
Reply

3,913 Views
Jonathan_Iglesias
NXP TechSupport
NXP TechSupport

Dear Marcin Baliniak, hope you are doing great, my apologies for the delay in our response, to answer your question about the library please try to look for the Sw352221 in docstore the library is not in the pn5180 but in the PNEV5180 this library is for the evaluation board with the 5180, also you can look for sw440410 or Sw375617 this might be helpful for you working with DESFire, please understand that some information about this might be under NDA all the information under NDA must be shared using secure communication channels or platforms like Docstore. please check the information I sent you.if you have  more questions please let me know.

have a great day!

BR

Jonathan

0 Kudos
Reply