C API for BALTECH SDK

§ brp_Iso78_OpenSam()

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().

Parameters
[in]protocolused to execute the command
[in]LIDLogical SAM-ID (LID)
[out]SamHandleIdentifier for SAM communication. Use this value in all subsequent calls of brp_Iso78_CloseSam() and brp_Iso78_ExchangeApdu().
[out]ATRATR (Answer To Reset) string of SAM
[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