BALTECH Docs |
C API for BALTECH SDK
|
brp_errcode brp_Iso14CE_ExchangeCardAPDU | ( | brp_protocol | protocol, |
brp_buf | Rsp, | ||
size_t | Rsp_len, | ||
unsigned | Timeout, | ||
brp_buf * | Cmd, | ||
size_t * | Cmd_len, | ||
brp_mempool * | mempool | ||
) |
Send an APDU response to the APDU request received during the last call of Iso14CE.ExchangeInverseAPDU or brp_Iso14CE_ActivateCardAPDU(), and receive the next PCD APDU request.
The Timeout parameter specifies the maximum time in ms to wait for the next APDU. If no request could be received from the PCD, Iso14CE.ExchangeInverseAPDU returns the BRP_Iso14CE_ErrTimeout status code.
In case the received APDU does not fit into the internal buffer of the emulated PICC, the part of the frame which could be processed is returned together with an BRP_Iso14CE_ErrOverflow status code. The buffer size is firmware dependent and can be retrieved via the brp_Sys_GetBufferSize() command.
The command returns the BRP_Iso14CE_ErrIso144State status code if the PICC is not in the proper state to exchange ISO14443-4 APDUs. This is the case if brp_Iso14CE_ActivateCardAPDU() has not previously been successfully executed, or if the PCD has terminated the communication by e.g. executing the brp_Iso14L4_Deselect() command.
[in] | protocol | used to execute the command |
[in] | Rsp | APDU which shall be sent to the PCD as a response to the last command. |
[in] | Rsp_len | |
[in] | Timeout | Maximum time (in ms) to wait for the next ISO14443-4 APDU request. A value of 0xFFFF corresponds to an infinite timeout. |
[out] | Cmd | Next ISO14443-4 APDU request received from the PCD. |
[out] | Cmd_len | |
[in] | mempool | is used to store response data. Maybe NULL to use an internal mempool, in this case the data is only available until another command uses the internal mempool |