NXP Reader Library  v17.1.0.2535
Commands_TransactionManagement

Describes about the MIFARE DUOX Transaction Management commands. More...

Collaboration diagram for Commands_TransactionManagement:

Modules

 Defines
 Macro Definitions for Transaction Management commands.
 

Functions

phStatus_t phalMfDuoX_CommitTransaction (void *pDataParams, uint8_t bOption, uint8_t **ppTMC, uint16_t *pTMCLen, uint8_t **ppResponse, uint16_t *pRspLen)
 Validates all previous write access on Backup Data files, Value files and Record files within selected application. More...
 
phStatus_t phalMfDuoX_AbortTransaction (void *pDataParams)
 Aborts all previous write accesses on Backup Data files, Value files and Record files within the selected application(s). More...
 
phStatus_t phalMfDuoX_CommitReaderID (void *pDataParams, uint8_t *pTMRI, uint8_t bTMRILen, uint8_t **ppEncTMRI, uint16_t *pEncTMRILen)
 Commits a ReaderID for the ongoing transaction. More...
 

Detailed Description

Describes about the MIFARE DUOX Transaction Management commands.

Function Documentation

◆ phalMfDuoX_CommitTransaction()

phStatus_t phalMfDuoX_CommitTransaction ( void *  pDataParams,
uint8_t  bOption,
uint8_t **  ppTMC,
uint16_t pTMCLen,
uint8_t **  ppResponse,
uint16_t pRspLen 
)

Validates all previous write access on Backup Data files, Value files and Record files within selected application.

If applicable, the TransactionMAC file is updated with the calculated Transaction MAC or Transaction Signature.

Note
  • With respect to command parameter bOption, PICC expects
    • No Option byte in command frame.
    • Option byte with zero as value in command frame along with command code.
    • Option byte with one as value in command frame along with command code.
  • If Option byte is required to be exchanged to PICC along with command code, user needs to pass bOption value with MSB set.
    • If bOption = Option Not Exchanged, only command is exchanged and Option byte is not exchanged to PICC.
    • If bOption = other than Option Not Exchanged,
      • Both command and option bytes are exchanged to PICC.
      • While exchanging the option byte to PICC, the MSB bit is masked out.
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.
  • For Invalid option value. (bOption).
PH_ERR_PROTOCOL_ERRORIf the response is less than 8 bytes for the case when Return of TMC and TMV / TSV is selected.
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] Calculated Transaction MAC/Signature requested on response. Should be one of the below values.
[out]ppTMC[Out] The increased Transaction MAC Counter (TMC) as stored in FileType.TransactionMAC.
[out]pTMCLen[Out] Length of bytes available in ppTMC buffer.
[out]ppResponse[Out] Returns one of the following information based on the functionality that is enabled during TransactionMAC File creation.
  • If Transaction MAC is Enabled, Transaction MAC Value (TMV) will be available.
  • If Transaction Signature is Enabled, Transaction Signature Value (TSV) will be available.
[out]pRspLen[Out] Length of bytes available in ppResponse buffer.

◆ phalMfDuoX_AbortTransaction()

phStatus_t phalMfDuoX_AbortTransaction ( void *  pDataParams)

Aborts all previous write accesses on Backup Data files, Value files and Record files within the selected application(s).

If applicable, the Transaction MAC calculation is aborted.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_INVALID_DATA_PARAMSIf DataParams 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.

◆ phalMfDuoX_CommitReaderID()

phStatus_t phalMfDuoX_CommitReaderID ( void *  pDataParams,
uint8_t pTMRI,
uint8_t  bTMRILen,
uint8_t **  ppEncTMRI,
uint16_t pEncTMRILen 
)

Commits a ReaderID for the ongoing transaction.

This will allow a back-end to identify the attacking merchant in case of fraud detected.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_INVALID_DATA_PARAMSIf DataParams is null.
PH_ERR_INVALID_PARAMETERIf the buffers are 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]pTMRI[In] Transaction MAC ReaderID information.
[in]bTMRILen[In] Length of bytes available in pTMRI buffer.
[out]ppEncTMRI[Out] Encrypted Transaction MAC ReaderID of the latest successful transaction.
[out]pEncTMRILen[Out] Length of bytes available in ppEncTMRI buffer.