BALTECH Docs |
C API for BALTECH SDK
|
brp_errcode brp_Iso78_OpenSam | ( | brp_protocol | protocol, |
brp_Iso78_OpenSam_LID | LID, | ||
unsigned * | SamHandle, | ||
brp_buf * | ATR, | ||
size_t * | ATR_len, | ||
brp_mempool * | mempool | ||
) |
This command sets up a communication channel to a Secure Access Module (SAM) inserted into the reader.
To select the SAM, you specify it using the LID parameter as described below. Once you've run this command successfully, you can run brp_Iso78_ExchangeApdu() to communicate with the SAM.
To close the communication channel after data exchange, run brp_Iso78_CloseSam().
[in] | protocol | used to execute the command |
[in] | LID | Logical SAM-ID (LID) |
[out] | SamHandle | Identifier for SAM communication. Use this value in all subsequent calls of brp_Iso78_CloseSam() and brp_Iso78_ExchangeApdu(). |
[out] | ATR | ATR (Answer To Reset) string of SAM |
[out] | ATR_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 |