V002450 CR1200 CR2/CR2500 CR3/CR3500 Interface Configuration Document Client Edition V002450_25_CR1200-CR2-CR3-CR2500-CR3500_Interface_Configuration_Document_CLIENT.docx 2011-04-27 Page 1 of 65 © 2011 The Code Corporation • 14870 S. Pony Express Rd.
Table of Contents 1 Scope................................................................................................................................................... 4 2 Host to Reader Command Overview .............................................................................................. 4 2.1 Packetized Commands ................................................................................................................ 4 2.2 Text Commands .................................................
12.4.14 Example OCR User Templates ......................................................................................... 55 12.5 OCR Internal Templates ........................................................................................................... 57 12.5.1 Passport Internal Template ............................................................................................... 57 12.5.2 ISBN Internal Template ..................................................................................
1 Scope This Interface Configuration Document (ICD) specifies the communication protocol between the Code Reader 2.0™ (CR2), Code Reader 3.0™ (CR3), Code Reader 2500™ (CR2500), Code Reader 3500™ (CR3500), Code Reader 1200™ (CR1200) and application software that runs on the Host computer, specific Reader commands, examples of a variety of ways to communicate and send data to the Reader (i.e., RS232, USB, RF) and command/communication types.
2.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. 3 Definitions 3.1 Notations The interface protocol is described as a set of grammars, indicated by different type styles and symbols. These indications are listed in the table below.
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.
cmd-packet-number: any byte value in the range [80-ff]; increments with each packet; does not increment with resends; used with all packets other than z and a timestamp (4 bytes): big-endian 32-bit number, indicates timestamp in seconds (relative to Reader power-up or last time set in Reader) (For all but z packets, the timestamp represents the time the packet was sent to the Host; for z packets, the time the code was read.
a d e g h Indicates that data contains the first part of a decode. A sequence of a packets always ends with a z packet. The data of all a packets in a group and the final z packet are concatenated by the Host. (Also see the Host-to-Reader ‘R’ command description.) Indicates that a command and its associated data were successfully received; data optionally contains a null-terminated text message. Indicates that a command was not successfully received, i.e.
i Indicates that data contains the zero-terminated Reader information string (of printable ASCII characters and TAB) in the following format: VVVVWWWWXXXXSSSSSSSSSSAOODYYYYHHIIIIJJJJKKKKLLLLZ…Z where: m p r z VVVV is the application firmware version number; WWWW is the bootloader firmware version number; XXXX is the radio firmware version number; SSSSSSSSSS is the Reader’s serial number (ten digits); A is “A” if running firmware is the application, “B” if bootloader; OO is the OEM identifier; D is
Raw Mode ‘z’ (data) packet: data ‘i’ (non-z) packet: CodeXML® ‘i’ response CodeXML-start SOH ‘X’ RS ‘ap/’ packet-type data CodeXML-end ‘i’ VVVV… EOT Packet Mode Version 1 ‘z’ (data) packet: packet-start SOH ‘X’ ‘R’ ‘1’ Reader ID (4 bytes) packet number (1 byte) data time data size stamp (2 bytes) (4 bytes) packet-end crc16 data (2 bytes) ‘i’ (non-z) packet: CodeXML® ‘i’ response packet-start SOH ‘X’ ‘R’ ‘1’ time Reader packet data size number stamp ID SOH ‘X’ (2 bytes) (4 bytes) (1 byte)
‘i’ (non-z) packet: CodeXML® ‘i’ response packet-start SOH ‘X’ ‘R’ ‘0’ packet number (1 byte) time stamp (3 bytes) data size (2 bytes) SOH ‘X’ RS ‘ap/’ ‘i’ VVVVWWWWXX EOT XXSSSSSSSSSSP packet-end crc14 (2 bytes) Figure 1: Example ‘z’ and ‘i’ Packets in Raw and Packet Modes Optionally, whenever the Host receives a packet, the Host will respond by sending a Y or R packet (defined in the Host to Reader Communication section) to the Reader.
Serial Downloader programs using files with the .crb file extension. The .crb file contains one command per line in the same format as text-command. (See Section 10). Encoded-data is decoded by the Reader by replacing %xx by a single byte with the value specified by the two hex-digits xx, e.g., %25 would be replaced by character number 0x25, which is ASCII %. text-command: command-type encoded-dataopt command-type: Single ASCII character in the set defined in Section 6.
#%03 Expected output: should make Reader beep/vibrate 3 times Example 2 (set Reader to continuous-read, near field only): P(C4)5Expected output: should set Reader to continuous-read, near field only 6.2 Packetized Commands Packetized commands consist of packetized data sent from Host to Reader to configure and cause the Reader to perform certain functionalities (e.g. CodeXML® rules, and settings). Packetized commands are always enabled, unlike text commands.
$ Posts a simulated button event to the Reader; data contains the event number as a single character. See register 39 in Section 8 for a list of the event numbers. (The Reader will respond with d or e.) ( Example – read both near and far fields: $%03 Causes the Reader to upload any logged error messages (no data) (The Reader will respond with a g packet, zero or more z packets, and a final d or e. Each z packet contains a portion of the requested data in its data field.
. Causes the Reader to flash its LEDs; data contains four bytes: LEDs repetitions onTime offTime LEDs specifies the state of the LEDs: 1 to turn on, 0 to turn off: Bit LED Applicable Hardware 7 reserved, always 0 CR2, CR3 6 left blue CR2 5 left green CR2 4 left red CR2 3 center green CR3, CR1200 2 center red CR3, CR1200 1 right green CR2 0 right red CR2 Both onTime and offTime are specified in 1/100th seconds (max 2.55 seconds). (The Reader will respond with d or e.
9 Requests the Reader to delete a file from its storage; data contains the file name, terminated with ASCII NUL. (The Reader will respond with d or e.) Note: Supported in firmware version 3100+ : Requests the Reader to send configuration data to the radio module (The Reader will respond with zero or more h followed by a d or an e.) For example, data consisting of a single zero byte will cause the radio to disconnect from the Host. (See Section 9: Radio Commands.
@ Causes the Reader to reset its internal date/timestamp to the specified time; data contains the date and/or time in one of the following formats. yyyy-mm-dd hh:mm:ss yyyy-mm-dd hh:mm hh:mm:ss hh:mm Note: the separators are optional; only digits are significant. (The Reader will respond with d or e.
0x17 Performance String D1 0x18 Performance String D2 0x19 Performance String D3 0x1a reserved 0x1b reserved 0x1c Performance String SB 0x1d Performance String SN 0x1e Performance String SF 0x1f Performance String VB (Obsolete) 0x20 Performance String VN (Obsolete) 0x21 Performance String VF (Obsolete) 0x22 Performance String AB (Obsolete) 0x23 Performance String AN (Obsolete) 0x24 Performance String AF (Obsolete) 0x25 – 0x47: for user applications 0x48 User defined “No Read” value (see register 55 in Secti
J Requests the Reader to restore settings to factory defaults (no data). (The Reader will respond with d or e.) L Requests the Reader to send a list of its stored files; data is either empty or contains “1”; hidden files are listed only if “1” is specified. (Hidden files are files whose names begin with a period.) (The Reader will respond in the same manner as with the ‘(’ command, each z packet containing a file name as a NUL-terminated string of printable ASCII characters.
T Requests the current date and time (no data) (The Reader will respond with d with data containing the date and time formatted as yyyy-mm-dd hh:mm:ss.) Note: on units without a battery-backed real-time clock, the date and time will reset to 2000-01-01 00:00:00 upon power-up. U Supported in firmware version 2526+ Requests the Reader to delete all stored files including data, images, and JavaScript files (no data) (The Reader will respond with d or e.
^ Requests the Reader to upload the specified stored file; data contains the file name, terminated with ASCII NUL. (The Reader will respond in the same manner as with the ‘(’ command with the following additions: in the g packet, data contains the filename followed by a tab character, followed by the file’s size in parentheses (e.g., “test.txt (1292)”); in the d packet, data contains “EOF” followed by a tab character, followed by the file’s CRC16 in parenthesis (e.g., “EOF (13626)”).
8 Reader Settings The Host sets the Reader settings using the /, O, P, Q, and = commands and reads them using the G, ,, and < commands. For example, the following P command sets register 2e to the value 7f. P(2e)7f Note: for two-digit setting numbers (i.e., settings 00 through fd), an alternative format may be used: in place of the parentheses and hexadecimal setting number, substitute a single character, which represents the setting number. The equivalent to the example above is P.7f (the ASCII ‘.
Given the settings above, the binary string to turn on NEC 2 of 5 decoding with checksum checking with the checksum stripped from the result string, allowing 2 digit symbols is 10111 (bits left to right). The same string would be 0x17 or decimal 23 Thus, the command to implement the settings above would be: P(0a)17 Or P(0a)#23 8.2 Reader Settings Table Note: If only one default value is shown then this value is applicable and identical to both CR2/CR3 and CR1200.
Reg 05 Setting Name No Wait USB (usbKbEnumNotWaitForSet ReportLed) Default (hex) 0 Comment 0: Default mode, declare enumeration after receive set LED status report 1: Declare enumeration after receive get report descriptor command.
Reg 0b Setting Name Matrix 2 of 5 Symbology (matrix2of5Options) Default (hex) 1 Comment Binary Dip Switch Bit Controls 0 Matrix 2 of 5 Decoding 1 Checksum checking 2 Strip checksum from the result 3 1 Digit Symbol Allowed 4 2 Digit Symbol Allowed Value 0: Disable 1: Enable 0: Disable 1: Enable 0: Disable 1: Enable 0: Disable 1: Enable 0: Disable 1: Enable All symbol lengths greater than 2 are always enabled when Matrix 2 of 5 Decoding is enabled 0c 0d 0f Telepen Symbology (telepenEnable)
Reg 1a Setting Name Straight 2 of 5 Symbology (enableMiscBarcodes) Default (hex) 1 1b Communications Mode (commMode) 2 Comment 0: Disable 1: Enable Straight 2 of 5 (with 2 or 3 start/stop codes ) Decoding CR2/CR3: 0: PS/2 (AT) keyboard 1: RS232 serial 2: USB keyboard 3: Reserved 4: RF (Bluetooth®) 5: USB Native (HID) 6: USB VComm (3000+ firmware) 7: USB HID POS -Terminal 131 (firmware 3484+) CR1200: 0: PS/2 (AT) keyboard (firmware 4126+ and serial number 10050561+) 1: RS232 serial 2: USB keyboard 3: R
Reg 1c Setting Name Baud Rate (uartBaud) Default (hex) E100 (# 57600) 1d Stop Bits (uartStopBits) 2 1e Data Bits (uartDataBits) 8 22 Parity (uartParity) 0 26 Beep/Vibrate Volume (beepVolume_percent) 64 (#100) Comment All standard baud rates up #115200 • #9600 (2580) • #19200 (4B00) • #38400 (9600) • #57600 (E100) • #115200 (1C200) 1: Send 1 stop bit 2: Send 2 stop bits 7: 7 data bits 8: 8 data bits 0: None 1: Odd 2: Even Valid Range: 0 to 64 (#100) Percent This is the percentage of full volum
Reg 2c Setting Name Extra Time in Active Mode When Cable is Connected (extraCabledActiveTime_ms) Default (hex) 6DDD00 Comment Valid Range: 0 to 7FFFFFFF Milliseconds (#120*60*1000 (7200000 ms or 2 hours)) Active Mode is the time between the last user interaction with the Reader (button press, etc.) and Power-Saving Idle Mode. This setting increases Active Mode time only when the Reader is cabled.
Reg 36 37 39 3a 3b 3c 40 Setting Name Number of Control Frames Before Picture Capture (agcFramesBeforePicture) Default (hex) 6 Host Acknowledgement Time Limit (HostAckTimeout_ms) 2BC (#700) Right Top Button (button1) 4 Left Top Button (button2) Combination of Left and Right Buttons (button3) Handle Button (button4) Text Command Timeout (HostPacketTimeout_ms) Comment Valid Range: 0 to 7FFFFFFF Frames Number of frames captured and discarded before live picture to give the gain control time to ad
Reg 41 Setting Name Text Commands (commandOptions) Default (hex) 8 Comment Binary Dip Switch Bit Controls 0 Text Commands 1 Suppress Echo 2 Suppress Responses 3 4 5 Disable Text Commands but Enable Magic Sequence; See Below Suppresss URL Decode; See Below Accept On Timeout Value 0: Disable 1: Enable 0: Disable 1: Enable 0: Disable 1: Enable 0: Disable 1: Enable 0: Disable 1: Enable 0: Disable 1: Enable Magic Sequence: The Magic Sequence is the string “;>PAx” where x is 1, 3, or 7 as defined ab
Reg 47 Setting Name MaxiCode Symbology (enableMaxiCode) Default (hex) 0 Comment Binary Dip Switch Bit 48 Codabar Checksum (miscBarcodeChecksum) 0 0 MaxiCode Decoding, Mode 0 1 MaxiCode Decoding, Mode 1 2 MaxiCode Decoding, Mode 2 3 MaxiCode Decoding, Mode 3 4 MaxiCode Decoding, Mode 4 5 MaxiCode Decoding, Mode 5 6 MaxiCode Decoding, Mode 6 Code 39 Symbology (code39FullAscii) 0 4a Composite Codes (enableCompositeCodes) 0 Value 0: Disable 1: Enable 0: Disable 1: Enable 0: Disable 1:
Reg 4c Setting Name RSS Symbology (enableRss) Default (hex) 0 Comment Binary Dip Switch Bit Controls 0 RSS Expanded decoding 1 RSS Expanded Stacked decoding 2 RSS Limited decoding RSS-14 and RSS-14 Truncated decoding RSS-14 Stacked and RSS-14 4 Stacked omni-directional decoding 0: Disable 1: Enable 3 4d UPC Expansion (enableUpcExpansion) 1 4e UPC Supplemental (enableUpcSupplemental) 1 4f MSI Plessey Symbology (enableMsip) Aztec Symbology (enableAztec) 0 50 0 Also see registers: 4e, 6a
Reg 55 Setting Name Notify of No-Read (notifyOfReadFailure) Default (hex) 0 Comment 0: Disable 1: send “r” packet on No-Read (See “r” packet in Section 5.2.) 0x100xx: post event on No-Read , where the lower 8 bits specify the event number. For example, 0x10009 to post Event 0x09. The following example will use a stored code and stored code event to output “No Read” on read failure.
Reg 71 Setting Name Interleave 2 of 5 Checksum (interleave2of5Checksum) Default (hex) 0 Comment Binary Dip Switch Bit 0 1 72 73 Auto Stored Data Erase (autoLogErase) Auto Transfer Buffer Memory (autoBufferUpload) 1 1 74 UPC Short Margin (enableUpcShortMargin) 1 75 RS-232 Batch Mode (uartAlwaysConnected) Storage Mode (sendAndStoreMode) 0 Settings Lock (settingsLock) Trioptic Options 1 76 78 85 0 1 Controls Interleave 2 of 5 Checksum Checking Strip Checksum From Output Also see register
Reg 87 88 Setting Name Motion Detection Sensitivity (motionThresh) Default (hex) CR2x: 19 (#25) Time in Sleep Mode (sleepTimeout_sec) CR1200: F (#15) 1C20 (#2*60*60 (7200 sec or 2 hours)) Comment Valid Range: The sensitivity of motion detection. Lower numbers make detection more sensitive; higher numbers, less sensitive. Valid Range: 0 to 7FFFFFFF Seconds Sleep Mode is the time between Standby Mode and Power Off Mode.
Reg 93 Setting Name Suppress Beep On Decode (suppressBeepOnDecode) Default (hex) 0 Comment 0: beep indicating decode before JavaScript processing 1: call JavaScript without beeping to indicate decode Normally, the Reader beeps as soon as decodes are read and processes them via JavaScript if necessary after the beep.
Reg 9f Setting Name Time in Standby Mode (standbyTimeout_sec) Default (hex) 0 Comment Valid Range: 0 to 7FFFFFFF Seconds Standby Mode is the time between Idle Mode and Sleep Mode. Standby Mode has lower power consumption but is in a state very similar to Idle Mode.
Reg af Setting Name Picture Window Height (pictureWindowHeight) b0 Laser Target on Before Picture (targetBeforePicture) b1 When to apply CodeXML® rules (configCodesBeforeCodeXm l) b3 b4 Default (hex) CR2/CR3: 280 (#640) CR1200: 400 (#1024) 0 2 Time of retries before Reader gives up sending (commMaxSendAttempts) 3 noStoreIfNotConnected CR2/3: 0 0: Laser off before picture capture 1: Laser on before picture capture Also see registers: 36, 43, ab, ac, ad, ae, af 0: Process configuration strings o
Reg c7 Setting Name SXGA Far Field Window Vertical Size (farFieldDecodeWindowWid th_pixels) Default (hex) CR2/CR3: 280 (#640) SXGA Far Field Window Horizontal Size (farFieldDecodeWindowHeig ht_pixels) interleave2of5Lengths CR2500/CR3500: 400 (#1024) Valid Range: 1 to 400 (#1024) Pixels 0 FFFFFFFC: 2 and 4 digit disabled FFFFFFFD: 2 digit enabled FFFFFFFE: 4 digit enabled ca Auto Disconnect (autoDisconnect) 0 cd Codablock A Symbology (enableCodablockA) Codablock F Symbology (enableCodablockF) Mac
Reg e2 Setting Name imagerResolution Default (hex) 0 Comment 0: SXGA (1280x1024) 1: VGA (640x480) e3 button1ConfirmationTime_m s 0 Note: Error beeps (6 beeps) if in a programming code. Valid Range: 0 to 7FFFFFFF Milliseconds e4 button2ConfirmationTime_m s 0 The button must be pressed and held for this amount of time (without change in which buttons are held down) before the button press is accepted. Setting this value greater than zero makes it easier to select combinations of buttons (e.g.
Reg f1 f2 f3 f4 Setting Name VGA Near Field Window Vertical Size (CR1200 Horizontal) (vgaNearFieldDecodeWindo wWidth_pixels) VGA Near Field Window Horizontal Size (CR1200 vertical) (vgaNearFieldDecodeWindo wHeight_pixels) VGA Far Field Window Vertical Size vgaFarFieldDecodeWindow Width_pixels Default (hex) CR2/CR3: 140 (#320) CR1200: 280 (#640) CR2/CR3: 1E0 (#480) CR1200: 1E0 (#480) CR2/CR3: 140 (#320) Comment Valid Range: CR2/CR3: 1 to 320 pixels CR1200: 1 to 640 pixels Note: Supported in firmware
Reg fc fd 100 Setting Name Keep reading codes as long as button is held down (keepReadingWhileButtonIs Pressed) Default (hex) 0 log battery level and timestamp (logBatteryLevel) 0 Backlight Timeout (backlightTimeout_ms) BB8 (#3000) Comment 0: Disable (requires button to be released before next scan occurs) 1: Enable Note: when enabled, duplicateBlockTime_sec should be set to be greater than zero.
Reg 106 10b Setting Name Display black mode gray scale settings (lcdBlackMode) Default (hex) 9999 Enable JavaScript (enableJavaScript) 1 Comment Valid Range: (each digit): 0 to 9 For all gray scales, each digit (4 bits) divided by 9 represents the percent of time a pixel of the corresponding gray scale is turned on in each frame. The lowest 4 bits correspond to frame 1, next 4 to frame 2, etc. Note: Supported in firmware version 2526+ 0: Disable 1: Enable When set to 0 installed scripts are disabled.
Reg 12c Setting Name Data Matrix Improvement (dataMatrixMiscImprovemen t) Default (hex) 0 Comment Binary Dip Switch Bit Controls 0 Binarization Improvement 1 Low Contrast Improvement Value 0: Disable 1: Enable 0: Disable 1: Enable Improves the decoding capability of the Reader on low contrast or pixilated Data Matrix bar codes 12d Hong Kong 2 of 5 Symbology 0 Note: Supported in firmware version 3280+ Binary Dip Switch Bit 12f Notify Of Packet Rejection (notifyOfPacketRejection) 1 Controls
Reg 150 Setting Name Background Bluetooth® Connection (synchronousSend) Default (hex) 0 Comment 0: Bluetooth® connection is confirmed before user is allowed to scan. Pressing the trigger button will cancel the connection. 1: Allows user to begin scanning before the Bluetooth® connection is confirmed.
Reg 173 Setting Name Enable Bluetooth® Encryption (enableBluetoothEncrytion) Default (hex) 0 Comment 0: Disable 1: Enable Enables the standard AES 128 bit Bluetooth® encryption.
Name Auto Connect # 07 Clear Setup 08 Send Setup 09 Comments If connection information exists for the specified Device Address, use it to establish a connection. Otherwise, attempt to establish a connection and store the resulting information. Remove connection information associated with the specified Bluetooth® Address.
File test.
the pixel raster scan line. Decoding is performed in the “normal” direction (left bars more significant than right bars for horizontal symbols; top bars more significant than bottom bars for vertical symbols). 7 = enable PharmaCode decoding, Color bars expected; relaxed contrast rules for the three least significant bars. Vertically oriented symbols are decoded. Note that vertically oriented means that the bars are parallel to the orientation of the pixel raster scan line.
specifics of the text to read. This allows the software to distinguish the text of interest from random text that may be present in the same image. In addition, the OCR decoder supports a checksum capability to reduce the probability of misreads. Multiple templates may be active at the same time for more user flexibility. 12.2 OCR Overview The following OCR characters are currently supported: OCR-A: ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789 #$&()*+-.
characters from the checksum to the first character of a single row in a template. A block checksum provides a checksum from its character position all the way to the first character of the overall template. For additional checksum protection, four different weighting schemes are supported: 1, 12, 13, and 137. Finally, the checksum calculation is based on modulo arithmetic. The modulo factor may vary from 6 to 36. The OCR decoder is designed to read OCR text that is within a certain sampled range in pixels.
12.4.1 End of Template (0) All templates end with the End of Template control code. 12.4.2 New Template (1) A user template may contain multiple distinct templates all within the same string. These distinct templates all begin with the New Template control code. The value immediately following this control code indicates the font(s) for which this template is designed.
The sequence of numbers of 65 through 70 are the decimal ASCII values for the upper case letters A through F. To use the defined group, we use the Defined Group (10) control code followed by the group ID. Each sequence of 10,1 above occupies a single character position in the OCR text to be read. The remainder of the example above include the Template Start (1) control code at the beginning followed by the OCR-B font designator (2). Finally, the template is ended with the End of Template (0) control code.
The In Line Group must always be ended with an In Line Group End control code. 12.4.12 In Line Group End (12) The In Line Group End control code is used to terminate an active In Line Group definition. 12.4.13 Checksum (13) Checksums may be used to reduce the probability of misreads involving OCR. The OCR decoder supports a number of options associated with checksums. The user may specify the type (block or row), the weight scheme (1, 12, 13, 137) and the modulo value of the checksum (6-36).
13 137 1,3,1,3,1,3,…. 1,3,7,1,3,7,1,3,7,…. The checksum character itself always start with a weight of 1. As we move away from the checksum towards the left, we update the weight value to the next member of the sequence. The sequences repeat over and over until the first character in a row for a Row type checksum, and to the first character in the template for a Block type checksum.
code 133), while the block checksum is a mod 36 with a 137 weight (control code 255). The following template will read this text: 1,2,6,6,6,6,13,133,2,6,6,6,13,133,13,255,0 The top line checksum is the 6 at the end of the line. While this example shows the checksum at the end of the line, it may appear anywhere on the line and then protects all the characters to its left.
Notice the multiple use of the New Template control code (1) to separate the two individual templates along with the Font ID of 1 for the first OCR-A string and the 2 for the OCR-B string. In addition, the decimal values of 65 and 66 are the ASCII codes of the upper case letters A and B, respectively, and indicate that those character positions will always have those values. 12.5 OCR Internal Templates The OCR decoder currently supports three internal templates: Passport, ISBN, and Price Field. 12.5.
OCR decoder supports either format. Also, according to the ISBN specification, the hyphens in the ISBN string may be replaced by spaces. The OCR decoder supports this format as well. There is a new ISBN format that will be in effect as of January 1, 2007. It adds an additional 4 characters to the original ISBN number: ISBN 978-0-571-08989-5 The ISBN template supports this format along with the original. All the comments associated with the original ISBN format discussed above apply here as well.
13 Appendix: B-String Settings B%0d%01X%1d%02P%640%04%01X%1d%02P%920%04%01X%1d%02P%951%04%01X%1d%02 P%a3177%04%01X%1d%02P%a5177%04%01X%1d%02P%b5177%04%01X%1d%02P%b60%04%0 1X%1d%02P%28122)0%04%01X%1d%02P%54#1024%04%01X%1d%02P%53#640%04%01X%1d %02P%c8#1024%04%01X%1d%02P%c7#640%04%01X%1d%02P%5c1%04%01X%1d%02P%5d#12 %04%01X%1d%02P%7b#24%04%01X%1d%02P%a8#25%04%01X%1d%02P%5a#10%04%01X%1d %02P%5b#50%04%01X%1d%02P%7c#90%04%01X%1d%02P%a9#95%04%01X%1d%02P%aa120 %04%01X%1d%02P%dc#256%04%01X%1d%02P%e20%04%01X%1d%02$%03
2P%5b#50%04%01X%1d%02P%7c#90%04%01X%1d%02P%a9#95%04%01X%1d%02P%aa75%04 %01X%1d%02P%dc#256%04%01X%1d%02P%e20%04%01X%1d%02$%03 B%13%01X%1d%02P%640%04%01X%1d%02P%920%04%01X%1d%02P%951%04%01X%1d%02 P%a3177%04%01X%1d%02P%a5177%04%01X%1d%02P%b5177%04%01X%1d%02P%b60%04%0 1X%1d%02P%28122)0%04%01X%1d%02P%f2#480%04%01X%1d%02P%f1#320%04%01X%1d%0 2P%f4#480%04%01X%1d%02P%f3#320%04%01X%1d%02P%5c1%04%01X%1d%02P%5d#12%04 %01X%1d%02P%7b#24%04%01X%1d%02P%a8#25%04%01X%1d%02P%5a#10%04%01X%1d%02 P%5b#50%04%01X%1d%02P%7c#90%04%0
%02P%5b#50%04%01X%1d%02P%7c#90%04%01X%1d%02P%a9#95%04%01X%1d%02P%aa90% 04%01X%1d%02P%dc#256%04%01X%1d%02P%e20%04%01X%1d%02$%06 B%18%01X%1d%02P%640%04%01X%1d%02P%920%04%01X%1d%02P%951%04%01X%1d%02 P%a3177%04%01X%1d%02P%a5177%04%01X%1d%02P%b5177%04%01X%1d%02P%b60%04%0 1X%1d%02P%28122)0%04%01X%1d%02P%54#1024%04%01X%1d%02P%53#640%04%01X%1d %02P%c8#832%04%01X%1d%02P%c7#512%04%01X%1d%02P%5c1%04%01X%1d%02P%5d#12 %04%01X%1d%02P%7b#24%04%01X%1d%02P%a8#25%04%01X%1d%02P%5a#30%04%01X%1d %02P%5b#50%04%01X%1d%02P%7c#90%0
B%21%01X%1d%02P%28122)0%04%01X%1d%02P%e20%04%01X%1d%02Q%64400000FF%04% 01X%1d%02$%06 B%22%01X%1d%02P%28122)5f%04%01X%1d%02O%6440000000%04%01X%1d%02$%03 B%23%01X%1d%02P%28122)5f%04%01X%1d%02O%6440000000%04%01X%1d%02$%05 B%24%01X%1d%02P%28122)5f%04%01X%1d%02O%6440000000%04%01X%1d%02$%06 V002450_25_CR1200-CR2-CR3-CR2500-CR3500_Interface_Configuration_Document_CLIENT.docx 2011-04-27 Page 62 of 65 © 2011 The Code Corporation • 14870 S. Pony Express Rd.
14 Appendix: Example CRC16 C Code /* crc16.h */ #ifndef crc16_h #define crc16_h #include #include #ifdef __cplusplus extern "C" { #endif typedef uint16_t crc_t; crc_t crc ( crc_t initialCrc , const unsigned char* bufPtr , size_t length ); #ifdef __cplusplus } // extern "C" #endif #endif /* crc16.c */ #include crc_t ( , , ) { crc crc_t initialCrc const unsigned char* p size_t n enum V002450_25_CR1200-CR2-CR3-CR2500-CR3500_Interface_Configuration_Document_CLIENT.
{ crcBits = 16, charBits = 8, diffBits = crcBits - charBits }; crc_t c = initialCrc; #include "crc16tab.h" while( n-- ) c = (c << charBits) ^ crcTab[( c >> diffBits ) ^ *p++]; return c; } /*eof*/ /* crc16tab.h * crc16 table of partial remainders generated by * mkcrctab.c with polynomial 1021. * included only from within crc() function in file crc16.
0xd94c, 0x5844, 0xcb7d, 0x4a75, 0xfd2e, 0x7c26, 0xef1f, 0x6e17, 0xc96d, 0x4865, 0xdb5c, 0x5a54, 0xed0f, 0x6c07, 0xff3e, 0x7e36, 0xf90e, 0x7806, 0xeb3f, 0x6a37, 0xdd6c, 0x5c64, 0xcf5d, 0x4e55, 0xe92f, 0x6827, 0xfb1e, 0x7a16, 0xcd4d, 0x4c45, 0xdf7c, 0x5e74, 0x99c8, 0x18c0, 0x8bf9, 0x0af1, 0xbdaa, 0x3ca2, 0xaf9b, 0x2e93, 0x89e9, 0x08e1, 0x9bd8, 0x1ad0, 0xad8b, 0x2c83, 0xbfba, 0x3eb2, 0xb98a, 0x3882, 0xabbb, 0x2ab3, 0x9de8, 0x1ce0, 0x8fd9, 0x0ed1, 0xa9ab, 0x28a3, 0xbb9a, 0x3a92, 0x8dc9, 0x0cc1, 0x9ff8, 0