C API for BALTECH SDK

§ brp_VHL_GetLegacyATR()

brp_errcode brp_VHL_GetLegacyATR ( brp_protocol  protocol,
brp_buf ATR,
size_t *  ATR_len,
brp_mempool mempool 
)

This command is deprecated and should only be used for compatibility purposes with older firmware version.

It returns the Answer To Reset (ATR) of the currently selected card in a legacy format, i.e. not conform with the [PC/SC specification, version 2](http://pcscworkgroup.com/Download/Specifications/pcsc3_v2.01.09.pdf). For new projects it is recommended to use the brp_VHL_GetATR() command instead.

If the brp_VHL_Select() command has not been successfully executed before this command, the BRP_VHL_ErrCardNotSelected status code will be returned. If the last selected card is no longer available in the field of the antenna, or if a read/write operation failed before executing this command, the returned ATR is undefined.

The returned ATR variable always has the following format:

  • 0x3B
  • Length of card UID (in bytes)
  • Card UID
Parameters
[in]protocolused to execute the command
[out]ATRAnswer To Reset value in legacy format.
[out]ATR_len
[in]mempoolis 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