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 Iso78.ExchangeApdu to communicate with the SAM.

To close the communication channel after data exchange, run 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 Iso78.CloseSam and 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