NXP Reader Library  v17.1.0.2535
Commands_ISO7816

Describes about the MIFARE DUOX 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 phalMfDuoX_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 phalMfDuoX_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 phalMfDuoX_IsoUpdateBinary (void *pDataParams, uint8_t bOffset, uint8_t bSfid, uint8_t bExtendedLenApdu, uint8_t *pData, uint16_t wDataLen)
 Perform ISO Update Binary. More...
 
phStatus_t phalMfDuoX_IsoReadRecords (void *pDataParams, uint16_t wOption, uint8_t bRecNo, uint8_t bReadAllRecords, uint8_t bSfid, uint32_t dwBytesToRead, uint8_t bExtendedLenApdu, uint8_t **ppResponse, uint16_t *pRspLen)
 Perform ISO Read Record. More...
 
phStatus_t phalMfDuoX_IsoAppendRecord (void *pDataParams, uint8_t bSfid, uint8_t bExtendedLenApdu, uint8_t *pData, uint16_t wDataLen)
 Perform ISO Append record. More...
 
phStatus_t phalMfDuoX_IsoGetChallenge (void *pDataParams, uint8_t bExpRsp, uint8_t bExtendedLenApdu, uint8_t **ppResponse, uint16_t *pRspLen)
 Perform ISOGetChallenge. More...
 

Detailed Description

Describes about the MIFARE DUOX ISO/IEC 7816-4 Standard commands.

Function Documentation

◆ phalMfDuoX_IsoSelectFile()

phStatus_t phalMfDuoX_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 PICC 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_MFDUOX_ERR_DF_7816_GEN_ERRORAny ISO7816 Error.
XXXX
  • Depending on status codes return by PICC.
  • 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 PICC.
[out]pFCILen[Out] Length of bytes available in ppFCI buffer.

◆ phalMfDuoX_IsoReadBinary()

phStatus_t phalMfDuoX_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 PICC 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_MFDUOX_ERR_DF_7816_GEN_ERRORAny ISO7816 Error.
XXXX
  • Depending on status codes return by PICC.
  • 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 PICC.
  • 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 PICC.
[out]pRspLen[Out] Length of bytes available in ppResponse buffer.

◆ phalMfDuoX_IsoUpdateBinary()

phStatus_t phalMfDuoX_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 PICC 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_MFDUOX_ERR_DF_7816_GEN_ERRORAny ISO7816 Error.
XXXX
  • Depending on status codes return by PICC.
  • 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.

◆ phalMfDuoX_IsoReadRecords()

phStatus_t phalMfDuoX_IsoReadRecords ( void *  pDataParams,
uint16_t  wOption,
uint8_t  bRecNo,
uint8_t  bReadAllRecords,
uint8_t  bSfid,
uint32_t  dwBytesToRead,
uint8_t  bExtendedLenApdu,
uint8_t **  ppResponse,
uint16_t pRspLen 
)

Perform ISO Read Record.

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 PICC 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_MFDUOX_ERR_DF_7816_GEN_ERRORAny ISO7816 Error.
XXXX
  • Depending on status codes return by PICC.
  • 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]bRecNo[In] Record to read / from where to read.
[in]bReadAllRecords[In] Whether to read all records from P1 or just one.
[in]bSfid[In] Indication to use Short ISO File Id. File Identifiers from 0x00 - 0x1F
[in]dwBytesToRead[In] The number of bytes to be read from the file.
  • If zero is provided, then entire file starting from the record specified.
  • If non-zero is provided, then
    • The number of bytes to be read.
    • If bigger than number of bytes available in the file, after subtracting MAC length if MAC is to be returned, the entire data file starting from the offset position is returned. If smaller, this number of bytes is returned (possibly containing partial record).
[in]bExtendedLenApdu[In] Flag for Extended Length APDU.
[out]ppResponse[Out] The data returned by the PICC.
[out]pRspLen[Out] Length of bytes available in ppResponse buffer.

◆ phalMfDuoX_IsoAppendRecord()

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

Perform ISO Append record.

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 PICC 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_MFDUOX_ERR_DF_7816_GEN_ERRORAny ISO7816 Error.
XXXX
  • Depending on status codes return by PICC.
  • Other Depending on implementation and underlying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bSfid[In] Indication to use Short ISO File Id. File Identifiers from 0x00 - 0x1F
[in]bExtendedLenApdu[In] Flag for Extended Length APDU.
[in]pData[In] Data to be appended.
[in]wDataLen[In] Length of bytes available in pData buffer.

◆ phalMfDuoX_IsoGetChallenge()

phStatus_t phalMfDuoX_IsoGetChallenge ( void *  pDataParams,
uint8_t  bExpRsp,
uint8_t  bExtendedLenApdu,
uint8_t **  ppResponse,
uint16_t pRspLen 
)

Perform ISOGetChallenge.

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 PICC 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_PARAMETERIf the buffer is null.
XXXX
  • Depending on status codes return by PICC.
  • Other Depending on implementation and underlying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bExpRsp[In] Length of expected challenge RPICC1.
[in]bExtendedLenApdu[In] Flag for Extended Length APDU.
[out]ppResponse[Out] The data returned by the PICC.
[out]pRspLen[Out] Length of bytes available in ppResponse buffer.