Data Capture for Workforce in Motion BaracodaPencil 2 Communication Protocol ©Baracoda TM – January 2009
Data Capture for Workforce in Motion SUMMARY SUMMARY ................................................................... 2 REVISION HISTORY .......................................................... 3 1. INTRODUCTION ........................................................ 4 1.1. 1.2. GENERALITIES .......................................................... 4 GENERIC PACKET ........................................................ 4 2. COMMUNICATION PROTOCOL ..............................................
Data Capture for Workforce in Motion Revision History Changes to the original manual are listed below. Document Date Description 1.1 26 Jan. 07 Initial release 1.2 29 Sept. 08 Added new commands : 0x5A-0x5B : Get/Set master mode Changed "barcode prefix/suffix" into "capture prefix/suffix" Changed §2.3.5 "barcode messages" into "capture messages" Changed command 0xE0-0xE1 name to "get capture version" 1.3 02 Jan.
Data Capture for Workforce in Motion 1. Introduction 1.1. Generalities BaracodaPencil 2 is a wireless data capture product. This document is detailing the protocol of communication between the Baracoda scanner Pencil2 and its foreign environment through Radio Frequency link (ie: Bluetooth). The protocol of communication does not depend on the type of link. Wireless communication is based on the Bluetooth protocol, thanks to the embedded Baracoda Equinox Bluetooth Stack.
Data Capture for Workforce in Motion 2. Communication protocol 2.1. 2.1.1. 2.1.1.1. Code ID 0x01 Bidirectional packets Control messages Specific packets Description Legacy Frame 0x01 0x01 0x01 Or 0x01 0x02 0x01 These two (2) sequences will be recognized and purged for backward compatibility with older Baracoda products. 2.1.1.2.
Data Capture for Workforce in Motion 2.2. 2.2.1. Scanner to host messages Encapsulation scheme Code ID 0x32–0x33 Description Payload DATA string Barcode data 2.2.2. Data string format Timestamp Data Prefix Capture Prefix Symbology Prefix AIM Identifier Barcode / RFID data Symbology suffix Capture suffix 12 bytes 0-32 bytes 0-32 bytes 0-4 bytes 0, 2 or 3 bytes - 0-4 bytes 0-32 bytes BaracodaPencil 2 – Communication Protocol v1.
Data Capture for Workforce in Motion 2.3. 2.3.1.
Data Capture for Workforce in Motion Code ID Description Payload Response Code ID Description Payload Response Code ID Description Payload Response Remarks Code ID Description Payload Response Code ID Description Payload Response 0x50-0x51 Lock/Unlock Scan engine 1 byte : {0 = Unlock, 1 = Lock} 1 byte : {Bit 0 : Success} 0x52-0x53 Disable Barcode Programming Functionality 1 byte : {1 = Disable barcode programming functionality, 0 = Enable} 1 byte : {Bit 0 : Success} 0x56-0x57 Get/Set In charge beha
Data Capture for Workforce in Motion 2.3.2.
Data Capture for Workforce in Motion Response {Number of minutes before shutdown when disconnected, 1 to 0xFE, 0xFF = infinity} 1 byte: {Bit 0: Success} Code ID Description Payload Response 0x6A-0x6B Code ID Description Payload 0x6C-0x6D Response Code ID Description Payload Response Remarks Get RTC time None 6 bytes: {YY}{MM}{DD}{HH}{MM}{SS} Set RTC time 6 bytes: {YY}{MM}{DD}{HH}{MM}{SS} 1 byte: {Bit 0: Success} 0x74-0x75 Restore defaults settings None 1 byte: {Bit 0: Success} External Flash me
Data Capture for Workforce in Motion 2.3.3.
Data Capture for Workforce in Motion Response Code ID Description Payload Response Code ID Description Payload Response For each step: {(Bit 6: Blue LED 1) (Bit 5: Red LED 1) (Bit 4: Green LED 1) (Bit 2: Blue LED 0) (Bit 1: Red LED 0) (Bit 0: Green LED 0)} {Buzzer frequency, 0 – 0xFF * 50Hz = 0 – 12750Hz} {Delay until next step, in tenth of seconds} 1 byte: {(Bit 0: Success)} 0x8A-0x8B Play Signal 2 bytes: {Signal number, 0 - 3} {Number of loops, 0 – 0xFE, 0xFF = infinity} 1 byte: {(Bit 0: Success)} 0x8
Data Capture for Workforce in Motion Response 1 byte: {(Bit 0: Success)} BaracodaPencil 2 – Communication Protocol v1.
Data Capture for Workforce in Motion 2.3.4.
Data Capture for Workforce in Motion Code ID Description Payload Response 0xC8-0xC9 Get / Set Barcode length Get : None Set : 2 bytes {authorized barcode length. 0 = disabled} Get : 2 bytes {authorized barcode length.
Data Capture for Workforce in Motion Response Code ID Description Payload Response { number of elements to be uploaded MSB } { number of elements to be uploaded LSB } None 2 Start uploading barcodes 1 byte: {0 mandatory} 1 byte: {Bit 0: Success} Code ID Description Payload Response 3 RESERVED N/A N/A Code ID Description Payload 4 Set upload status and end process 2 bytes : {0 mandatory} {1 : upload successful, data can be erased from the scanner 0 : upload failed, do not erase data} 1 byte: {Bit 0: Su
Data Capture for Workforce in Motion Response Comments Code ID Description Payload Response {1 = upload data after retrieving} 1 byte: {(Bit 0:Success)} This is only available if no new scan has been made. 0xD8-0xD9 Enable remote trigger None : use default 5s timeout 1 byte : {timeout (s)} 1 byte {(Bit 0:Success)} BaracodaPencil 2 – Communication Protocol v1.
Data Capture for Workforce in Motion 2.3.5.
Data Capture for Workforce in Motion “Capture Prefix String” Code ID Description Payload Response 0xEC-0xED Set Capture Prefix 1-33 bytes: { Capture Prefix length} “Capture Prefix String” 1 byte: {(Bit 0:Success)} Code ID Description Payload Response 0xEE-0xEF Code ID Description Payload 0xF0-0xF1 Response Code ID Description Payload Response Remark Get Capture Suffix None 1-33 bytes: { Capture Suffix length} “Capture Suffix String” Set Capture Suffix 1-33 bytes: { Capture Suffix length} “Captu
Data Capture for Workforce in Motion {Stored barcodes count [15:8]} {Stored barcodes count [7:0]} Code ID 0xFA-0xFB Description Get and erase stored barcodes Payload None Response 1 byte: {(Bit 0:Success)} Code ID 0xFC-0xFD Description Erase stored barcodes Payload None Response 1 byte: {(Bit 0:Success)} Code ID Description Payload Response 0xFE-0xFF Barcode decoder Commands {header} {type} {size} “Parameters” If the device responds: {Code ID}{length}{header}{type} {response size} “Response” Else: {0} Bar
Data Capture for Workforce in Motion 2.4. 2.4.1. Decoder Communication Protocol frame format Header Type Size (Bytes) 1Byte 1Byte 1Byte 2.4.2.
Data Capture for Workforce in Motion 2.4.3. Type The Type field defines the type of command to be sent to the reader, it is 1 byte long. Type Description A Get config: asks the reader to give the configuration options for the selected symbology. (1) (*) B Set config : sets an options configuration for the selected symbology. (1) C Set Default: sets the default options configuration for the selected symbology(ies). D Usual Command. E Special Command (with parameters).
Data Capture for Workforce in Motion For a Set Config (type "B") with a SELECT ALL (header "A"), the command sent can only be 1 byte long. Note: A high level bit ("1") corresponds to an Enable, a "0" bit means Disable. BYTE 1 (general options): The format of this byte is the same for all symbologies. LSB MSB Bit 0 1 2 3 4 5 6 7 Option Enable/Disable Symbology Enable/Disable Min. length (1) Enable/Disable Checksum calculation (2) Enable/Disable Checksum transmission Enable/Disable Max.
Data Capture for Workforce in Motion LSB MSB LSB MSB LSB MSB LSB MSB Bit 0 1 2 3 4 5 6 7 Bit 0 1 2 3 4 5 6 7 CODE 128 / EAN 128 (Header "C") Option GS transmit (EAN128) AIM Symb ID transmit (EAN128) FREE FREE FREE FREE FREE FREE EAN 13 / UPC-A (Header "D") Option Number System transmitted (UPC A) Enable/disable ISBN and ISSN ISSN hyphen transmission ISSN price code transmission UPC-A, transmitted as EAN 13 Add-on Digits required/not required Enable/disable Add-on 2 Enable/disable Add-on 5 Bit 0
Data Capture for Workforce in Motion LSB MSB LSB MSB LSB MSB LSB MSB Bit 0 1 2 3 4 5 6 7 INTERLEAVED 2 OF 5 (Header "G") Option FREE FREE FREE FREE FREE FREE FREE FREE Bit 0 1 2 3 4 5 6 7 STANDARD 2 OF 5 (Header "H") Option FREE FREE FREE FREE FREE FREE FREE FREE Bit 0 1 2 3 4 5 6 7 MATRIX 2 OF 5 (Header "I") Option FREE FREE FREE FREE FREE FREE FREE FREE Bit 0 1 2 3 4 5 6 7 CODE 11 (Header "J") Option FREE FREE FREE FREE FREE FREE FREE FREE BaracodaPencil 2 – Communication Protocol v1.
Data Capture for Workforce in Motion LSB MSB LSB MSB LSB MSB LSB Bit 0 1 2 3 4 5 6 7 MSI (Header "K") Option FREE FREE FREE FREE FREE FREE FREE FREE Bit 0 1 2 3 4 5 6 7 UPC-E (Header "L") Option Number System transmitted FREE UPC-E transmitted as UPC-A FREE Bit 0 1 2 3 4 5 6 7 EAN 8 (Header "M") Option FREE EAN 8 transmitted as EAN 13 FREE FREE Bit 0 1 2 3 4 5 6 RSS 14 (Header "N") Option LINKAGE FLAG PRINT APPLICATION ID PRINT FREE FREE FREE FREE FREE BaracodaPencil 2 – Communication Protoc
Data Capture for Workforce in Motion MSB LSB MSB 2.4.5.2. 7 Bit 0 1 2 3 4 5 6 7 FREE RSS Limited (Header "O") Option LINKAGE FLAG PRINT APPLICATION ID PRINT FREE FREE FREE FREE FREE FREE Get config( config(Type "A") This command allows to retrieve the whole configuration of a given symbology. The response to it is made of 2 or 4 bytes: The two first bytes are the ones described in the above section (set config).
Data Capture for Workforce in Motion COMMANDS TABLE Ascii CODE A B C COMMAND Enable Symbology Disable Symbology Disable Min. length D E F G H I J K L M N O P Q R S T U V W X Y Z a b c d e f g i j k l m n Enable Min.
Data Capture for Workforce in Motion o p q r s t u v w x Enable AIM symbology identifier transmission Dissable AIM symbology identifier transmission Enable Price Code transmission for ISSN Disable Price Code transmission for ISSN Add-on Digits not required but transmitted if read Add-on Digits required and transmitted Enable 2-digit Add-on Disable 2-digit Add-on Enable 5-digit Add-on disable 5-digit Add-on C C D D D D D D D D (1): The default minimal length is 6 characters for all symbologies.
Data Capture for Workforce in Motion 2.4.6. Examples Here are some examples to illustrate each type of frame to be sent to the decoder and the possible answer from the decoder. 2.4.6.1. Example 1.1 1.1 Get Config Getting configuration of Code 39 symbology.
Data Capture for Workforce in Motion 2.4.6.2. Example Example 2.1 Set Config Setting a configuration of Codabar symbology. Frame to be sent to the decoder: ‘F’ ‘B’ 2 $03 , $01 Header Type Size Command Reading this frame, the decoder understands: The user wants to set a configuration (Type "B") for Codabar (Header "F"). the configuration will contain general options and others specific to cadabar (Size = 2).
Data Capture for Workforce in Motion Example 2.2 Setting a configuration of all symbologies. Frame to be sent to the decoder: ‘A’ ‘B’ 1 $13 Header Type Size Command Reading this frame, the decoder understands: The user wants to set a configuration (Type "B") for all the symbologies (Header "A"). The configuration can only contain general options and the Size field must be equal to 1.
Data Capture for Workforce in Motion 2.4.6.4. Example 4.1 Special command Sending a special command to Code39 symbology. We now want set a larger frame of Min-Max length for Code39 symbology. Frame to be sent to the decoder: ‘E’ ‘E’ 3 ‘C’ , 2 , 40 Header Type Size Command Reading this frame, the decoder understands: The user wants to send a special command (Type "E") to Code39 symbology (Header "E").
Data Capture for Workforce in Motion APPENDIX 1: 1: Bluetooth Protocol The configuration frames are as follows: Header: 1 Byte Length: 2 Bytes (MSB, LSB) Payload: 0 to 65535 Bytes. Commands Command Header Length Payload Response Remark Set Pin Code 0x01 (flash only) xx xx (new pin size) N digits PIN. (Defaut “0000”) 0x01 00 01 01 if done 0x01 00 01 00 if not Max Pin length=16 Command Header Length Payload Response Remark Get Pin Code 0x07 00 00 N digits PIN.
Data Capture for Workforce in Motion Command Header Length Payload Response Set Mode 0x03 (flash only) 00 02 0x01 if MASTER, 0x00 if SLAVE, [Role switch] 0x03 00 01 01 if done 0x03 00 01 00 if not When in Master, the Module connects to the address specified by Set REMOTE BDA or to the last paired device. The real MASTER in a Bluetooth piconet is the device which manages the clock used for the frequency hopping.
Data Capture for Workforce in Motion Command Header Length Payload Response Get Bluetooth Version 0x76 00 00 0x76, x, x, {version string } Command Restore Factory Settings Header Length Payload ('R', 's', 't') Response Command Header Length Payload Response Remark Command Header Length Payload Response Remarks Get inquiry scan timeout 0x27 00 00 0x27 00 04 [Inquiry Interval (MSB) | Inquiry Interval (LSB) | Inquiry Window (MSB) | Inquiry Window (LSB)] Inquiry Interval and Inquiry Window are in number o
Data Capture for Workforce in Motion Command Header Length Payload Response Remark Command Header Length Payload Response Remark Set page scan timeout 0x24 00 04 [Page Interval (MSB) | Page Interval (LSB) | Page Window (MSB) | Page Window (LSB)] (default 0x320, 0xb0) 0x24 00 01 01 if done 0x24 00 01 00 if not Page Scan TimeOuts are used by the Module to answer to Connect Inquiries. So, if you set both values to 0, the Module will not be Connectable.
Data Capture for Workforce in Motion Command Header Length Payload Response Set sniff 0x09 00 04 [MSB of MinSniff interval, LSB of MinSniff interval, MSB of MaxSniff interval, LSB of MaxSnif interval] 0x09 00 01 01 if done 0x09 00 01 00 if not Remark Command Header Length Payload Response Set sniff (advanced) 0x09 00 08 [MSB of MinSniff interval, LSB of MinSniff interval, MSB of MaxSniff interval, LSB of MaxSnif interval, Sniff Attempts MSB, Sniff attempts LSB, Sniff timeout MSB, Sniff timeout LSB] 0x09
Data Capture for Workforce in Motion Low Power (medium speed): MinSniff = 0x0050 MaxSniff = 0x00F0 Attempt = 0x0008 Timeout = 0x0030 MaxSniff and MinSniff are only used for sniff negotiation between the Smart Module and the other BT device. If both sides allow sniff value MaxSniff, then MaxSniff will be used. If the other side does not accept Sniff values MinSniff to MaxSniff, no sniff will be used. Values are in number of Bluetooth slots (1 slot = 625µs) Set MinSniff and MaxSniff to 0 to disable Sniff.
Data Capture for Workforce in Motion Command Header Length Payload Response Get Security Mode 0x20 00 00 0x20 00 01 01 if secured 0x20 00 01 00 if non secured Remark Command Header Length Payload Response Remark Set Security Mode 0x21 00 {size} {00 non secured, 01 secured} {PIN CODE (default 01) 0x21 00 01 01 if done, 0x21 00 01 00 if not Size=PINCODE size + 1 For example : 0x21 00 05 00 30 30 30 30 to disable security Command Header Length Payload Response Remark Get Bluetooth class device 0x30 00 00
Data Capture for Workforce in Motion Typical Bluetooth class of device: Peripheral 0x000500 (default) Undefined 0x001F00 Phone 0x502204 Computer 0x120104 PDA 0x100114 Access Point 0x120320 Command Header Length Payload Response Set Remote rfcomm channel 0x36 00 01 [channel (1byte)] 0x36 00 01 01 if done 0x36 00 01 00 if not Remark Command Header Length Payload Response Remark Get Remote rfcomm channel 0x37 00 00 0x37 00 01 [channel] If “channel” is not zero, the Module will directly try to c
Data Capture for Workforce in Motion Payload Response Remark 0x39 00 02 [UUID] Try to connect to this remote service. Here are some service UUID: SPP 0x1101 DUN 0x1103 FAX 0x1102 You can get more UUIDs by reading the Bluetooth spec.