Specifications

M1 Control RS-232 ASCII String Protocol Page 12 of 68 Rev. 1.79 July 16, 2009
4. Messages
With the exception of the message terminator, CR-LF, all characters are printable ASCII.
See Appendix for an example of C source for generating a well-formed message string.
A packet length and checksum generator program is available from ELK Products, Inc. to
generate test ASCII packets. The program is called M1_SDK.exe.
4.1 Data Packet Format
Data packets both from a PC to the control panel and from the control panel to a PC use
the following format.
NNMSD...OO CC (CR-LF )
ASCII hexadecimal Notation - 0x00 to 0xFF, the 0x.. Represents ASCII hexadecimal notation
4.1.1 Packet Length
NN 2 ASCII characters, length of packet including all characters except Length and CR-
LF at the end of the packet. Legal values are ASCII hex 00 to FF. Permissible characters are
ASCII 0-9 and upper case A-F.
4.1.2 Message Type
M 1 ASCII character, message/packet type ID. These are upper and lower case alpha
characters. Upper case is used for responses from the control panel and lower case for
commands to the control panel. Allowed values are a-z and A-Z
4.1.3 Sub-Message Type
S ASCII character, sub-message/packet type. These are upper and lower case alpha
characters. Upper case is used for responses from the control panel and lower case for
commands to the control panel. Allowed values are 0-9, a-z and A-Z.
4.1.4 Data
D... 0 or more ASCII characters of data associated with the command/packet type. Any
printable ASCII character is permitted. L, P is part of the Data packet as explained when
needed.
4.1.5 Reserved
0 0 Two ASCII characters, reserved for future development. The only currently legal
character is 0 (ASCII zero).
4.1.6 Checksum
CC 2 ASCII characters, 2-digit checksum. This is the hexadecimal two’s complement
of the modulo-256 sum of the ASCII values of all characters in the message excluding the
checksum itself and the CR-LF terminator at the end of the message. Permissible characters are
ASCII 0-9 and upper case A-F. When all the characters are added to the Checksum, the value
should equal 0.