NXP Reader Library  v17.1.0.2535
Commands_FileManagement

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

Collaboration diagram for Commands_FileManagement:

Functions

phStatus_t phalMfNtag42XDna_GetFileSettings (void *pDataParams, uint8_t bFileNo, uint8_t *pFSBuffer, uint8_t *bBufferLen)
 Get informtion on the properties of a specific file. More...
 
phStatus_t phalMfNtag42XDna_GetFileCounters (void *pDataParams, uint8_t bOption, uint8_t bFileNo, uint8_t *pFileCounters, uint8_t *pRxLen)
 Returns manufacturing related data of the PICC. More...
 
phStatus_t phalMfNtag42XDna_ChangeFileSettings (void *pDataParams, uint8_t bCommMode, uint8_t bFileNo, uint8_t bFileOption, uint8_t *pAccessRights, uint8_t bAdditionalInfoLen, uint8_t *bAdditionalInfo)
 Changes the access parameters of an existing file. More...
 
phStatus_t phalMfNtag42XDna_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 *pPICCDataOffset, uint8_t *pTTPermStatusOffset, uint8_t *pSDMMACInputOffset, uint8_t *pSDMENCOffset, uint8_t *pSDMENCLen, uint8_t *pSDMMACOffset, uint8_t *pSDMReadCtrLimit)
 Changes the access parameters of an existing file. More...
 

The File option and other flags for ChangeFileSettings command.

#define PHAL_MFNTAG42XDNA_FILE_OPTION_PLAIN   0x00U
 Plain mode of communication.
 
#define PHAL_MFNTAG42XDNA_FILE_OPTION_PLAIN_1   0x02U
 Plain mode of communication.
 
#define PHAL_MFNTAG42XDNA_FILE_OPTION_MACD   0x01U
 MAC mode of communication.
 
#define PHAL_MFNTAG42XDNA_FILE_OPTION_ENC   0x03U
 Enciphered mode of communication.
 
#define PHAL_MFNTAG42XDNA_SDM_ENABLED   0x40u
 Secure Dynamic Messaging and Mirroring is enabled.
 
#define PHAL_MFNTAG42XDNA_VCUID_PRESENT   0x80U
 Only VCUID is considred for SDM MAC calculation.
 
#define PHAL_MFNTAG42XDNA_RDCTR_PRESENT   0x40U
 Only RDCTR is considred for SDM MAC calculation.
 
#define PHAL_MFNTAG42XDNA_RDCTR_LIMIT_PRESENT   0x20U
 Indicates the presence of SDM Read Counter Limit.
 
#define PHAL_MFNTAG42XDNA_SDM_ENC_FILE_DATA_PRESENT   0x10U
 Indicates the presence of SDM ENC File data.
 
#define PHAL_MFNTAG42XDNA_SDM_TT_STATUS_PRESENT   0x08U
 Indicates the presence of SDM TT Status.
 
#define PHAL_MFNTAG42XDNA_SDM_ENCODING_MODE_ASCII   0x01U
 Indicates the encoding as ASCII.
 
#define PHAL_MFNTAG42XDNA_SPECIFICS_ENABLED   0x01u
 MF NTAG 42xDNA Specific feature to be used.
 

Detailed Description

These Components implement the MIFARE NTAG 42xDNA File Management related commands.

Function Documentation

◆ phalMfNtag42XDna_GetFileSettings()

phStatus_t phalMfNtag42XDna_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.

◆ phalMfNtag42XDna_GetFileCounters()

phStatus_t phalMfNtag42XDna_GetFileCounters ( 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.

◆ phalMfNtag42XDna_ChangeFileSettings()

phStatus_t phalMfNtag42XDna_ChangeFileSettings ( void *  pDataParams,
uint8_t  bCommMode,
uint8_t  bFileNo,
uint8_t  bFileOption,
uint8_t pAccessRights,
uint8_t  bAdditionalInfoLen,
uint8_t bAdditionalInfo 
)

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]bCommMode[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]bAdditionalInfoLen[In] Length of the Additional Info to be sent (2 Bytes or 4 Bytes). This is used to set TMC Limit in case of TMAC File
[in]bAdditionalInfo[In] One of the below inforamtion.
If Standard AES: 4 byte TMC Limit value.
If LRP : 2 byte TMC Limit value.

◆ phalMfNtag42XDna_ChangeFileSettingsSDM()

phStatus_t phalMfNtag42XDna_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 pPICCDataOffset,
uint8_t pTTPermStatusOffset,
uint8_t pSDMMACInputOffset,
uint8_t pSDMENCOffset,
uint8_t pSDMENCLen,
uint8_t pSDMMACOffset,
uint8_t pSDMReadCtrLimit 
)

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] SDMReadCtr value (LSB first). Should be 3 bytes.
[in]pPICCDataOffset[In] Mirror position (LSB first) for encrypted PICCData. Should be 3 bytes.
[in]pTTPermStatusOffset[In] Tag Tamper Permanent Status Offset value. Should be 3 bytes.
[in]pSDMMACInputOffset[In] Offset in the file where the SDM MAC computation starts (LSB first). Should be 3 bytes.
[in]pSDMENCOffset[In] SDMENCFileData mirror position (LSB first). Should be 3 bytes.
[in]pSDMENCLen[In] Length of the SDMENCFileData (LSB first). Should be 3 bytes.
[in]pSDMMACOffset[In] SDMMAC mirror position (LSB first). Should be 3 bytes.
[in]pSDMReadCtrLimit[In] SDM Read Counter Limit value. Should be 3 bytes.