Technical information

10/29/2014
Page 4 of 72
© 2014 The Code Corporation
12393 South Gateway Park Place Suite 600, Draper, UT 84020
(801) 495-2200
FAX (801) 495-0280
3 Host to Reader Command Overview
This section is intended to introduce developers/users to the basic command types of the Reader.
There are two ways to send a command to the Reader: from a Host computer, or by scanning a
barcode containing a command sequence. In addition, there are two methods of sending a command
from a Host computer to the Reader: packetized and text commands.
3.1 Packetized Commands
Packetized commands are the most reliable way to communicate to the Reader. The packet consists of
a prefix and a suffix. The prefix contains the amount of data to be transmitted and the suffix contains
error detection. Unlike text commands, packetized commands are always enabled. (See Section 6.2)
3.2 Text Commands
Text commands are provided as an easy way to send a command to a Reader but they lack the
reliability of packetized commands. In addition, text commands must be enabled. Text commands can
easily be sent from a terminal program and use a %xx (similar to URL encoding) to translate an escape
sequence containing a 2-digit hex value corresponding to the single 8-bit ASCII character. This allows
non-printable ASCII characters to be entered via the terminal program. Text commands can be sent via
the RS232, USB Virtual COM (VCOM) or USB HID mode by using appropriate communication software.
In addition, the developer/user may send text commands by using CRB files. (See Section 9)
3.3 Barcode Commands
The Reader will recognize the following sequence within a barcode as a command to the Reader:
SOH ‘X’ GS STX Text-Command EOT (Packet does not contain spaces)
The Text-Command portion contains a text command as described above.
Because the Barcode Command is terminated with ASCII EOT, the Text-Command may not contain EOT.
If the Text-Command needs to contain EOT, encode it as %04.
3.4 Training
Code Corporation highly recommends attending technical training provided by Code via webinar and
on site. This training is designed to provide in-depth knowledge/usage of the ICD for developers and
users.
4 Communication Medium
The Reader communicates with the Host via USB (keyboard/HID/VCOM), RS232, Bluetooth, or WiFi.
The Host includes appropriate hooks and/or drivers to enable two-way communication with the
Reader.