NXP Reader Library  v17.1.0.2535
Commands_FileManagement

These Components implement the MIFARE PRIME NTAG File Management related commands. More...

Collaboration diagram for Commands_FileManagement:

Functions

phStatus_t phalMfprimeNtag_GetFileSettings (void *pDataParams, uint8_t bFileNo, uint8_t *pFSBuffer, uint8_t *bBufferLen)
 Get informtion on the properties of a specific file. More...
 
phStatus_t phalMfprimeNtag_GetFileCountersSDM (void *pDataParams, uint8_t bOption, uint8_t bFileNo, uint8_t *pFileCounters, uint8_t *pRxLen)
 Returns manufacturing related data of the PICC. More...
 
phStatus_t phalMfprimeNtag_ChangeFileSettings (void *pDataParams, uint8_t bOption, uint8_t bFileNo, uint8_t bCommSett, uint8_t *pAccessRights, uint8_t bNumAddARs, uint8_t *pAddARs)
 Changes the access parameters of an existing file. More...
 
phStatus_t phalMfprimeNtag_ChangeFileSettingsSDM (void *pDataParams, uint8_t bOption, uint8_t bFileNo, uint8_t bFileOption, uint8_t *pAccessRights, uint8_t bSdmOptions, uint8_t *pSdmAccessRights, uint8_t *pVCUIDOffset, uint8_t *pSDMReadCtrOffset, uint8_t *pSDMMACInputOffset, uint8_t *pSDMMACOffset)
 Changes the access parameters of an existing file. More...
 

The File option and other flags for ChangeFileSettings command.

#define PHAL_MFPRIMENTAG_FILE_OPTION_PLAIN   0x00U
 Plain mode of communication.
 
#define PHAL_MFPRIMENTAG_FILE_OPTION_MACD   0x01U
 MAC mode of communication.
 
#define PHAL_MFPRIMENTAG_FILE_OPTION_ENC   0x03U
 Enciphered mode of communication.
 
#define PHAL_MFPRIMENTAG_SDM_ENABLED   0x40u
 Secure Dynamic Messaging and Mirroring is enabled.
 
#define PHAL_MFPRIMENTAG_VCUID_PRESENT   0x01U
 Only VCUID is considred for SDM MAC calculation.
 
#define PHAL_MFPRIMENTAG_RDCTR_PRESENT   0x02U
 Only RDCTR is considred for SDM MAC calculation.
 
#define PHAL_MFPRIMENTAG_ENCODING_MODE_ASCII   0x01U
 Indicated the encoding mode as ASCII.
 

Detailed Description

These Components implement the MIFARE PRIME NTAG File Management related commands.

Function Documentation

◆ phalMfprimeNtag_GetFileSettings()

phStatus_t phalMfprimeNtag_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 be 17 bytes.
[out]bBufferLen[Out] The length of bytes available in FSBuffer buffer.

◆ phalMfprimeNtag_GetFileCountersSDM()

phStatus_t phalMfprimeNtag_GetFileCountersSDM ( void *  pDataParams,
uint8_t  bOption,
uint8_t  bFileNo,
uint8_t pFileCounters,
uint8_t pRxLen 
)

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.
[in]bOption[In] Indicates the mode of communication to be used while exchanging the data to PICC.
[in]bFileNo[In] File number for which the Counter information need to be received.
[out]pFileCounters[Out] The SDMReadCounter information returned by the PICC.
[out]pRxLen[Out] Length of bytes available in FileCounters buffer.

◆ phalMfprimeNtag_ChangeFileSettings()

phStatus_t phalMfprimeNtag_ChangeFileSettings ( void *  pDataParams,
uint8_t  bOption,
uint8_t  bFileNo,
uint8_t  bCommSett,
uint8_t pAccessRights,
uint8_t  bNumAddARs,
uint8_t pAddARs 
)

Changes the access parameters of an existing 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]bOption[In] Indicates the mode of communication to be used while exchanging the data to PICC.
[in]bFileNo[In] File number for which the setting need to be updated.
[in]bCommSett[In] New communication settings for the file.
[in]pAccessRights[In] The new access right to be applied for the file. Should be 2 byte.
[in]bNumAddARs[In] Length of additional Access Rights.
[in]pAddARs[In] The Additional Access Rights information. Should be 2 * NumAddARs.

◆ phalMfprimeNtag_ChangeFileSettingsSDM()

phStatus_t phalMfprimeNtag_ChangeFileSettingsSDM ( void *  pDataParams,
uint8_t  bOption,
uint8_t  bFileNo,
uint8_t  bFileOption,
uint8_t pAccessRights,
uint8_t  bSdmOptions,
uint8_t pSdmAccessRights,
uint8_t pVCUIDOffset,
uint8_t pSDMReadCtrOffset,
uint8_t pSDMMACInputOffset,
uint8_t pSDMMACOffset 
)

Changes the access parameters of an existing 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]bOption[In] Indicates the mode of communication to be used while exchanging the data to PICC.
[in]bFileNo[In] File number for which the setting need to be updated.
[in]bFileOption[In] New communication settings for the file.
[in]pAccessRights[In] The new access right to be applied for the file. Should be 2 byte.
[in]bSdmOptions[In] One of the below values to be used. Can be ORed.
[in]pSdmAccessRights[In] The SDM access rights to be applied. Should be 2 bytes.
[in]pVCUIDOffset[In] VCUID Offset information. Should be 3 bytes.
[in]pSDMReadCtrOffset[In] SDMReadCtrLimit value (LSB first). Should be 3 bytes.
[in]pSDMMACInputOffset[In] Offset in the file where the SDM MAC computation starts (LSB first). Should be 3 bytes.
[in]pSDMMACOffset[In] SDMMAC mirror position (LSB first). Should be 3 bytes.