APPENDIX E: PROTOCOL FOR COMMAND MODE
Rev. : 02/09/2012
131
Appendix E: Protocol for command mode
For the control of the THOR Small Switch device following parameters are used:
For communication please set up the format of the serial data communication to:
115.2K, 8, 1, NO
(115.2 KBAUD, 8 Data bit, 1 Stop bit, NO parity)
Structure of command
<STX>, <command byte (CMD)>, [data bytes (D0..DN)], <ETX>
[ ] = optional elements
Parameter description
Command byte
in the range of 0x40...0x6F (see the list of allowed commands
below)
Data Bytes
a) Binary data:
in order to prevent control commands being
sent during the transmission of binary data, data is divided into
low-nibble and high-nibble. The data is distributed to the low-
nibbles of two bytes and provided with an offset by 0x60 e.g.
0x1F => 0x61 + 0x6F
b) 7bit-data
(0x0...0x7F) are provided with an offset by 0x80,
e.g. 0000011 => 0x83
c) ASCII-data
=> 0x20… 0x7E are unencrypted transmitted
(Special-)Character
ACK
0x06
NAK
0x15
STX
0x02
ETX
0x03
CR
0x0D
ESC
0x1B