BALTECH Docs |
C API for BALTECH SDK
|
brp_errcode brp_Iso14L4_SetupAPDU | ( | brp_protocol | protocol, |
bool | EnDefault, | ||
unsigned | ToggleAB, | ||
bool | EnNAD, | ||
bool | EnCID, | ||
unsigned | CID, | ||
unsigned | NAD, | ||
brp_Iso14L4_SetupAPDU_FSCI | FSCI, | ||
brp_Iso14L4_SetupAPDU_FWI | FWI, | ||
brp_DivisorInteger | DSI, | ||
brp_DivisorInteger | DRI | ||
) |
Setup communication parameters and select a certain PICC for APDU exchange. The chosen settings will be applied to all subsequent calls of the Iso14L4.ExchangeAPDU and Iso14L4.Deselect commands.
The FrameParam and Bitrate parameters have to be chosen according to the PICC's capabilities.
In some cases, the CID of the label to select has to be passed as a parameter. This is the case if the label supports the feature of being assigned a CID, and if a CID value has been previously assigned to the PICC using the Iso14a.RequestATS command (for ISO 14443 Type A labels) or by the or the Iso14b.Attrib command (for ISO 14443 Type B labels). Otherwise, the CID functionality should be disabled, by clearing the EnCID flag.
PICCs which do not support a CID (for which the returned CID value from the Iso14a.RequestATS command, or from the Iso14b.Request command, is 0x00) will only respond to the Iso14L4.ExchangeAPDU and Iso14L4.Deselect commands if the CID functionality is disabled.
A PICC, which supports a CID, will
The NAD parameter may be used to select a certain logical application (node) on the target PICC, if these are supported by this PICC.
[in] | protocol | used to execute the command |
[in] | EnDefault | If this flag is set, the default settings for FrameParam and Bitrate will be applied instead of the given parameter values. |
[in] | ToggleAB | If this flag is set, communication with the PICC will be performed according to the ISO 14443 Type B standard. Otherwise, communication will be performed according to the ISO 14443 Type A standard. |
[in] | EnNAD | Enables the NAD functionality. |
[in] | EnCID | Enables the CID functionality. |
[in] | CID | Specifies a CID value, which shall be used for all subsequent calls of the Iso14L4.ExchangeAPDU and Iso14L4.Deselect commands. If EnCID is not set, this parameter will be ignored and the CID functionality will be disabled. |
[in] | NAD | Specifies a NAD value, which shall be used for all subsequent calls of the Iso14L4.ExchangeAPDU command. If EnNAD is not set, this parameter will be ignored and the NAD functionality will be disabled. |
[in] | FSCI | Frame Size proximity Card Integer (FSCI). This value is mapped to the Frame Size proximity Card (FSC) value, which indicates the maximum frame size accepted by the PICC. The possible FSC values (mapped to the FSCI index) are listed below. |
[in] | FWI | Frame Waiting time Integer (FWI). This value is necessary for calculation of the Frame Waiting Time (FWT) value, representing the maximum time needed by the PICC between receiving a frame and sending the corresponding answer. FWT is calculated by: FWT = (256 * 16 / 13.56 MHz) * 2 ^ FWI The FWT values given here (mapped to the FWI index) are approximate. |
[in] | DSI | Divisor Send/Receive Integer (DSI/DRI) This parameter is mapped to the Divisor Send/Receive (DS/DI) value, which determines bit rate for sending data from PICC to PCD. The possible DS/DR values (mapped to the DSI/DRI index) are listed below. |
[in] | DRI | Divisor Send/Receive Integer (DSI/DRI) This parameter is mapped to the Divisor Send/Receive (DS/DI) value, which determines bit rate for sending data from PICC to PCD. The possible DS/DR values (mapped to the DSI/DRI index) are listed below. |