Programming instructions
81
Intermec Fingerprint 6.13 – Programmer's Guide
7. INPUT TO FINGERPRINT, cont'd.
9. RS 422/485
Communication, cont'd.
Note:
Do not confuse this ESC character with
the ASCII ESCape character = ASCII
27 decimal).
If a byte somewhere in the packet should
be the same code as the START or ESC
characters, it must be substituted by a
two-byte sequence:
If a byte = START,
send ESC+ASCII 220 dec.
If a byte = ESC,
send ESC+ASCII 221 dec.
Protocols
All packets of data must be preceded by a header record, in which
all data are binary:
START DST SRC LEN PROTO CRC <Data record/Request >
Header record: 5 bytes
START indicates the start of the header record. Either of the
following two characters can be used as start character:
START ASCII 192 decimal, or
ESC ASCII 219 decimal, see note!
DST is the destination address 0–31 (1 byte).
SRC is the source address 0–31 (1 byte).
LEN is the size in bytes of the data record, max. 249 characters
(1 byte).
PROTO specifies type of protocols 0 or 1 (1 byte), see below.
CRC is the checksum of the header record (1 byte), i.e. the
inverted sum of DST+SRC+LEN+PROTO bytes.
• PROTO = 0
This protocol is used for transfer of data. The syntax is:
START DST SRC LEN PROTO=0 CRC <Data record>
• PROTO = 1
This protocol is used for communication check from a host
computer (cannot be sent from a printer!). Instead of a data record,
a REQUEST byte (0 or 1) appends the header record. Any printer
in the loop can be checked if it is on-line (REQUEST = 0), or
inquired for the number of seconds that have passed since its last
startup or reboot (REQUEST = 1). If the printer is on-line, it will
answer by returning the corresponding REQUEST byte, in the
latter case followed by the time expressed as a 10-digit value with
leading zeros.
Example 1. The host computer sends:
START DST SRC LEN PROTO =1 CRC REQUEST=0
The printer replies:
START DST SRC LEN PROTO=1 CRC REQUEST=0
Example 2. The host computer sends:
START DST SRC LEN PROTO =1 CRC REQUEST=1
The printer replies:
START DST SRC LEN PROTO=1 CRC REQUEST =1+time (nnnnnnnnnn)