$SCCMD Commands to Reader

$SCCMD commands are used to send a basic, short command to the Smart Reader. Complex commands shall always be passed using the Direct Protocol.

The generic format of a $SCCMD message is as follow:

$SCCMD;<Field1>=<Value1>;<Field2>=<Value2>;...;<FieldN>=<ValueN>*<Checksum><CR><LF>

The header $SCCMD is a constant to identify the message.

The $SCCMD message is a set of <Field>=<Value> tuples. Every tuple is optional.

The <Checksum> field is the XOR of all bytes from the first ‘$’ sign to the last ‘*’ sign (both included), expressed in hexadecimal.

In this direction (host to device), the <Checksum> field is optional. When this field is present, the device verifies that it is valid; otherwise, the command is accepted without further verification.

The total length of the message shall be shorter than 256 characters. Longer messages will be discarded.

Fields supported by the $SCCMD message

SEQ

Set the SEQ field to have the device play one of its pre-defined UI sequences.

<Value> is a single byte value, expressed in hexadecimal, to select the sequence to play.

See PLAY_SEQUENCE for the complete list of pre-defined sequences.

LEDS

Set the LEDS field to control the device’s LEDs directly.

<Value> is a 4-byte value, expressed in hexadecimal. Byte 0 controls the 1st LED, byte 1 controls the 2nd LED, byte 2 controls the 3rd LED and byte 3 controls the 4th LED.

See SET_LEDS and LED Modes for details.

BUZZ

Set the BUZZ field to control the device’s buzzer directly.

<Value> is a 2-byte value, expressed in hexadecimal, MSB-first, to specify the duration of the beep (in milliseconds).

See SET_BUZZER for details.

Examples

$SCCMD;LEDS=92929292;BUZZ=0064<CR><LF>

This command does the following:

  • Set the 4 LEDs to flash-blinking (pattern is 20% ON, 80% OFF) with a 100ms period (frequency 10Hz),
  • Beep during 100ms.
$SCCMD;SEQ=60<CR><LF>

This command plays the Access Granted sequence (60 in hex).

$SCCMD;SEQ=61<CR><LF>

This command plays the Access Denied sequence (61 in hex).