NXP Reader Library  v17.1.0.2535
Commands_ApplicationLevel

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

Collaboration diagram for Commands_ApplicationLevel:

Modules

 Defines
 These are definitions for phalMfdf_CreateValueFile.
 

Functions

phStatus_t phalMfdf_GetFileIDs (void *pDataParams, uint8_t *pFid, uint8_t *bNumFid)
 Returns the file IDs of all active files within the currently selected application. More...
 
phStatus_t phalMfdf_GetISOFileIDs (void *pDataParams, uint8_t *pFidBuffer, uint8_t *bNumFid)
 Get the ISO File IDs. More...
 
phStatus_t phalMfdf_GetFileSettings (void *pDataParams, uint8_t bFileNo, uint8_t *pFSBuffer, uint8_t *bBufferLen)
 Get informtion on the properties of a specific file. More...
 
phStatus_t phalMfdf_CreateStdDataFile (void *pDataParams, uint8_t bOption, uint8_t bFileNo, uint8_t *pISOFileId, uint8_t bCommSett, uint8_t *pAccessRights, uint8_t *pFileSize)
 Creates files for storage of plain unformatted user data within an existing application on the PICC. More...
 
phStatus_t phalMfdf_CreateBackupDataFile (void *pDataParams, uint8_t bOption, uint8_t bFileNo, uint8_t *pISOFileId, uint8_t bCommSett, uint8_t *pAccessRights, uint8_t *pFileSize)
 Creates files for the storage of plain unformatted user data within an existing application, additionally supporting the feature of an integrated backup mechanism. More...
 
phStatus_t phalMfdf_CreateValueFile (void *pDataParams, uint8_t bFileNo, uint8_t bCommSett, uint8_t *pAccessRights, uint8_t *pLowerLmit, uint8_t *pUpperLmit, uint8_t *pValue, uint8_t bLimitedCredit)
 Creates files for the storage and manipulation of 32bit signed integer values within an existing application on the PICC. More...
 
phStatus_t phalMfdf_CreateLinearRecordFile (void *pDataParams, uint8_t bOption, uint8_t bFileNo, uint8_t *pISOFileId, uint8_t bCommSett, uint8_t *pAccessRights, uint8_t *pRecordSize, uint8_t *pMaxNoOfRec)
 Creates files for multiple storage of structural similar data, for example for layalty programs within an existing application. More...
 
phStatus_t phalMfdf_CreateCyclicRecordFile (void *pDataParams, uint8_t bOption, uint8_t bFileNo, uint8_t *pISOFileId, uint8_t bCommSett, uint8_t *pAccessRights, uint8_t *pRecordSize, uint8_t *pMaxNoOfRec)
 Creates files for multiple storage of structural similar data, for example for logging transactions, within an existing application. More...
 
phStatus_t phalMfdf_DeleteFile (void *pDataParams, uint8_t bFileNo)
 Permanently deactivates a file within the file directory of the currently selected application. More...
 

Detailed Description

These Components implement the MIFARE DESFire Application level commands.

Function Documentation

◆ phalMfdf_GetFileIDs()

phStatus_t phalMfdf_GetFileIDs ( void *  pDataParams,
uint8_t pFid,
uint8_t bNumFid 
)

Returns the file IDs of all active files within the currently selected application.

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]pFid[Out] The buffer containing the available file ID(s). Buffer should be 32 bytes.
[out]bNumFid[Out] The length of bytes available in Fid buffer.

◆ phalMfdf_GetISOFileIDs()

phStatus_t phalMfdf_GetISOFileIDs ( void *  pDataParams,
uint8_t pFidBuffer,
uint8_t bNumFid 
)

Get the ISO File IDs.

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]pFidBuffer[Out] The buffer containing the available ISO file ID(s). Buffer should be 64 bytes.
[out]bNumFid[Out] The number of ISO File ID's read.

◆ phalMfdf_GetFileSettings()

phStatus_t phalMfdf_GetFileSettings ( void *  pDataParams,
uint8_t  bFileNo,
uint8_t pFSBuffer,
uint8_t bBufferLen 
)

Get informtion on the properties of a specific file.

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]bFileNo[In] The file number for which the setting to be retrieved.
[out]pFSBuffer[Out] The buffer containing the settings. The buffer should 17 bytes.
[out]bBufferLen[Out] The length of bytes available in FSBuffer buffer.

◆ phalMfdf_CreateStdDataFile()

phStatus_t phalMfdf_CreateStdDataFile ( void *  pDataParams,
uint8_t  bOption,
uint8_t  bFileNo,
uint8_t pISOFileId,
uint8_t  bCommSett,
uint8_t pAccessRights,
uint8_t pFileSize 
)

Creates files for storage of plain unformatted user data within an existing application 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]bFileNo[In] The file number to be created.
[in]pISOFileId[In] The ISO File number to be applied.
[in]bCommSett[In] Communication settings for the file.
[in]pAccessRights[In] The new access right to be applied for the file. Should be 2 byte.
[in]pFileSize[In] The size of the file. Will be of 3 bytes with LSB first. If size 0x10 need to be created then the FileSize will be 10 00 00.

◆ phalMfdf_CreateBackupDataFile()

phStatus_t phalMfdf_CreateBackupDataFile ( void *  pDataParams,
uint8_t  bOption,
uint8_t  bFileNo,
uint8_t pISOFileId,
uint8_t  bCommSett,
uint8_t pAccessRights,
uint8_t pFileSize 
)

Creates files for the storage of plain unformatted user data within an existing application, additionally supporting the feature of an integrated backup mechanism.

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]bFileNo[In] The file number to be created.
[in]pISOFileId[In] The ISO File number to be applied.
[in]bCommSett[In] Communication settings for the file.
[in]pAccessRights[In] The new access right to be applied for the file. Should be 2 byte.
[in]pFileSize[In] The size of the file. Will be of 3 bytes with LSB first. If size 0x10 need to be created then the FileSize will be 10 00 00.

◆ phalMfdf_CreateValueFile()

phStatus_t phalMfdf_CreateValueFile ( void *  pDataParams,
uint8_t  bFileNo,
uint8_t  bCommSett,
uint8_t pAccessRights,
uint8_t pLowerLmit,
uint8_t pUpperLmit,
uint8_t pValue,
uint8_t  bLimitedCredit 
)

Creates files for the storage and manipulation of 32bit signed integer values within an existing application on the PICC.

User provides the entire information in the ValInfo buffer.

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]bFileNo[In] The file number to be created.
[in]bCommSett[In] Communication settings for the file.
[in]pAccessRights[In] The new access right to be applied for the file. Should be 2 byte.
[in]pLowerLmit[In] The lower limit for the file. Will be of 4 bytes with LSB first. If size 0x10 need to be created then the value will be 10 00 00 00.
[in]pUpperLmit[In] The upper limit for the file. Will be of 4 bytes with LSB first. If size 0x20 need to be created then the value will be 20 00 00 00.
[in]pValue[In] The initial value. Will be of 4 bytes with LSB first. If size 0x10 need to be created then the value will be 10 00 00 00.
[in]bLimitedCredit[In] One of the below values.

◆ phalMfdf_CreateLinearRecordFile()

phStatus_t phalMfdf_CreateLinearRecordFile ( void *  pDataParams,
uint8_t  bOption,
uint8_t  bFileNo,
uint8_t pISOFileId,
uint8_t  bCommSett,
uint8_t pAccessRights,
uint8_t pRecordSize,
uint8_t pMaxNoOfRec 
)

Creates files for multiple storage of structural similar data, for example for layalty programs within an existing application.

Once the file is filled, further writing is not possible unless it is cleared.

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]bFileNo[In] The file number to be created.
[in]pISOFileId[In] The ISO File number to be applied.
[in]bCommSett[In] Communication settings for the file.
[in]pAccessRights[In] The new access right to be applied for the file. Should be 2 byte.
[in]pRecordSize[In] The size of the file. Will be of 3 bytes with LSB first. If size 0x10 need to be created then the RecordSize will be 10 00 00.
[in]pMaxNoOfRec[In] The maximum number of record in the file. Will be of 3 bytes with LSB first. If size 0x04 need to be created then the value will be 04 00 00.

◆ phalMfdf_CreateCyclicRecordFile()

phStatus_t phalMfdf_CreateCyclicRecordFile ( void *  pDataParams,
uint8_t  bOption,
uint8_t  bFileNo,
uint8_t pISOFileId,
uint8_t  bCommSett,
uint8_t pAccessRights,
uint8_t pRecordSize,
uint8_t pMaxNoOfRec 
)

Creates files for multiple storage of structural similar data, for example for logging transactions, within an existing application.

Once the file is filled, the PICC automatically overwrites the oldest record with the latest written one.

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]bFileNo[In] The file number to be created.
[in]pISOFileId[In] The ISO File number to be applied.
[in]bCommSett[In] Communication settings for the file.
[in]pAccessRights[In] The new access right to be applied for the file. Should be 2 byte.
[in]pRecordSize[In] The size of the file. Will be of 3 bytes with LSB first. If size 0x10 need to be created then the RecordSize will be 10 00 00.
[in]pMaxNoOfRec[In] The maximum number of record in the file. Will be of 3 bytes with LSB first. If size 0x04 need to be created then the value will be 04 00 00.

◆ phalMfdf_DeleteFile()

phStatus_t phalMfdf_DeleteFile ( void *  pDataParams,
uint8_t  bFileNo 
)

Permanently deactivates a file within the file directory of the currently selected application.

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]bFileNo[In] The file number to be deleted.