Access Restricted
This page contains internal documentation that is not publicly available.
Legic.TransparentCommand
Transparent command to directly access the LEGIC reader chip module of the reader, e.g. the SM-4200 (4000 series) or the SM-6300 (6000 series).
Every command which is defined in the LEGIC documentation for the assembled LEGIC chip may be executed using this pass-through command. Please note that the command sets of the 4000 and the 6000 series differ (e.g. command codes and parameter formats). Thus the command codes and parameters have to be chosen according to the LEGIC documentation of the chip that is actually assembled.
For the direct communication with the LEGIC chip LEGIC defines a protocol frame that consists of the following fields (refer also to LEGIC documentation):
| LEN | CMD | DATA[] | CRC |
The reader firmware handles this frame protocol internally by calculating and appending the LEN and 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:
| LEN | CMD | STAT | DATA[] | 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 LEN, CMD and CRC fields. Only STAT and DATA are returned to the host.
Note: Firmware versions prior to 1100 v2.20.00 restrict this command to LEGIC chips of the 4000 series. LEGIC chips of the 6000 series have to be accessed via Legic.TransparentCommand6000.
Properties
- Command code: 0x1E20
- Command timeout: 3000 ms
- Possible status codes: General status codes, Legic.ErrCommunication, Legic.ErrNotInitialized, Legic.ErrNotAssembled
Parameters (request frame)
| Name | Type/Size | Description |
|---|---|---|
| CmdCode | Integer (8 bits) |
Command code of command to be executed. This parameter equals the parameter CMD in the LEGIC documentation. |
| Length of CmdParams | Integer (8 bits) |
Length of CmdParams in bytes |
| CmdParams | Raw data |
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 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 LEGIC chip before it interrupts command execution and returns a status message. The 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 Legic.ErrCommunication the selected timeout might be too small. |
Returned values (response frame)
| Name | Type/Size | Description |
|---|---|---|
| Status | Integer (8 bits) |
The received LEGIC chip specific status code. This response parameter equals the parameter STAT in the LEGIC documentation. |
| Length of Resp | Integer (8 bits) |
Length of Resp in bytes |
| Resp | Raw data |
The received command response bytes. Please don't mix the preceding length value up with the LEN field in the LEGIC documentation! |