NXP Reader Library  v17.1.0.2535

These Components implement the MIFARE DESFire PICC level commands. More...

Collaboration diagram for Commands_PiccLevel:

Modules

 Defines
 These are definitions for phalMfdf_SetConfiguration.
 

Functions

phStatus_t phalMfdf_CreateApplication (void *pDataParams, uint8_t bOption, uint8_t *pAid, uint8_t bKeySettings1, uint8_t bKeySettings2, uint8_t *pISOFileId, uint8_t *pISODFName, uint8_t bISODFNameLen)
 Creates new applications on the PICC. More...
 
phStatus_t phalMfdf_DeleteApplication (void *pDataParams, uint8_t *pAid)
 Permanently deletes the applications on the PICC. More...
 
phStatus_t phalMfdf_GetApplicationIDs (void *pDataParams, uint8_t *pAidBuff, uint8_t *pNumAid)
 Returns application identifiers of all applications on the PICC. More...
 
phStatus_t phalMfdf_GetDFNames (void *pDataParams, uint8_t bOption, uint8_t *pDFBuffer, uint8_t *bDFInfoLen)
 Returns the Dedicated File(DF) names. More...
 
phStatus_t phalMfdf_SelectApplication (void *pDataParams, uint8_t *pAid)
 Selects one particular application on the PICC for further access. More...
 
phStatus_t phalMfdf_FormatPICC (void *pDataParams)
 Releases the PICC user memory. More...
 
phStatus_t phalMfdf_GetVersion (void *pDataParams, uint8_t *pVerInfo)
 Returns manufacturing related data of the PICC. More...
 
phStatus_t phalMfdf_FreeMem (void *pDataParams, uint8_t *pMemInfo)
 Returns free memory available on the PICC. More...
 
phStatus_t phalMfdf_SetConfiguration (void *pDataParams, uint8_t bOption, uint8_t *pData, uint8_t bDataLen)
 Configures the card and pre personalizes the card with a key, defines if the UID or the random ID is sent back during communication setup and configures the ATS string. More...
 
phStatus_t phalMfdf_GetCardUID (void *pDataParams, uint8_t *pUid)
 Returns the Unique ID of the PICC. More...
 

Detailed Description

These Components implement the MIFARE DESFire PICC level commands.

Function Documentation

◆ phalMfdf_CreateApplication()

phStatus_t phalMfdf_CreateApplication ( void *  pDataParams,
uint8_t  bOption,
uint8_t pAid,
uint8_t  bKeySettings1,
uint8_t  bKeySettings2,
uint8_t pISOFileId,
uint8_t pISODFName,
uint8_t  bISODFNameLen 
)

Creates new applications on the PICC.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bOption[In] Option to represent the present of ISO information.
[in]pAid[In] The application identifier to be used. Will be of 3 bytes with LSB first. If application 01 need to be created then the Aid will be 01 00 00.
[in]bKeySettings1[In] Application Key settings.
[in]bKeySettings2[In] Additional key settings.
[in]pISOFileId[In] ISO File ID to be used. Will be two bytes.
[in]pISODFName[In] ISO DF Name to be used. Will be 16 bytes and can also be NULL based on the option.
[in]bISODFNameLen[In] Length of bytes available in ISODFName buffer.

◆ phalMfdf_DeleteApplication()

phStatus_t phalMfdf_DeleteApplication ( void *  pDataParams,
uint8_t pAid 
)

Permanently deletes the applications on the PICC.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]pAid[In] The application identifier to be used. Will be of 3 bytes with LSB first.
If application 01 need to be deleted then the Aid will be 01 00 00.

◆ phalMfdf_GetApplicationIDs()

phStatus_t phalMfdf_GetApplicationIDs ( void *  pDataParams,
uint8_t pAidBuff,
uint8_t pNumAid 
)

Returns application identifiers of all applications on the PICC.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[out]pAidBuff[Out] The available identifiers of the application(s).
[out]pNumAid[Out] The number of available application(s).

◆ phalMfdf_GetDFNames()

phStatus_t phalMfdf_GetDFNames ( void *  pDataParams,
uint8_t  bOption,
uint8_t pDFBuffer,
uint8_t bDFInfoLen 
)

Returns the Dedicated File(DF) names.

Remarks
The pDFBuffer will be filled with 3 byte AID + 2 byte ISO Fid + one DF Name at a time.If there are more DFs, then status PH_ERR_SUCCESS_CHAINING is returned. The caller should call this again with bOption = PH_EXCHANGE_RXCHAINING.

CAUTION: This should not be called with AES or ISO authentication. DOING SO WILL DAMAGE THE DESFIRE Card

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_SUCCESS_CHAININGmore DF Names to be returned.
OtherDepending on implementation and underlying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bOption[In] One of the below options.
[out]pDFBuffer[Out] The ISO information about the application. At a time the information of one application will be returned. The buffer should be 21 (3 + 2 + 16) bytes long.
[out]bDFInfoLen[Out] Length of bytes available in DFBuffer buffer.

◆ phalMfdf_SelectApplication()

phStatus_t phalMfdf_SelectApplication ( void *  pDataParams,
uint8_t pAid 
)

Selects one particular application on the PICC for further access.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]pAid[In] The application identifier to be used. Will be of 3 bytes with LSB first.
If application 01 need to be selected then the Aid will be 01 00 00.

◆ phalMfdf_FormatPICC()

phStatus_t phalMfdf_FormatPICC ( void *  pDataParams)

Releases the PICC user memory.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.

◆ phalMfdf_GetVersion()

phStatus_t phalMfdf_GetVersion ( void *  pDataParams,
uint8_t pVerInfo 
)

Returns manufacturing related data of the PICC.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[out]pVerInfo[Out] The version information of the product.

◆ phalMfdf_FreeMem()

phStatus_t phalMfdf_FreeMem ( void *  pDataParams,
uint8_t pMemInfo 
)

Returns free memory available on the PICC.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[out]pMemInfo[Out] Current free memory available. Will be of 3 bytes with LSB first.

◆ phalMfdf_SetConfiguration()

phStatus_t phalMfdf_SetConfiguration ( void *  pDataParams,
uint8_t  bOption,
uint8_t pData,
uint8_t  bDataLen 
)

Configures the card and pre personalizes the card with a key, defines if the UID or the random ID is sent back during communication setup and configures the ATS string.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bOption[In] Configuration Option. Define length and content of the Data parameter.
[in]pData[In] Data for the option specified.
[in]bDataLen[In] Length of bytes available in Data buffer.

◆ phalMfdf_GetCardUID()

phStatus_t phalMfdf_GetCardUID ( void *  pDataParams,
uint8_t pUid 
)

Returns the Unique ID of the PICC.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[out]pUid[Out] The complete UID of the PICC.