User manual

V002450_25_CR1200-CR2-CR3-CR2500-CR3500_Interface_Configuration_Document_CLIENT.docx
2011-04-27 Page 6 of 65
© 2011 The Code Corporation
14870 S. Pony Express Rd., Suite 200, Bluffdale, UT 84065
(801) 495-2200
FAX (801) 495-0280
5 Reader to Host Communication
The Reader may be configured in raw mode, where no packet framing or check characters are sent, and
packet mode. (See section 2.1 and 2.2) The Reader may also be configured to expect an
acknowledgement from the Host after each packet and automatic retry when no acknowledgement is
received. Standard “one-way” mode of operation uses raw packets, no expected response from Host, and
no automatic retry. Standard “two-way” mode of operation uses packets with framing and checks
characters, expects a response from the Host, and automatically resends. If no Acknowledgement is
received (Ack), three (3) attempts to resend are made.
5.1 Raw Data
Reader to Host communication consists of decoded raw data having no framing or check characters.
Raw data is sent with no “end of packet” data (crc16). One-way communication, expects no response
from Host and no data is resent.
5.2 Packet Data
Data from the Reader to the Host consist of packets as specified below. Packetized data is sent using
ACK/NAC protocols with framing and check characters. Packets are delivered asynchronously as
graphical codes are read and in response to Host to Reader commands. For keyboard communication
(USB keyboard or PS/2 or AT keyboard), all ascii-characters are transmitted as keyboard-sequences.
For all other communication ports, all ascii-characters are transmitted as ascii-bytes.
Note: when sending data via the keyboard port, the state of the Caps-Lock is assumed to be “off” (i.e.,
capital letters are always shifted; lower-case letters are never shifted). The Host shall perform
capitalization-translation, if necessary, based on the actual state of the Caps-Lock.
Note: Even though the data size field allows up to 65535 bytes of data in a packet, the actual size of a
packet either in raw or in packet mode including data and packet overhead is maximum 16384 bytes.
packet: start packet-type
nz
data
opt
end
start: packet-start
nr
| codeXML-start
nz
packet-start: SOH ‘X’ ‘R’ protocol-version Reader-id packet-number timestamp data-size
end: codeXML-end
nz
crc16
nr
codeXML-start: SOH ‘X’ RS tag_response ‘/’
codeXML-end: EOT
tag_response: ‘ap’
packet-type: Single ascii-character in table below
data: character
| data character
protocol-version: ‘1’
Reader-id: big-endian 32-bit number
packet-number: data-packet-number | cmd-packet-number
data-packet-number: any byte value in the range [0,7f]; increments with each packet; does not
increment with resends; used with z and a packets only