NXP Reader Library  v17.1.0.2535

These Components implement the MIFARE NTAG 42xDNA ISO/IEC 7816-4 Basic commands. More...

Collaboration diagram for Commands_ISO7816:

Functions

phStatus_t phalMfNtag42XDna_IsoSelectFile (void *pDataParams, uint8_t bOption, uint8_t bSelector, uint8_t *pFid, uint8_t *pDFname, uint8_t bDFnameLen, uint8_t bExtendedLenApdu, uint8_t **ppFCI, uint16_t *pwFCILen)
 ISO Select. More...
 
phStatus_t phalMfNtag42XDna_IsoReadBinary (void *pDataParams, uint16_t wOption, uint8_t bOffset, uint8_t bSfid, uint32_t dwBytesToRead, uint8_t bExtendedLenApdu, uint8_t **ppRxBuffer, uint32_t *pBytesRead)
 ISO Read Binary. More...
 
phStatus_t phalMfNtag42XDna_IsoUpdateBinary (void *pDataParams, uint8_t bOffset, uint8_t bSfid, uint8_t bExtendedLenApdu, uint8_t *pData, uint32_t dwDataLen)
 Iso Update Binary. More...
 

Options for ISOSelectFile command.

#define PHAL_MFNTAG42XDNA_FCI_RETURNED   0x00U
 Option to indicate the return of FCI.
 
#define PHAL_MFNTAG42XDNA_FCI_NOT_RETURNED   0x0CU
 Option to indicate the no return of FCI.
 
#define PHAL_MFNTAG42XDNA_SELECTOR_0   0x00U
 Option to indicate Selection by 2 byte file Id.
 
#define PHAL_MFNTAG42XDNA_SELECTOR_1   0x01U
 Option to indicate Selection by child DF.
 
#define PHAL_MFNTAG42XDNA_SELECTOR_2   0x02U
 Option to indicate Select EF under current DF. More...
 
#define PHAL_MFNTAG42XDNA_SELECTOR_3   0x03U
 Option to indicate Select parent DF of the current DF.
 
#define PHAL_MFNTAG42XDNA_SELECTOR_4   0x04U
 Option to indicate Selection by DF Name. More...
 

Detailed Description

These Components implement the MIFARE NTAG 42xDNA ISO/IEC 7816-4 Basic commands.

Macro Definition Documentation

◆ PHAL_MFNTAG42XDNA_SELECTOR_2

#define PHAL_MFNTAG42XDNA_SELECTOR_2   0x02U

Option to indicate Select EF under current DF.

Fid = EF id.

◆ PHAL_MFNTAG42XDNA_SELECTOR_4

#define PHAL_MFNTAG42XDNA_SELECTOR_4   0x04U

Option to indicate Selection by DF Name.

DFName and len is then valid.

Function Documentation

◆ phalMfNtag42XDna_IsoSelectFile()

phStatus_t phalMfNtag42XDna_IsoSelectFile ( void *  pDataParams,
uint8_t  bOption,
uint8_t  bSelector,
uint8_t pFid,
uint8_t pDFname,
uint8_t  bDFnameLen,
uint8_t  bExtendedLenApdu,
uint8_t **  ppFCI,
uint16_t pwFCILen 
)

ISO Select.

This command is implemented in compliance with ISO/IEC 7816-4.

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 for return / no return of FCI.
[in]bSelector[In] The selector to be used.
[in]pFid[In] The ISO File number to be selected.
[in]pDFname[In] The ISO DFName to be selected. Valid only when bOption = 0x04.
[in]bDFnameLen[In] Length of bytes available in DFname buffer.
[in]bExtendedLenApdu[In] Flag for Extended Length APDU. This should be always cleared
[out]ppFCI[Out] The FCI information returned by the PICC.
[out]pwFCILen[Out] Length of bytes available in FCI buffer.

◆ phalMfNtag42XDna_IsoReadBinary()

phStatus_t phalMfNtag42XDna_IsoReadBinary ( void *  pDataParams,
uint16_t  wOption,
uint8_t  bOffset,
uint8_t  bSfid,
uint32_t  dwBytesToRead,
uint8_t  bExtendedLenApdu,
uint8_t **  ppRxBuffer,
uint32_t pBytesRead 
)

ISO Read Binary.

This command is implemented in compliance with ISO/IEC 7816-4.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_SUCCESS_CHAININGoperation success with chaining.
OtherDepending on implementation and underlying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]wOption[In] One of the below options.
[in]bOffset[In] The offset from where the data should be read.
[in]bSfid[In] Short ISO File Id. Bit 7 should be 1 to indicate Sfid is supplied. Else it is treated as MSB of 2Byte offset.
[in]dwBytesToRead[In] Number of bytes to read. If 0, then entire file to be read.
[in]bExtendedLenApdu[In] Flag for Extended Length APDU. This should be always cleared
[out]ppRxBuffer[Out] The data retuned by the PICC.
[out]pBytesRead[Out] Length of bytes available in RxData buffer.

◆ phalMfNtag42XDna_IsoUpdateBinary()

phStatus_t phalMfNtag42XDna_IsoUpdateBinary ( void *  pDataParams,
uint8_t  bOffset,
uint8_t  bSfid,
uint8_t  bExtendedLenApdu,
uint8_t pData,
uint32_t  dwDataLen 
)

Iso Update Binary.

This command is implemented in compliance with ISO/IEC 7816-4.

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]bOffset[In] The offset from where the data should be updated.
[in]bSfid[In] Short ISO File Id. Bit 7 should be 1 to indicate Sfid is supplied. Else it is treated as MSB of 2Byte offset.
[in]bExtendedLenApdu[In] Flag for Extended Length APDU. This should be always cleared
[in]pData[In] Data to be updated.
[in]dwDataLen[In] Length of bytes available in Data buffer.