Iso78.OpenSam

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.

Properties

Parameters (request frame)

Name Type/Size Description
LID Enumeration (8 bits) Logical SAM-ID (LID)
Values:
  • AV2 (0x00)
    Use this value to select an NXP MIFARE SAM AV2 or AV3.
  • HID (0x01)
    Use this value to select an HID SE Processor (also known as iClass SAM ).
  • Gen1 (0x10)
    Use this value to select a SAM different from those named above.
  • Gen2 (0x11)
    Use this value only if the reader has 2 SAM slots, and both SAMs are different from those named above. In this case, use the values Gen1 and Gen2 in the following order:
    • Use Gen1 to select the first SAM.
    • Use Gen2 to select the second SAM.

Returned values (response frame)

Name Type/Size Description
SamHandle Integer (8 bits) Identifier for SAM communication. Use this value in all subsequent calls of Iso78.CloseSam and Iso78.ExchangeApdu.
Length of ATR Integer (8 bits) Length of ATR in bytes
ATR Raw data ATR (Answer To Reset) string of SAM