NXP Reader Library  v17.1.0.2535

These Components implement the ISO/IEC 14443-4:2008(E) contactless protocol. More...

Collaboration diagram for ISO/IEC14443-4:

Modules

 Component : Software
 
 Component : Rd710
 
 Component : Android
 
 Component : PCSC
 
 Component : SamAV2_X
 
 Component : SamAV3_X
 

Macros

#define PHPAL_I14443P4_CID_MAX   14
 The last valid CID.
 
#define PHPAL_I14443P4_FWI_MAX   14
 The maximum allowed FWI value.
 
#define PHPAL_I14443P4_FRAMESIZE_MAX   0x0F
 The maximum allowed FSDI/FSCI value.
 

Functions

phStatus_t phpalI14443p4_SetProtocol (void *pDataParams, uint8_t bCidEnable, uint8_t bCid, uint8_t bNadEnable, uint8_t bNad, uint8_t bFwi, uint8_t bFsdi, uint8_t bFsci)
 Set the ISO14443-4 protocol parameters. More...
 
phStatus_t phpalI14443p4_ResetProtocol (void *pDataParams)
 Reset the ISO14443-4 protocol parameters. More...
 
phStatus_t phpalI14443p4_Deselect (void *pDataParams)
 Deselect ISO14443-4 card. More...
 
phStatus_t phpalI14443p4_PresCheck (void *pDataParams)
 Perform presence check for current card. More...
 
phStatus_t phpalI14443p4_Exchange (void *pDataParams, uint16_t wOption, uint8_t *pTxBuffer, uint16_t wTxLength, uint8_t **ppRxBuffer, uint16_t *pRxLength)
 Perform ISO14443-4 Data Exchange with Picc. More...
 
phStatus_t phpalI14443p4_SetConfig (void *pDataParams, uint16_t wConfig, uint16_t wValue)
 Set configuration parameter. More...
 
phStatus_t phpalI14443p4_GetConfig (void *pDataParams, uint16_t wConfig, uint16_t *pValue)
 Get configuration parameter. More...
 
phStatus_t phpalI14443p4_SParamFrameFormat (void *pDataParams, uint8_t bMode, uint8_t *pbFramePcd2Picc, uint8_t *pbFramePicc2Pcd, uint8_t *pbFramingOptionsPcd2Picc, uint8_t *pbFramingOptionsPicc2Pcd)
 Perform an SParam for frame format. More...
 
phStatus_t phpalI14443p4_SParamBitRates (void *pDataParams, uint8_t bMode, uint16_t *pwBitRatePcd2Picc, uint16_t *pwBitRatePicc2Pcd, uint8_t *pbFramingOptions)
 Perform an SParam for datarate. More...
 

ISO14443-4 Modes for SParam Execution

#define PHPAL_I14443P4_SPARAM_MODE_CHECK   0
 Default mode, sends a SParam request, checks if the requested parameter are supported from the card and return an error if the features are not supported. More...
 
#define PHPAL_I14443P4_SPARAM_MODE_FORCE   1
 Same as the default mode but did not check if the required parameters are supported just send an activation with the requied parameter.
 
#define PHPAL_I14443P4_SPARAM_MODE_AUTO   2
 Does not check the input of the SParam call, just request the supported data from the card and set the maximum possible datarate/best framing options.
 
#define PHPAL_I14443P4_SPARAM_MODE_GET   3
 Only send the sparam request and return the supported parameter.
 
#define PHPAL_I14443P4_SPARAM_MODE_ACTIVATE   4
 Perform the sparam activation without any request or check.
 

ISO14443-4 Parameters

#define PHPAL_I14443P4_CONFIG_BLOCKNO   0x0000U
 Set / Get Blocknumber.
 
#define PHPAL_I14443P4_CONFIG_CID   0x0001U
 Set / Get Card Identifier. More...
 
#define PHPAL_I14443P4_CONFIG_NAD   0x0002U
 Set / Get Node Address. More...
 
#define PHPAL_I14443P4_CONFIG_FWI   0x0003U
 Set / Get Frame Waiting Integer.
 
#define PHPAL_I14443P4_CONFIG_FSI   0x0004U
 Set / Get PCD & PICC Frame Size Integer. More...
 
#define PHPAL_I14443P4_CONFIG_MAXRETRYCOUNT   0x0005U
 Set / Get Maximum Retry Count.
 
#define PHPAL_I14443P4_CONFIG_REMAINING_BYTES_TO_EXCHANGE   0x0006U
 Set / Get Remaining bytes to exchange.
 

Detailed Description

These Components implement the ISO/IEC 14443-4:2008(E) contactless protocol.

Macro Definition Documentation

◆ PHPAL_I14443P4_SPARAM_MODE_CHECK

#define PHPAL_I14443P4_SPARAM_MODE_CHECK   0

Default mode, sends a SParam request, checks if the requested parameter are supported from the card and return an error if the features are not supported.

Otherwise send and activation of the required parameter

◆ PHPAL_I14443P4_CONFIG_CID

#define PHPAL_I14443P4_CONFIG_CID   0x0001U

Set / Get Card Identifier.

wValue is parsed as follows:

* CidEnabled = (wValue & 0xFF00) ? 1 : 0;
* Cid = (wValue & 0x00FF);
* 

◆ PHPAL_I14443P4_CONFIG_NAD

#define PHPAL_I14443P4_CONFIG_NAD   0x0002U

Set / Get Node Address.

wValue is parsed as follows:

* NadEnabled = (wValue & 0xFF00) ? 1 : 0;
* Nad = (wValue & 0x00FF);
* 

◆ PHPAL_I14443P4_CONFIG_FSI

#define PHPAL_I14443P4_CONFIG_FSI   0x0004U

Set / Get PCD & PICC Frame Size Integer.

wValue is parsed as follows:

* Fsdi = ((wValue & 0xFF00) >> 8);
* Fsci = (wValue & 0x00FF);
* 

Function Documentation

◆ phpalI14443p4_SetProtocol()

phStatus_t phpalI14443p4_SetProtocol ( void *  pDataParams,
uint8_t  bCidEnable,
uint8_t  bCid,
uint8_t  bNadEnable,
uint8_t  bNad,
uint8_t  bFwi,
uint8_t  bFsdi,
uint8_t  bFsci 
)

Set the ISO14443-4 protocol parameters.

This sets the protocol parameters for this layer. It is recommended to input this function with the parameters retrieved from either phpalI14443p4a_GetProtocolParams or phpalI14443p3b_GetProtocolParams respectively after card activation. Note: Refer to the ISO/IEC 14443-4:2008(E) specification for a detailed description of the parameters.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bCidEnable[In] Enable usage of Card Identifier; Unequal '0' if enabled.
[in]bCid[In] Card Identifier; Ignored if bCidEnable is equal '0'.
[in]bNadEnable[In] Enabler usage of Node Address; Unequal '0' if enabled.
[in]bNad[In] Node Address; Ignored if bNadEnabled is equal '0'.
[in]bFwi[In] Frame Waiting Integer.
[in]bFsdi[In] PCD Frame Size Integer; 0-8 (0xC for SW implementation to support 4k frames)
[in]bFsci[In] PICC Frame Size Integer; 0-8 (0xC for SW implementation to support 4k frames)

◆ phpalI14443p4_ResetProtocol()

phStatus_t phpalI14443p4_ResetProtocol ( void *  pDataParams)

Reset the ISO14443-4 protocol parameters.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.

◆ phpalI14443p4_Deselect()

phStatus_t phpalI14443p4_Deselect ( void *  pDataParams)

Deselect ISO14443-4 card.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.

◆ phpalI14443p4_PresCheck()

phStatus_t phpalI14443p4_PresCheck ( void *  pDataParams)

Perform presence check for current card.

(Perform R(NAK) polling as defined in ISO 14443-4:2008(E)).

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.

◆ phpalI14443p4_Exchange()

phStatus_t phpalI14443p4_Exchange ( void *  pDataParams,
uint16_t  wOption,
uint8_t pTxBuffer,
uint16_t  wTxLength,
uint8_t **  ppRxBuffer,
uint16_t pRxLength 
)

Perform ISO14443-4 Data Exchange with Picc.

wOption can be one of:

Additionally, the following options are also available:

Alternatively to the FIRST/CONT/LAST options, the following bits can be combined:

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]wOption[In] Option parameter.
[in]pTxBuffer[In] Data to transmit.
[in]wTxLength[In] Length of data to transmit.
[out]ppRxBuffer[Out] Pointer to received data.
[out]pRxLength[Out] number of received data bytes.

◆ phpalI14443p4_SetConfig()

phStatus_t phpalI14443p4_SetConfig ( void *  pDataParams,
uint16_t  wConfig,
uint16_t  wValue 
)

Set configuration parameter.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]wConfig[In] Configuration Identifier
[in]wValue[In] Configuration Value

◆ phpalI14443p4_GetConfig()

phStatus_t phpalI14443p4_GetConfig ( void *  pDataParams,
uint16_t  wConfig,
uint16_t pValue 
)

Get configuration parameter.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]wConfig[In] Configuration Identifier
[out]pValue[Out] Configuration Value

◆ phpalI14443p4_SParamFrameFormat()

phStatus_t phpalI14443p4_SParamFrameFormat ( void *  pDataParams,
uint8_t  bMode,
uint8_t pbFramePcd2Picc,
uint8_t pbFramePicc2Pcd,
uint8_t pbFramingOptionsPcd2Picc,
uint8_t pbFramingOptionsPicc2Pcd 
)

Perform an SParam for frame format.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bMode[In] Mode of the SParam Exchange
[in,out]pbFramePcd2Picc[In/Out] Frame from PCD 2 PICC, supplied value is the required, returned value is the values supported by PICC
[in,out]pbFramePicc2Pcd[In/Out] Frame from PICC 2 PCD, supplied value is the required, returned value is the values supported by PICC
[in,out]pbFramingOptionsPcd2Picc[In/Out] Framing Options from PCD 2 PICC, supplied value is the required, returned value is the values supported by PICC
[in,out]pbFramingOptionsPicc2Pcd[In/Out] Framing Options from PICC 2 PCD, supplied value is the required, returned value is the values supported by PICC

◆ phpalI14443p4_SParamBitRates()

phStatus_t phpalI14443p4_SParamBitRates ( void *  pDataParams,
uint8_t  bMode,
uint16_t pwBitRatePcd2Picc,
uint16_t pwBitRatePicc2Pcd,
uint8_t pbFramingOptions 
)

Perform an SParam for datarate.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bMode[In] Mode of the SParam Exchange
[in,out]pwBitRatePcd2Picc[In/Out] Datarate from PCD 2 PICC, supplied value is the required, returned value is the values supported by PICC
[in,out]pwBitRatePicc2Pcd[In/Out] Datarate from PICC 2 PCD, supplied value is the required, returned value is the values supported by PICC
[in,out]pbFramingOptions[In/Out] Framing Options, supplied value is the required, returned value is the values supported by PICC