NXP Reader Library  v17.1.0.2535

These Components implement the ISO/IEC 14443-3 Type-B contactless protocol. More...

Collaboration diagram for ISO/IEC 14443-3B:

Modules

 Component : Software
 

Functions

phStatus_t phpalI14443p3b_SetConfig (void *pDataParams, uint16_t wConfig, uint16_t wValue)
 Set configuration value. More...
 
phStatus_t phpalI14443p3b_GetConfig (void *pDataParams, uint16_t wConfig, uint16_t *pValue)
 Get configuration value. More...
 
phStatus_t phpalI14443p3b_RequestB (void *pDataParams, uint8_t bNumSlots, uint8_t bAfi, uint8_t bExtAtqb, uint8_t *pAtqb, uint8_t *pAtqbLen)
 Perform a ISO14443-3B Request command. More...
 
phStatus_t phpalI14443p3b_WakeUpB (void *pDataParams, uint8_t bNumSlots, uint8_t bAfi, uint8_t bExtAtqb, uint8_t *pAtqb, uint8_t *pAtqbLen)
 Perform a ISO14443-3B Wakeup command. More...
 
phStatus_t phpalI14443p3b_SlotMarker (void *pDataParams, uint8_t bSlotNumber, uint8_t *pAtqb, uint8_t *pAtqbLen)
 Perform a ISO14443-3B Slot-MARKER command. More...
 
phStatus_t phpalI14443p3b_HaltB (void *pDataParams)
 Perform a ISO14443-3B Halt command. More...
 
phStatus_t phpalI14443p3b_Attrib (void *pDataParams, uint8_t *pAtqb, uint8_t bAtqbLen, uint8_t bFsdi, uint8_t bCid, uint8_t bDri, uint8_t bDsi, uint8_t *pMbli)
 Perform a ISO14443-3B Attrib command. More...
 
phStatus_t phpalI14443p3b_ActivateCard (void *pDataParams, uint8_t *pPupi, uint8_t bPupiLength, uint8_t bNumSlots, uint8_t bAfi, uint8_t bExtAtqb, uint8_t bFsdi, uint8_t bCid, uint8_t bDri, uint8_t bDsi, uint8_t *pAtqb, uint8_t *pAtqbLen, uint8_t *pMbli, uint8_t *pMoreCardsAvailable)
 Perform ISO14443-3B ReqB or WupB and Anticollision/Select commands for all cascade levels. More...
 
phStatus_t phpalI14443p3b_Exchange (void *pDataParams, uint16_t wOption, uint8_t *pTxBuffer, uint16_t wTxLength, uint8_t **ppRxBuffer, uint16_t *pRxLength)
 Perform ISO14443-3B Data Exchange with Picc. More...
 
phStatus_t phpalI14443p3b_GetSerialNo (void *pDataParams, uint8_t *pPupi)
 Retrieve the serial number. More...
 
phStatus_t phpalI14443p3b_SetHigherLayerInf (void *pDataParams, uint8_t *pTxBuffer, uint16_t wTxLength, uint8_t *pRxBuffer, uint16_t wRxBufSize)
 Set higher layer information. More...
 
phStatus_t phpalI14443p3b_GetHigherLayerResp (void *pDataParams, uint8_t **ppRxBuffer, uint16_t *pRxLength)
 Get higher layer response. More...
 
phStatus_t phpalI14443p3b_GetProtocolParams (void *pDataParams, uint8_t *pCidEnabled, uint8_t *pCid, uint8_t *pNadSupported, uint8_t *pFwi, uint8_t *pFsdi, uint8_t *pFsci)
 Retrieve the ISO14443-3B protocol parameters. More...
 

14443-3B constant definitions

#define PHPAL_I14443P3B_CONFIG_ATTRIB_PARAM1   0x0000U
 Set or get the AttribB param1 byte.
 

DRI/DSI Values

#define PHPAL_I14443P3B_DATARATE_106   0x00U
 DRI/DSI value for 106 kBit/s.
 
#define PHPAL_I14443P3B_DATARATE_212   0x01U
 DRI/DSI value for 212 kBit/s.
 
#define PHPAL_I14443P3B_DATARATE_424   0x02U
 DRI/DSI value for 424 kBit/s.
 
#define PHPAL_I14443P3B_DATARATE_848   0x03U
 DRI/DSI value for 848 kBit/s.
 
#define PHPAL_I14443P3B_DATARATE_FORCE   0x80U
 Flag that forces the use of the given baud rates.
 

Detailed Description

These Components implement the ISO/IEC 14443-3 Type-B contactless protocol.

Note: The "Timing before the PCD SOF" (see 7.1.7, ISO/IEC 14443-3:2009(E)) is mandatory and is neither implemented here nor implemented in every Hardware Abstraction Layer layer.
Make sure that either the used HAL or the used application does comply to this rule.

Function Documentation

◆ phpalI14443p3b_SetConfig()

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

Set configuration value.

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

◆ phpalI14443p3b_GetConfig()

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

Get configuration value.

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

◆ phpalI14443p3b_RequestB()

phStatus_t phpalI14443p3b_RequestB ( void *  pDataParams,
uint8_t  bNumSlots,
uint8_t  bAfi,
uint8_t  bExtAtqb,
uint8_t pAtqb,
uint8_t pAtqbLen 
)

Perform a ISO14443-3B Request command.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_PROTOCOL_ERRORInvalid response received.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParams[In] Pointer to this layers parameter structure.
[in]bNumSlots[In] Number of slots.
[in]bAfi[In] AFI; Application Family Indentifier.
[in]bExtAtqb[In] Enable Extended AtqB.
[out]pAtqb[Out] AtqB; uint8_t[13].
[out]pAtqbLen[Out] length of ATQB (12/13 bytes).

◆ phpalI14443p3b_WakeUpB()

phStatus_t phpalI14443p3b_WakeUpB ( void *  pDataParams,
uint8_t  bNumSlots,
uint8_t  bAfi,
uint8_t  bExtAtqb,
uint8_t pAtqb,
uint8_t pAtqbLen 
)

Perform a ISO14443-3B Wakeup command.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_PROTOCOL_ERRORInvalid response received.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParams[In] Pointer to this layers parameter structure.
[in]bNumSlots[In] Number of slots.
[in]bAfi[In] AFI; Application Family Indentifier.
[in]bExtAtqb[In] Enable Extended AtqB.
[out]pAtqb[Out] AtqB; uint8_t[12/13].
[out]pAtqbLen[Out] length of ATQB (12/13 bytes).

◆ phpalI14443p3b_SlotMarker()

phStatus_t phpalI14443p3b_SlotMarker ( void *  pDataParams,
uint8_t  bSlotNumber,
uint8_t pAtqb,
uint8_t pAtqbLen 
)

Perform a ISO14443-3B Slot-MARKER command.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_PROTOCOL_ERRORInvalid response received.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParams[In] Pointer to this layers parameter structure.
[in]bSlotNumber[In] Slot Number.
[out]pAtqb[Out] AtqB; uint8_t[12/13].
[out]pAtqbLen[Out] length of ATQB (12/13 bytes).

◆ phpalI14443p3b_HaltB()

phStatus_t phpalI14443p3b_HaltB ( void *  pDataParams)

Perform a ISO14443-3B Halt command.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_PROTOCOL_ERRORInvalid response received.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParams[In] Pointer to this layers parameter structure.

◆ phpalI14443p3b_Attrib()

phStatus_t phpalI14443p3b_Attrib ( void *  pDataParams,
uint8_t pAtqb,
uint8_t  bAtqbLen,
uint8_t  bFsdi,
uint8_t  bCid,
uint8_t  bDri,
uint8_t  bDsi,
uint8_t pMbli 
)

Perform a ISO14443-3B Attrib command.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_PROTOCOL_ERRORInvalid response received.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParams[In] Pointer to this layers parameter structure.
[in]pAtqb[In] Atqb from ReqB/WupB; uint8_t[12/13].
[in]bAtqbLen[In] Length of Atqb.
[in]bFsdi[In] Frame Size Integer; 0-8 (0xC for SW implementation to support 4k frames).
[in]bCid[In] Card Identifier; 0-14.
[in]bDri[In] Divisor Receive (PCD to PICC) Integer; 0-3.
[in]bDsi[In] Divisor Send (PICC to PCD) Integer; 0-3.
[out]pMbli[Out] MBLI byte; uint8_t.

◆ phpalI14443p3b_ActivateCard()

phStatus_t phpalI14443p3b_ActivateCard ( void *  pDataParams,
uint8_t pPupi,
uint8_t  bPupiLength,
uint8_t  bNumSlots,
uint8_t  bAfi,
uint8_t  bExtAtqb,
uint8_t  bFsdi,
uint8_t  bCid,
uint8_t  bDri,
uint8_t  bDsi,
uint8_t pAtqb,
uint8_t pAtqbLen,
uint8_t pMbli,
uint8_t pMoreCardsAvailable 
)

Perform ISO14443-3B ReqB or WupB and Anticollision/Select commands for all cascade levels.

If bLenUidIn is '0' --> CardUid not given, a ReqB is performed. If CardUid is given, a WupB is performed.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_PROTOCOL_ERRORInvalid response received.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParams[In] Pointer to this layers parameter structure.
[in]pPupi[In] Pointer to the known PUPI; uint8_t[4].
[in]bPupiLength[In] Length of given PUPI, only a value of 0 or 4 is allowed.
[in]bNumSlots[In] Number of slots.
[in]bAfi[In] AFI; Application Family Indentifier.
[in]bExtAtqb[In] Enable Extended AtqB.
[in]bFsdi[In] Frame Size Integer; 0-8 (0xC for SW implementation to support 4k frames).
[in]bCid[In] Card Identifier; 0-14.
[in]bDri[In] Divisor Receive (PCD to PICC) Integer; 0-3.
[in]bDsi[In] Divisor Send (PICC to PCD) Integer; 0-3.
[out]pAtqb[Out] AtqB; uint8_t[13].
[out]pAtqbLen[Out] length of ATQB (12/13 bytes).
[out]pMbli[Out] MBLI byte; uint8_t.
[out]pMoreCardsAvailable[Out] Whether there are more cards in the field or not; uint8_t.

◆ phpalI14443p3b_Exchange()

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

Perform ISO14443-3B Data Exchange with Picc.

wOption can be one of:

Alternatively, 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 layers 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.

◆ phpalI14443p3b_GetSerialNo()

phStatus_t phpalI14443p3b_GetSerialNo ( void *  pDataParams,
uint8_t pPupi 
)

Retrieve the serial number.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_USE_CONDITIONNo PUPI available.
Parameters
[in]pDataParams[In] Pointer to this layers parameter structure.
[out]pPupi[Out] Most recent PUPI; uint8_t[4]

◆ phpalI14443p3b_SetHigherLayerInf()

phStatus_t phpalI14443p3b_SetHigherLayerInf ( void *  pDataParams,
uint8_t pTxBuffer,
uint16_t  wTxLength,
uint8_t pRxBuffer,
uint16_t  wRxBufSize 
)

Set higher layer information.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_USE_CONDITIONFeature not available.
Parameters
[in]pDataParams[In] Pointer to this layers parameter structure.
[in]pTxBuffer[In] Higher layer Information; Can be NULL if /c wTxLength is 0.
[in]wTxLength[In] Length of the Higher layer Information. Can be 0.
[in]pRxBuffer[In] Higher layer response buffer.
[in]wRxBufSize[In] Size of Higher layer response buffer.

◆ phpalI14443p3b_GetHigherLayerResp()

phStatus_t phpalI14443p3b_GetHigherLayerResp ( void *  pDataParams,
uint8_t **  ppRxBuffer,
uint16_t pRxLength 
)

Get higher layer response.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_USE_CONDITIONFeature not available.
Parameters
[in]pDataParams[In] Pointer to this layers parameter structure.
[out]ppRxBuffer[Out] Higher layer response.
[out]pRxLength[Out] Length of Higher layer response.

◆ phpalI14443p3b_GetProtocolParams()

phStatus_t phpalI14443p3b_GetProtocolParams ( void *  pDataParams,
uint8_t pCidEnabled,
uint8_t pCid,
uint8_t pNadSupported,
uint8_t pFwi,
uint8_t pFsdi,
uint8_t pFsci 
)

Retrieve the ISO14443-3B protocol parameters.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
Parameters
[in]pDataParams[In] Pointer to this layers parameter structure.
[out]pCidEnabled[Out] Unequal '0' if Card Identifier is enabled.
[out]pCid[Out] Card Identifier.
[out]pNadSupported[Out] Node Address Support; Unequal '0' if supported.
[out]pFwi[Out] Frame Waiting Integer.
[out]pFsdi[Out] PCD Frame Size Integer; 0-8 (0xC for SW implementation to support 4k frames).
[out]pFsci[Out] PICC Frame Size Integer; 0-8 (0xC for SW implementation to support 4k frames).