This command is deprecated. Do not use it in new code as we may remove it in the future!
Transparent command to directly access the Legic reader chip module.
Every command which is defined in the LEGIC documentation for the SC-2560 module or the SM-4x00 chip may be executed using this pass-through command.
For the direct communication with the reader chips SC-2560 or SM-4x00 LEGIC defines a protocol frame that consists of the following fields (refer also to LEGIC documentation):
|NUMBER OF BYTES/LEN||CMD||DATA||LRC/CRC|
The reader firmware handles this frame protocol internally by calculating and appending the NUMBER OF BYTES/LEN and LRC/CRC fields automatically. The host application only specifies the fields CMD and DATA in the transparent command parameters.
The protocol frame for the response consists of the following fields:
|NUMBER OF BYTES/LEN||CMD||STAT||DATA||LRC/CRC|
Similar to the command frame protocol also the response frame protocol is handled by the reader firmware. It verifies the CRC checksum and removes the NUMBER OF BYTES/LEN, CMD and LRC/CRC fields. Only STAT and DATA are returned to the host.
Parameters (request frame)
|CmdCode||Integer (8 bits)||
Reader chip specific command code.
This parameter equals the parameter CMD in the LEGIC documentation.
|Length of CmdParams||Integer (8 bits)||
Length of CmdParams in bytes
Command specific parameter bytes.
This parameter contains all command related parameters also referred to as DATA. Please don't mix the preceding length value up with the LEN/NUMBER OF BYTES field in the LEGIC documentation!
|Timeout||Integer (16 bits)||
Command execution timeout in ms.
The parameter specifies the maximum time the device should wait for a response from the reader chip before it interrupts command execution and returns a status message. Required value is not specified exactly by LEGIC. It depends on the particular command and its parameters. In case the reader returns the BRP status code Lga.ErrCommunication the selected timeout might be too small.
Returned values (response frame)
|Status||Integer (8 bits)||
The received reader chip specific status code.
This response parameter equals the parameter STAT in the LEGIC documentation.
This field is only available in the response frame if the returned BRP status code equals 0x00 or Lga.ErrLegic!
|Length of Resp||Integer (8 bits)||
Length of Resp in bytes
The received command response bytes.
Please don't mix the preceding length value up with the LEN/NUMBER OF BYTES field in the LEGIC documentation!
This parameter is only available in the response frame if the returned BRP status code equals 0x00!