NXP Reader Library  v17.1.0.2535
Commands_ISO7816

Describes about the NTAG X DNA ISO/IEC 7816-4 Standard commands. More...

Collaboration diagram for Commands_ISO7816:

Modules

 Defines
 Macro Definitions for ISO/IEC 7816-4 Standard commands.
 

Functions

phStatus_t phalNtagXDna_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 *pFCILen)
 Perform File or Application selection. More...
 
phStatus_t phalNtagXDna_IsoReadBinary (void *pDataParams, uint16_t wOption, uint8_t bOffset, uint8_t bSfid, uint32_t dwBytesToRead, uint8_t bExtendedLenApdu, uint8_t **ppResponse, uint16_t *pRspLen)
 Perform ISO Read Binary. More...
 
phStatus_t phalNtagXDna_IsoUpdateBinary (void *pDataParams, uint8_t bOffset, uint8_t bSfid, uint8_t bExtendedLenApdu, uint8_t *pData, uint16_t wDataLen)
 Perform ISO Update Binary. More...
 

Detailed Description

Describes about the NTAG X DNA ISO/IEC 7816-4 Standard commands.

Function Documentation

◆ phalNtagXDna_IsoSelectFile()

phStatus_t phalNtagXDna_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 pFCILen 
)

Perform File or Application selection.

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

Note
For all ISO7816 errors, library returns a command error code ISO7816 General Errors. To know the exact error returned by tag call Get Config with Additional Information as Configuration Identifier.
Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_INVALID_DATA_PARAMSIf DataParams is null.
PH_ERR_INVALID_PARAMETER
  • If the buffers are null.
  • DFName Length is greater than 16 (bDFnameLen).
  • Invalid FCI (File Control Identifier) (bOption)
  • Invalid Selector option (bSelector).
PHAL_NTAGXDNA_ERR_DF_7816_GEN_ERRORAny ISO7816 Error.
XXXX
  • Depending on status codes return by tag.
  • Other Depending 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 bSelector = DF Name.
  • NULL for other bSelector options.
[in]bDFnameLen[In] Length of bytes available in pDFname buffer.
[in]bExtendedLenApdu[In] Flag for Extended Length APDU.
[out]ppFCI[Out] The FCI information returned by the tag.
[out]pFCILen[Out] Length of bytes available in ppFCI buffer.

◆ phalNtagXDna_IsoReadBinary()

phStatus_t phalNtagXDna_IsoReadBinary ( void *  pDataParams,
uint16_t  wOption,
uint8_t  bOffset,
uint8_t  bSfid,
uint32_t  dwBytesToRead,
uint8_t  bExtendedLenApdu,
uint8_t **  ppResponse,
uint16_t pRspLen 
)

Perform ISO Read Binary.

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

Note
For all ISO7816 errors, library returns a command error code ISO7816 General Errors. To know the exact error returned by tag call Get Config with Additional Information as Configuration Identifier.
Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_INVALID_DATA_PARAMSIf DataParams is null.
PH_ERR_INVALID_PARAMETER
  • If the buffer is null.
  • For invalid Short File identifier (bSfid).
  • For Invalid Buffering Options (wOption).
PHAL_NTAGXDNA_ERR_DF_7816_GEN_ERRORAny ISO7816 Error.
XXXX
  • Depending on status codes return by tag.
  • Other Depending 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.
Regardless of bSfid value, the encoding of offset will be from 0 - 255. This will be part of P2 information.
[in]bSfid[In] Indication to use either Short ISO File Id or Offset.
  • If Short File Identifier, then bit 7 is set and bits 0-4indicates short file identifier.
  • If Short File Identifier, then bits 0-6 indicates MSB of offset information.
  • This will be part of P1 information.
  • Ex. If actual Offset = 8063 (1F7F), then bSfid will be 1F and bOffset will be 7F.
[in]dwBytesToRead[In] The number of bytes to be read from the file.
  • If zero is provided, then entire file data is returned by tag.
  • If non-zero is provided, then data starting from offset is returned.
[in]bExtendedLenApdu[In] Flag for Extended Length APDU.
[out]ppResponse[Out] The data returned by the tag.
[out]pRspLen[Out] Length of bytes available in ppResponse buffer.

◆ phalNtagXDna_IsoUpdateBinary()

phStatus_t phalNtagXDna_IsoUpdateBinary ( void *  pDataParams,
uint8_t  bOffset,
uint8_t  bSfid,
uint8_t  bExtendedLenApdu,
uint8_t pData,
uint16_t  wDataLen 
)

Perform ISO Update Binary.

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

Note
For all ISO7816 errors, library returns a command error code ISO7816 General Errors. To know the exact error returned by tag call Get Config with Additional Information as Configuration Identifier.
Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_INVALID_DATA_PARAMSIf DataParams is null.
PH_ERR_INVALID_PARAMETER
  • If the buffer is null.
  • For invalid Short File identifier (bSfid).
PHAL_NTAGXDNA_ERR_DF_7816_GEN_ERRORAny ISO7816 Error.
XXXX
  • Depending on status codes return by tag.
  • Other Depending 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.
Regardless of bSfid value, the encoding of offset will be from 0 - 255. This will be part of P2 information.
[in]bSfid[In] Indication to use either Short ISO File Id or Offset.
  • If Short File Identifier, then bit 7 is set and bits 0-4indicates short file identifier.
  • If Short File Identifier, then bits 0-6 indicates MSB of offset information.
  • This will be part of P1 information.
  • Ex. If actual Offset = 8063 (1F7F), then bSfid will be 1F and bOffset will be 7F.
[in]bExtendedLenApdu[In] Flag for Extended Length APDU.
[in]pData[In] Data to be updated.
[in]wDataLen[In] Length of bytes available in pData buffer.