NXP NFC Reader Library
v4.040.05.011646
|
These Components implement the ISO/IEC ISO18092 contact-less protocol. More...
![]() |
Modules | |
Component : Software | |
Macros | |
#define | PHPAL_I18092MPI_DID_MAX 0x0EU |
The last valid DID. More... | |
#define | PHPAL_I18092MPI_WT_MAX 0x0EU |
The maximum allowed WT value, NFCForum-TS-DigitalProtocol-1.0 section 14.11. More... | |
#define | PHPAL_I18092MPI_FSL_MAX 0x03U |
The maximum allowed FSL value. More... | |
#define | PHPAL_I18092MPI_PNI_MAX 0x03U |
The maximum allowed PNI value. More... | |
Functions | |
phStatus_t | phpalI18092mPI_ResetProtocol (void *pDataParams) |
Reset the ISO18092 protocol parameters. More... | |
phStatus_t | phpalI18092mPI_Atr (void *pDataParams, uint8_t *pNfcid3i, uint8_t bDid, uint8_t bLri, uint8_t bNadEnable, uint8_t bNad, uint8_t *pGi, uint8_t bGiLength, uint8_t *pAtrRes, uint8_t *pAtrResLength) |
Perform an ISO18092 "Attribute Request" command. More... | |
phStatus_t | phpalI18092mPI_Psl (void *pDataParams, uint8_t bDsi, uint8_t bDri, uint8_t bFsl) |
Perform an ISO18092 "Parameter Select" command. More... | |
phStatus_t | phpalI18092mPI_ActivateCard (void *pDataParams, uint8_t *pNfcid3i, uint8_t bDid, uint8_t bNadEnable, uint8_t bNad, uint8_t bDsi, uint8_t bDri, uint8_t bFsl, uint8_t *pGi, uint8_t bGiLength, uint8_t *pAtrRes, uint8_t *pAtrResLength) |
Perform an ISO18092 ATR and PSL command. More... | |
phStatus_t | phpalI18092mPI_Deselect (void *pDataParams, uint8_t bDeselectCommand) |
Deselect ISO18092 target by either sending DSL or RLS request. More... | |
phStatus_t | phpalI18092mPI_PresCheck (void *pDataParams) |
Perform presence check for current target. More... | |
phStatus_t | phpalI18092mPI_Exchange (void *pDataParams, uint16_t wOption, uint8_t *pTxBuffer, uint16_t wTxLength, uint8_t **ppRxBuffer, uint16_t *pRxLength) |
Perform ISO18092 Data Exchange with target. More... | |
phStatus_t | phpalI18092mPI_Transmit (void *pDataParams, uint16_t wOption, uint8_t *pTxBuffer, uint16_t wTxLength) |
Perform ISO18092 Data Transmit to target. More... | |
phStatus_t | phpalI18092mPI_Receive (void *pDataParams, uint16_t wOption, uint8_t **ppRxBuffer, uint16_t *pRxLength) |
Perform ISO18092 Data Exchange with target. More... | |
phStatus_t | phpalI18092mPI_SetConfig (void *pDataParams, uint16_t wConfig, uint16_t wValue) |
Set configuration parameter. More... | |
phStatus_t | phpalI18092mPI_GetConfig (void *pDataParams, uint16_t wConfig, uint16_t *pValue) |
Get configuration parameter. More... | |
phStatus_t | phpalI18092mPI_GetSerialNo (void *pDataParams, uint8_t *pNfcId3Out) |
Retrieve the serial number (NFC ID3). More... | |
phStatus_t | phpalI18092mPI_Wakeup (void *pDataParams) |
Wakeup ISO18092 Active Target by sending WUP request. More... | |
ISO18092 Mode Passive Initiator Parameters | |
#define | PHPAL_I18092MPI_CONFIG_PACKETNO 0x0000U |
Set / Get packet number. | |
#define | PHPAL_I18092MPI_CONFIG_DID 0x0001U |
Set / Get Device Identifier. | |
#define | PHPAL_I18092MPI_CONFIG_NAD 0x0002U |
Set / Get Node Address. More... | |
#define | PHPAL_I18092MPI_CONFIG_WT 0x0003U |
Set / Get waiting time. | |
#define | PHPAL_I18092MPI_CONFIG_FSL 0x0004U |
Get frame length (FSL) value. More... | |
#define | PHPAL_I18092MPI_CONFIG_MAXRETRYCOUNT 0x0005U |
Set / Get maximum retry count. | |
#define | PHPAL_I18092MPI_CONFIG_ATN 0x0006U |
Set / Get ATN configuration. | |
#define | PHPAL_I18092MPI_CONFIG_ACTIVEMODE 0x0007U |
Get the status if active communication mode is PH_ON / PH_OFF. More... | |
Values for #phpalI18092mPI_Deselect \c bDeselectCommand parameter. | |
#define | PHPAL_I18092MPI_DESELECT_DSL 0x08U |
DSL is sent for deselection of target. More... | |
#define | PHPAL_I18092MPI_DESELECT_RLS 0x0AU |
RLS is sent for Release of target. More... | |
DRI/DSI (BRI/BSI) Values | |
#define | PHPAL_I18092MPI_DATARATE_106 0x00U |
DRI/DSI value for 106 kBit/s. More... | |
#define | PHPAL_I18092MPI_DATARATE_212 0x01U |
DRI/DSI value for 212 kBit/s. More... | |
#define | PHPAL_I18092MPI_DATARATE_424 0x02U |
DRI/DSI value for 424 kBit/s. More... | |
FSL/LRI Values | |
#define | PHPAL_I18092MPI_FRAMESIZE_64 0x00U |
FSL value for max. More... | |
#define | PHPAL_I18092MPI_FRAMESIZE_128 0x01U |
FSL value for max. More... | |
#define | PHPAL_I18092MPI_FRAMESIZE_192 0x02U |
FSL value for max. More... | |
#define | PHPAL_I18092MPI_FRAMESIZE_254 0x03U |
FSL value for max. More... | |
Maximum Values | |
#define | PHPAL_I18092MPI_MAX_GI_LENGTH 48U |
Maximum length of Gi data. More... | |
These Components implement the ISO/IEC ISO18092 contact-less protocol.
Supported mode is passive initiator, i.e. using these components it is possible to communicate with a passive target in peer to peer mode.
#define PHPAL_I18092MPI_DID_MAX 0x0EU |
The last valid DID.
#define PHPAL_I18092MPI_WT_MAX 0x0EU |
The maximum allowed WT value, NFCForum-TS-DigitalProtocol-1.0 section 14.11.
#define PHPAL_I18092MPI_FSL_MAX 0x03U |
The maximum allowed FSL value.
#define PHPAL_I18092MPI_PNI_MAX 0x03U |
The maximum allowed PNI value.
#define PHPAL_I18092MPI_CONFIG_NAD 0x0002U |
Set / Get Node Address.
wValue
is parsed as follows:
* NadEnabled = (wValue & 0xFF00) ? 1 : 0; * Nad = (wValue & 0x00FF); *
#define PHPAL_I18092MPI_CONFIG_FSL 0x0004U |
Get frame length (FSL) value.
Indicates either Lri or Lrt value whichever is lesser in case PSL is not exchanged. If PSL is exchanged then the agreed FSL value is returned.
#define PHPAL_I18092MPI_CONFIG_ACTIVEMODE 0x0007U |
#define PHPAL_I18092MPI_DESELECT_DSL 0x08U |
DSL is sent for deselection of target.
#define PHPAL_I18092MPI_DESELECT_RLS 0x0AU |
RLS is sent for Release of target.
#define PHPAL_I18092MPI_DATARATE_106 0x00U |
DRI/DSI value for 106 kBit/s.
#define PHPAL_I18092MPI_DATARATE_212 0x01U |
DRI/DSI value for 212 kBit/s.
#define PHPAL_I18092MPI_DATARATE_424 0x02U |
DRI/DSI value for 424 kBit/s.
#define PHPAL_I18092MPI_FRAMESIZE_64 0x00U |
FSL value for max.
framesize of 64 Bytes.
#define PHPAL_I18092MPI_FRAMESIZE_128 0x01U |
FSL value for max.
framesize of 128 Bytes.
#define PHPAL_I18092MPI_FRAMESIZE_192 0x02U |
FSL value for max.
framesize of 192 Bytes.
#define PHPAL_I18092MPI_FRAMESIZE_254 0x03U |
FSL value for max.
framesize of 254 Bytes.
#define PHPAL_I18092MPI_MAX_GI_LENGTH 48U |
Maximum length of Gi data.
phStatus_t phpalI18092mPI_ResetProtocol | ( | void * | pDataParams | ) |
Reset the ISO18092 protocol parameters.
PH_ERR_SUCCESS | Operation successful. |
[in] | pDataParams | Pointer to this layer's parameter structure. |
phStatus_t phpalI18092mPI_Atr | ( | void * | pDataParams, |
uint8_t * | pNfcid3i, | ||
uint8_t | bDid, | ||
uint8_t | bLri, | ||
uint8_t | bNadEnable, | ||
uint8_t | bNad, | ||
uint8_t * | pGi, | ||
uint8_t | bGiLength, | ||
uint8_t * | pAtrRes, | ||
uint8_t * | pAtrResLength | ||
) |
Perform an ISO18092 "Attribute Request" command.
The following values for bLri
are possible:
PH_ERR_SUCCESS | Operation successful. |
PH_ERR_PROTOCOL_ERROR | Received response is not ISO/IEC 18092 compliant. |
PH_ERR_IO_TIMEOUT | Timeout waiting for reply, e.g. target removal. |
Other | Depending on implementation and underlying component. |
[in] | pDataParams | Pointer to this layer's parameter structure. |
[in] | pNfcid3i | NFCID3 - randomly generated in case of 106kbps initial datarate or NFCID2 in case of 212/424kbps datarate; uint8_t[10] |
[in] | bDid | Device Identifier; '0' to disable usage else 1-14. |
[in] | bLri | Length Reduction of Initiator; 0-3 |
[in] | bNadEnable | Enable usage of Node Address; Unequal '0' to enable. |
[in] | bNad | Node Address; Ignored if bNadEnabled is equal '0'. |
[in] | pGi | Optional General Information bytes. |
[in] | bGiLength | Number of General Information bytes; Not more than PHPAL_I18092MPI_MAX_GI_LENGTH. |
[out] | pAtrRes | Attribute Response; uint8_t[64]. |
[out] | pAtrResLength | Attribute Response Length. |
Perform an ISO18092 "Parameter Select" command.
The following values for bDri
and bDsi
are possible:
The following values for bFsl
are possible:
PH_ERR_SUCCESS | Operation successful. |
PH_ERR_PROTOCOL_ERROR | Received response is not ISO/IEC 18092 compliant. |
PH_ERR_IO_TIMEOUT | Timeout waiting for reply, e.g. target removal. |
Other | Depending on implementation and underlying component. |
[in] | pDataParams | Pointer to this layer's parameter structure. |
[in] | bDsi | Divisor Send (target to initiator) Integer; 0-2 |
[in] | bDri | Divisor Receive (initiator to target) Integer; 0-2 |
[in] | bFsl | Frame Length Byte; 0-3 |
phStatus_t phpalI18092mPI_ActivateCard | ( | void * | pDataParams, |
uint8_t * | pNfcid3i, | ||
uint8_t | bDid, | ||
uint8_t | bNadEnable, | ||
uint8_t | bNad, | ||
uint8_t | bDsi, | ||
uint8_t | bDri, | ||
uint8_t | bFsl, | ||
uint8_t * | pGi, | ||
uint8_t | bGiLength, | ||
uint8_t * | pAtrRes, | ||
uint8_t * | pAtrResLength | ||
) |
Perform an ISO18092 ATR and PSL command.
The following values for bDri
and bDsi
are possible:
The following values for bFsl
are possible:
PH_ERR_SUCCESS | Operation successful, target activated. |
PH_ERR_PROTOCOL_ERROR | Received response is not ISO/IEC 18092 compliant. |
PH_ERR_IO_TIMEOUT | Timeout waiting for reply, e.g. target removal. |
Other | Depending on implementation and underlying component. |
[in] | pDataParams | Pointer to this layer's parameter structure. |
[in] | pNfcid3i | NFCID3 - any number in case of 106kbps initial datarate. For 212/424kbps datarate bytes 0 - 7 have to be NFCID2, bytes 8 - 9 need to be set to 0; uint8_t[10] |
[in] | bDid | Device Identifier; '0' to disable usage else 1-14. |
[in] | bNadEnable | Enable usage of Node Address; Unequal '0' to enable. |
[in] | bNad | Node Address; Ignored if bNadEnabled is equal '0'. |
[in] | bDsi | Divisor Send (target to initiator) Integer; 0-7 |
[in] | bDri | Divisor Receive (initiator to target) Integer; 0-7 |
[in] | bFsl | Frame Length Byte; 0-3 |
[in] | pGi | Optional General Information bytes. |
[in] | bGiLength | Number of General Information bytes. |
[out] | pAtrRes | Attribute Response; uint8_t[64]. |
[out] | pAtrResLength | Attribute Response Length. |
phStatus_t phpalI18092mPI_Deselect | ( | void * | pDataParams, |
uint8_t | bDeselectCommand | ||
) |
Deselect ISO18092 target by either sending DSL or RLS request.
The following values for bDeselectCommand
are possible:
PH_ERR_SUCCESS | Operation successful, target deselected. |
PH_ERR_PROTOCOL_ERROR | Received response is not ISO/IEC 18092 compliant. |
PH_ERR_IO_TIMEOUT | Timeout waiting for reply, e.g. target removal. |
[in] | pDataParams | Pointer to this layer's parameter structure. |
[in] | bDeselectCommand | Request to send, either PHPAL_I18092MPI_DESELECT_DSL or PHPAL_I18092MPI_DESELECT_RLS. |
phStatus_t phpalI18092mPI_PresCheck | ( | void * | pDataParams | ) |
Perform presence check for current target.
PH_ERR_SUCCESS | Operation successful, target is present. |
PH_ERR_PROTOCOL_ERROR | Received response is not ISO/IEC 18092 compliant. |
PH_ERR_IO_TIMEOUT | Timeout waiting for reply, e.g. target removal. |
PHPAL_I18092MPI_ERR_RECOVERY_FAILED | Recovery failed, target does not respond any more. |
[in] | pDataParams | Pointer to this layer's parameter structure. |
phStatus_t phpalI18092mPI_Exchange | ( | void * | pDataParams, |
uint16_t | wOption, | ||
uint8_t * | pTxBuffer, | ||
uint16_t | wTxLength, | ||
uint8_t ** | ppRxBuffer, | ||
uint16_t * | pRxLength | ||
) |
Perform ISO18092 Data Exchange with target.
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:
PH_ERR_SUCCESS | Operation successful. |
PH_ERR_PROTOCOL_ERROR | Received response is not ISO/IEC 18092 compliant. |
PH_ERR_IO_TIMEOUT | Timeout waiting for reply, e.g. target removal. |
PHPAL_I18092MPI_ERR_RECOVERY_FAILED | Recovery failed, target does not respond any more. |
Other | Depending on implementation and underlying component. |
[in] | pDataParams | Pointer to this layer's parameter structure. |
[in] | wOption | Option parameter. |
[in] | pTxBuffer | Data to transmit. |
[in] | wTxLength | Length of data to transmit. |
[out] | ppRxBuffer | Pointer to received data. |
[out] | pRxLength | number of received data bytes. |
phStatus_t phpalI18092mPI_Transmit | ( | void * | pDataParams, |
uint16_t | wOption, | ||
uint8_t * | pTxBuffer, | ||
uint16_t | wTxLength | ||
) |
Perform ISO18092 Data Transmit to target.
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:
PH_ERR_SUCCESS | Operation successful. |
PH_ERR_PROTOCOL_ERROR | Received response is not ISO/IEC 18092 compliant. |
PHPAL_I18092MPI_ERR_RECOVERY_FAILED | Recovery failed, target does not respond any more. |
Other | Depending on implementation and underlying component. |
phStatus_t phpalI18092mPI_Receive | ( | void * | pDataParams, |
uint16_t | wOption, | ||
uint8_t ** | ppRxBuffer, | ||
uint16_t * | pRxLength | ||
) |
Perform ISO18092 Data Exchange with target.
wOption
can be one of:
PH_ERR_SUCCESS | Operation successful. |
PH_ERR_PROTOCOL_ERROR | Received response is not ISO/IEC 18092 compliant. |
PH_ERR_IO_TIMEOUT | Timeout waiting for reply, e.g. target removal. |
PHPAL_I18092MPI_ERR_RECOVERY_FAILED | Recovery failed, target does not respond any more. |
Other | Depending on implementation and underlying component. |
Set configuration parameter.
PH_ERR_SUCCESS | Operation successful. |
Other | Depending on implementation and underlying component. |
[in] | pDataParams | Pointer to this layer's parameter structure. |
[in] | wConfig | Configuration Identifier. |
[in] | wValue | Configuration Value. |
Get configuration parameter.
PH_ERR_SUCCESS | Operation successful. |
Other | Depending on implementation and underlying component. |
[in] | pDataParams | Pointer to this layer's parameter structure. |
[in] | wConfig | Configuration Identifier. |
[out] | pValue | Configuration Value. |
phStatus_t phpalI18092mPI_GetSerialNo | ( | void * | pDataParams, |
uint8_t * | pNfcId3Out | ||
) |
Retrieve the serial number (NFC ID3).
PH_ERR_SUCCESS | Operation successful. |
[in] | pDataParams | Pointer to this layer's parameter structure. |
[out] | pNfcId3Out | last NFCID3; uint8_t[10]. |
phStatus_t phpalI18092mPI_Wakeup | ( | void * | pDataParams | ) |
Wakeup ISO18092 Active Target by sending WUP request.
PH_ERR_SUCCESS | Operation successful, target deselected. |
PH_ERR_PROTOCOL_ERROR | Received response is not ISO/IEC 18092 compliant. |
PH_ERR_IO_TIMEOUT | Timeout waiting for reply, e.g. target removal. |
PHPAL_I18092MPI_ERR_RECOVERY_FAILED | Recovery failed, target does not respond any more. |
[in] | pDataParams | Pointer to this layer's parameter structure. |