Baracoda 2 Barcode Reader User Manual

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 .............................................. 5
2.1.
BIDIRECTIONAL PACKETS ................................................... 5
2.1.1. CONTROL MESSAGES .............................................. 5
2.2.
SCANNER TO HOST MESSAGES ................................................ 6
2.2.1. ENCAPSULATION SCHEME ........................................... 6
2.2.2. DATA STRING FORMAT ............................................ 6
2.3.
HOST TO SCANNER MESSAGES ................................................ 7
2.3.1.
2.3.2.
2.3.3.
2.3.4.
2.3.5.
2.4.
COMMUNICATION MESSAGES ......................................... 7
SCANNER MESSAGES .............................................. 9
USER INTERFACE MESSAGES ....................................... 11
MISCELLANEOUS MESSAGES ........................................ 14
CAPTURE MESSAGES ............................................. 18
DECODER COMMUNICATION PROTOCOL .......................................... 21
2.4.1.
2.4.2.
2.4.3.
2.4.4.
2.4.5.
2.4.6.
EXAMPLE
EXAMPLE
EXAMPLE
EXAMPLE
EXAMPLE
FRAME FORMAT ................................................ 21
HEADER ..................................................... 21
TYPE ....................................................... 22
SIZE ....................................................... 22
COMMAND .................................................... 22
EXAMPLES ................................................... 30
1.1 – GETTING CONFIGURATION OF CODE 39 SYMBOLOGY. ................. 30
2.1 – SETTING A CONFIGURATION OF CODABAR SYMBOLOGY. ................ 31
2.2 – SETTING A CONFIGURATION OF ALL SYMBOLOGIES. .................. 32
3.1 – MODIFYING A CONFIGURATION OF ALL SYMBOLOGIES. ................ 32
4.1 – SENDING A SPECIAL COMMAND TO CODE39 SYMBOLOGY. ............... 33
APPENDIX 1: BLUETOOTH PROTOCOL ........................................... 34
BaracodaPencil 2 – Communication Protocol v1.3
-2-
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. 09
Add “Decoder Communication Protocol” section
Add “Appendix 1 – Bluetooth Protocol” section
BaracodaPencil 2 – Communication Protocol v1.3
-3-
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.
The messages described in this document can be:
Host to scanner messages: the packet is sent only by the host to the scanner
Scanner to host messages: the packet is sent only by the scanner to the host
Bidirectional messages: the packet format is the same whether it is sent by the host or the scanner
http://www.baracoda.com
1.2.
Generic packet
All the frames described in this document are formatted as shown:
Code ID Length Payload
1 Byte
2 Bytes N Bytes
- 1 byte for code ID
•
•
•
Bits 7:5 is the logical device
Bits 4:1 is the command
Bit 0: when set, the message must be acknowledged
- 2 bytes for the size of the payload (big-endian), including the sequence number byte which is
considered as part of the payload
- Payload (including 1 byte for sequence number when applicable).
The response will have the same code ID as the command.
BaracodaPencil 2 – Communication Protocol v1.3
-4-
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.
Acknowledgment packets
Code ID
Description
Frame
0x06
ACK
0x06 0x01 0xYY
0x15
NACK
0x15 0x01 0xYY
These messages acknowledge the reception of a valid message with the expected sequence number
0xYY, before processing it.
For captured data from the scanner, ACK and NAK have the same meaning but will trigger a different
event on the scanner.
2.1.1.3.
Synchronization packet
Code ID
Description
Frame
0x16
SYN
0x16 0x01 0xYY
This message acknowledges the reception of a message to acknowledge with an unexpected
sequence number. 0xYY is the expected sequence number.
The device will resynchronize its remote sequence number when receiving this message.
BaracodaPencil 2 – Communication Protocol v1.3
-5-
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.3
Data
suffix
0-32
bytes
-6-
Data Capture
for Workforce
in Motion
2.3.
2.3.1.
Host to scanner messages
Communication messages
Code ID
Description
Payload
Response
0x40-0x41
Code ID
Description
Payload
Response
0x42-0x43
Code ID
Description
Payload
0x44-0x45
Response
Get Communication Descriptor
None
2 bytes:
{Wireless link: (Bit 0: Bluetooth)}
{Wired link: (Bit 0: Serial Dock)}
Get Retransmission Parameters
None
2 bytes:
{Max number of retransmission, 1 to 0xFE, 0xFF = infinity}
{Delay between transmission, 1 to 0xFF, in tenth of seconds}
Set Retransmission Parameters
2 bytes:
{Max number of retransmissions, 1 to 0xFE, 0xFF = infinity}
{Delay between transmissions, 1 to 0xFF, in tenth of seconds}
1 byte:
{(Bit 0: Success)}
Code ID
Description
Payload
Response
0x46-0x47
Code ID
Description
Payload
0x48-0x49
Response
Get Capture Frame Format
None
1 byte
{0 = Baracoda, 1 = Baracoda + ACK, 2 = Raw}
Set Capture Frame Format
1 byte
{0 = Baracoda, 1 = Baracoda + ACK, 2 = Raw}
1 byte:
{Bit0: Success}
BaracodaPencil 2 – Communication Protocol v1.3
-7-
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 behavior
Get : None
Set : 1 byte :
{shutdown timeout (0 = leave current timeouts (default), 255 = infinity)}
Get : 1 byte :
{shutdown timeout (0 = leave current timeouts (default), 255 = infinity)}
Set : 1 byte :
{Bit 0 : Success}
When scanner in charge, the shutdown timers can be modified
0x5A-0x5B
Get/Set master mode
Get : None
Set : 1-2 byte(s) :
{1 : enable, 0 : disable}
[OPTIONAL]{1 : disconnect the scanner if connected}
Get : 1 byte :
{1 : enabled
0 : disabled}
Set : 1 byte :
{Bit 0 : Success}
0x5E-0x5F
Bluetooth Commands
{Code ID} “Parameters”
If the device responds: {Code ID} “Response”
Else: {0}
Bluetooth specific commands from the Platform2 Bluetooth communication protocol are to be
framed within the payload of this message.
BaracodaPencil 2 – Communication Protocol v1.3
-8-
Data Capture
for Workforce
in Motion
2.3.2.
Scanner messages
Code ID
Description
Payload
Response
0x60-0x61
Code ID
Description
Payload
Response
0x62-0x63
Remarks
“limited” means barcode buffer = 0 when in real time, no data loss mode and
disconnected
Code ID
Description
Payload
0x64-0x65
Response
Remarks
Get Scanner Status
None
2 bytes:
{(Bit 7: Upgrading) (Bit 1: Docked) (Bit 0: Charging)}
{Battery level, 0 to 100}
Get Operating Mode
None
1 byte:
{Bit 0 = 0:real time, Bit 0 = 1: batch}
{(Bit 7: limited)}
Set Operating Mode
1 byte:
{Bit 0 = 0: real time, Bit 0 = 1: batch}
If real time mode is set :
{(Bit 7: limited)(Bit 6: ACK beep) (Bit 5: no ACK beep)}
NOTE : the ACK beep enable / disable is only effective when Capture Frame Format is
“Baracoda + ACK”
1 byte:
{Bit 0: Success}
Batch mode is not available for D-Fly scanner
Code ID
Description
Payload
Response
0x66-0x67
Code ID
Description
Payload
0x68-0x69
Get Shutdown Timers
None
2 bytes:
{Number of minutes before shutdown when connected, 1 to 0xFE,
0xFF = infinity}
{Number of minutes before shutdown when disconnected, 1 to 0xFE,
0xFF = infinity}
Set Shutdown Timers
2 bytes:
{Number of minutes before shutdown when connected, 1 to 0xFE,
0xFF = infinity}
BaracodaPencil 2 – Communication Protocol v1.3
-9-
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 memory is also erased
Code ID
Description
Payload
Response
0x76-0x77
Code ID
Description
Payload
Response
0x78-0x79
Code ID
Description
Payload
0x7A-0x7B
Response
Get Product Version
None
x bytes :
«BaracodaPencil2…»
Get Switching On Delay
None
1 byte :
{1 = 0 second, 2 = 1 second, 3 = 2 seconds}
Set Switching On Delay
1 byte :
{1 = 0 second, 2 = 1 second, 3 = 2 seconds}
1 byte :
{Bit 0 :Success}
BaracodaPencil 2 – Communication Protocol v1.3
- 10 -
Data Capture
for Workforce
in Motion
2.3.3.
User Interface messages
Code ID
Description
Payload
Response
0x80-0x81
Code ID
Description
Payload
Response
0x82-0x83
Code ID
Description
Payload
0x84-0x85
Response
Code ID
Description
Payload
Response
Code ID
Description
Payload
Get MMI Descriptor
None
2 bytes:
{(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)}
{(Bit 0: Buzzer)}
Get MMI Mode
None
1 byte:
{(Bit 1: Buzzer Enabled) (Bit 0: LEDs enabled)}
Set MMI Mode
1 byte:
{(Bit 1: Buzzer Enabled) (Bit 0: LEDs enabled)
(Bit 7 = 0:Buzzer config select, =1: Buzzer config deselect)(Bit 6 = 0:leds config select, =1:
leds config deselect)}
1 byte: {(Bit 0: Success)}
0x86-0x87
Get MMI Signal (User interface)
1 byte:
{Signal number, 0 - 3}
(1 + 3n) bytes:
{Number of steps, 0 - 4}
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}
0x88-0x89
Set MMI Signal
(2 + 3n) bytes
{Signal number, 0 - 3}
{Number of steps, 0 - 4}
BaracodaPencil 2 – Communication Protocol v1.3
- 11 -
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)}
0x8C-0x8D
Stop Signal
1 byte:
{Signal number, 0 – 3}
1 byte:
{(Bit 0: Success)}
The list of MMI signals is:
IHM_SIGNAL_CAPTURE_READ
IHM_SIGNAL_CAPTURE_ACK
IHM_SIGNAL_CAPTURE_NAK
IHM_SIGNAL_CAPTURE_LOST
Code ID
Description
Payload
Response
0x92-0x93
Code ID
Description
Payload
0x94-0x95
:
:
:
:
0
1
2
3
Get Beeps mode
1 byte:
{(Bit 0: Beep level 0=low, 1=high)
(Bit 1: Read beep)
(Bit 2: ACK beep)}
Set Beeps mode
1 byte:
{(Bit 0: Beep level; 0=low, 1=high)
(Bit 1: Read beep)
(Bit 2: ACK beep)
(Bit 7 = 0: ACK beep config select, =1: ACK beep config deselect)
(Bit 6 = 0: Read beep config select, =1: Read beep config deselect)
(Bit 5 = 0: Beep level config select, =1: Beep level config deselect)}}
BaracodaPencil 2 – Communication Protocol v1.3
- 12 -
Data Capture
for Workforce
in Motion
Response
1 byte:
{(Bit 0: Success)}
BaracodaPencil 2 – Communication Protocol v1.3
- 13 -
Data Capture
for Workforce
in Motion
2.3.4.
Code ID
Description
Payload
Response
Code ID
Description
Payload
Response
Code ID
Description
Payload
Response
Miscellaneous messages
0xC2-0xC3
Get/Set DataPrefix
Get : None
Set : 1-33 bytes:
{ DataPrefix length}
“DataPrefix String”
Get : 1-33 bytes:
{ DataPrefix length}
“DataPrefix String”
Set : 1 byte:
{Success?}
0xC4-0xC5
Get/Set DataSuffix
Get : None
Set : 1-33 bytes:
{ DataSuffix length}
“DataSuffix String”
Get : 1-33 bytes:
{ DataSuffix length}
“DataSuffix String”
Set : 1 byte:
{Success?}
0xC6-0xC7
Get/Set Data Format 2
Get : None
Set : 1 byte:
{(Bit 5 = 0: DataPrefix config select, =1: DataPrefix config deselect)
(Bit 4 = 0: DataSuffix config select, =1: DataSuffix config deselect)
(Bit 1: DataPrefix)
(Bit 0: DataSuffix)
Get : 1 byte:
{(Bit 1: DataPrefix)
(Bit 0: DataSuffix)}
Set : 1 byte:
{(Bit 0:Success)}
BaracodaPencil 2 – Communication Protocol v1.3
- 14 -
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. 0 = disabled}
Set : 1 byte
{(Bit 0:Success)}
Code ID
Description
Payload
Response
0xCA-0xCB
Code ID
Description
Payload
0xCC-0xCD
Response
Code ID
Description
Payload
Response
Get and erase stored barcodes with no data loss mode
None
1 byte
{(Bit 0:Success)}
Reset modes
None = restore defaults, keep link keys, reboot scanner
1byte :
0 = restore defaults, keep link keys, reboot scanner
1 = switch off scanner (no restoring defaults)
2 = reboot scanner (no restoring defaults)
1 byte
{(Bit 0:Success)}
0xCE-0xCF
Batch upload commands
{Code ID} “Parameters” (cf. below)
{Code ID} “Response”
The UPLOAD Code IDs are:
Code ID
0
Description Launch upload process (typically used only for the upload barcode)
Payload
1 byte:
{0 mandatory}
Response
1 byte:
{Bit 0: Success}
Code ID
Description
Payload
1
Ready to start upload (Scanner to host message)
3 bytes :
{0 mandatory}
BaracodaPencil 2 – Communication Protocol v1.3
- 15 -
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: Success}
Response
Code ID
Description
Payload
Response
Comments
Code ID
Description
Payload
0xD2-0xD3
Get/Set Anti duplicate scans
Get : None
Set : 1 byte
{0 = disabled
1 = no consecutive duplicate scans + error signal
2 = no consecutive duplicate scans + no decoding}
Get : 1 byte
{0 = disabled
1 = no consecutive duplicate scans + error signal
2 = no consecutive duplicate scans + no decoding }
Set : 1 byte
{(Bit 0:Success)}
The comparison will be made over the 32 first characters of the barcodes only.
0xD4-0xD5
Restore last batch
None
or 1 byte (optional):
BaracodaPencil 2 – Communication Protocol v1.3
- 16 -
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.3
- 17 -
Data Capture
for Workforce
in Motion
2.3.5.
Capture messages
Code ID
Description
Payload
Response
0xE0-0xE1
Code ID
Description
Payload
Response
0xE2-0xE3
Code ID
Description
Payload
0xE4-0xE5
Response
Get Capture Version
None
“Capture Version String” or {0} if not applicable
Get Mode
None
1 byte:
{0 = trigger, , 2 = disabled}
Set Mode
1 byte OR
{0 = trigger, 2 = disabled}
1 byte:
{(Bit 0: Success)}
Code ID
Description
Payload
Response
0xE6-0xE7
Code ID
Description
Payload
0xE8-0xE9
Response
Code ID
Description
Payload
Response
Get Data Format
None
1 byte:
{(Bit 2:Timestamp)
(Bit 1: Capture Prefix)
(Bit 0: Capture Suffix)}
Set Data Format
1 byte:
{(Bit 7 = 0: Timestamp config select, =1: Timestamp config deselect)
(Bit 6 = 0: Capture Prefix config select, =1: Capture Prefix config deselect)
(Bit 5 = 0: Capture Suffix config select, =1: Capture Suffix config deselect)
(Bit 2:Timestamp)
(Bit 1: Capture Prefix)
(Bit 0: Capture Suffix) }
1 byte:
{(Bit 0:Success)}
0xEA-0xEB
Get Capture Prefix
None
1-33 bytes:
{ Capture Prefix length}
BaracodaPencil 2 – Communication Protocol v1.3
- 18 -
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}
“Capture Suffix String”
1 byte:
{(Bit 0:Success)}
0xF4-0xF5
Set Timestamp
6 bytes:
{YY}{MM}{DD}{HH}{MM}{SS}
1 byte:
{Bit 0: Success}
This feature is not available in the D-Fly Product
Code ID
0xF6-0xF7
Description Set AIM Symbology Identifier transmission
Payload
1 byte:
{0 : disabled, 1 : enabled}
Response
1 byte:
{Bit 0: Success}
Code ID
Description
Payload
Response
0xF8-0xF9
Get stored barcodes count
None
2 bytes:
BaracodaPencil 2 – Communication Protocol v1.3
- 19 -
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}
Barcode decoder specific commands from the Platform2 Decoder communication protocol are to be
framed within the payload of this message.
BaracodaPencil 2 – Communication Protocol v1.3
- 20 -
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.
Header
Command
The Header field defines the type of symbology to select; it is 1 byte long (ACSII code):
Header
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
Selected Symbology
SELECT ALL
Code 93
Code 128 / EAN 128
EAN 13 / UPC A
Code 39
Codabar
Interleaved 2 of 5
Standard 2 of 5 (industrial 2 of 5)
Matrix 2 of 5 (symbology disabled)
Code 11
MSI
UPC E
EAN 8
RSS14 (not available on RoadRunners product)
RSSLTD (not available on RoadRunners product)
Note: The "A" header (SELECT ALL) allows the selection of all the symbologies available. Thus, only general commands will be allowed.
BaracodaPencil 2 – Communication Protocol v1.3
- 21 -
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). (2)
(*): This Type of command is not available with "A" header.
(1): This command concerns the whole set of options available for one symbology. Its description will
be given in the section "Command field".
(2): This type is used for commands requiring non Boolean information. Their length will be at least 2
bytes, the first one defining the type of command, the other(s) being the parameter(s) to use. More
details will be given in the section "Command field".
All the commands will answer “0” if the frame is wrong.
Commands with type B, C, D or E will answer “1” as an acknowledgment of good reception of the
command.
The “Get config” command (type A) will answer 2 or 4 bytes : the two firsts follow the format
described below (see “set config” command field). The third and fourth bytes correspond to
minimum and maximum lengths if the selected symbology supports this option.
2.4.4.
Size
This field specifies the length (bytes) of the following field (commands). It will be set to "0" if the type
was "A" (Get Config) or "C" (Set Defaults),
2.4.5.
Command
Command
This field contains the commands, its length must be the one specified in the Size field.
There are five types of commands:
2.4.5.1.
Set Config (Type "B")
This command is made up of 1 or 2 bytes. The first one contains information for configuration of
general options (common to all the symbologies). The second one, optional, relates to specific
options to each symbology.
BaracodaPencil 2 – Communication Protocol v1.3
- 22 -
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. length (3)
Enable/Disable symbology prefix (4)
Enable/Disable symbology suffix (4)
FREE
(1): If Min. length is enabled without having been set with the special command, the default minimal
length will be 6 characters for all symbologies.
(2): This option will not have any effect on symbologies that require a checksum (EAN/UPC, code93,
Code128, RSS). Concerning the symbologies that allow two check digits (MSI, code11), the first check
digit is obligatory. Thus, this option will affect the calculation/non calculation of the second check
digit.
(3): If Max. length is enabled without having been set with the special command, the default minimal
length will be 32 characters for all symbologies.
(4): if the prefix/suffix is enabled without having been defined at least once (cf. special command),
there will be no effect.
BYTE 2 (specific options):
Each symbology will have a different configuration of this byte, depending on the specific options
available on each.
LSB
MSB
Bit
0
1
2
3
4
5
6
7
CODE 93 (Header "B")
Option
FREE
FREE
FREE
FREE
FREE
FREE
FREE
FREE
BaracodaPencil 2 – Communication Protocol v1.3
- 23 -
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
1
2
3
4
5
6
7
CODE 39 (Header "E")
Option
Enable/Disable start-stop transmission
Enable/Disable Full ACSII Mode
Enable/Disable "*" as start-stop character
Enable/Disable "$" as start-stop character
FREE
FREE
FREE
FREE
Bit
0
1
2
3
4
5
6
7
CODABAR (Header "F")
Option
Enable/Disable start-stop transmission
FREE
FREE
FREE
FREE
FREE
FREE
FREE
BaracodaPencil 2 – Communication Protocol v1.3
- 24 -
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.3
- 25 -
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 Protocol v1.3
- 26 -
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).
The two following are given only if the length of the barcode is variable with the selected symbology.
These bytes are the min and max length of the barcode.
For some settings (e.g. prefix/suffix…), the “special commands” type should be used (see below for
details).
2.4.5.3.
Usual Commands (Type "D")
The method described above (set config) allows a fast and effective setting of a whole set of
configurations for a given symbology. It exclusively allows a simultaneous configuration of all the
options available for a given symbology.
The usual commands are designed to palliate this effect. It is possible, with this type of commands, to
modify a limited number of options in a configuration.
A command is one byte long and orders an enabling or a disabling of an option. Several commands
can be sent in the same frame by simply specifying the number in the Size field.
The commands table is unique. All the symbologies will thus understand this same table. However,
since certain options are not available for some symbologies, the corresponding commands will be
quite simply ignored for these symbologies. This will allow the configuration of several symbologies
at the time by sending only one frame.
BaracodaPencil 2 – Communication Protocol v1.3
- 27 -
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. length (1)
Enable Checksum calculation (2)
Disable Checksum calculation (2)
Enable Checksum transmission
Disable Checksum transmission
Enable start/stop characters transmission
Disable start/stop characters transmission
Start/stop accepted characters "*" only
Start/stop accepted characters "$" only
start/stop accepted characters "*" and "$"
Enable Code 39 full ASCII mode
Disable Code 39 full ASCII mode
Enable number system transmission
Disable number system transmission
Disable prefix
Enable prefix
Disable suffix
Enable suffix
Enable ISBN and ISSN
Disable ISBN and ISSN
UPC-A/EAN 8 transmitted as EAN 13
UPC-A/EAN 8 transmitted as UPC-A/EAN 8
UPC-E transmitted as UPC-A
UPC-E transmitted as UPC-E
Enable hyphen transmission for ISSN
Disable hyphen transmission for ISSN
Disable Max. length
Enable Max. length (3)
Enable all EAN/UPC symbologies
Disable all EAN/UPC symbologies
Enable linkage flag transmission
Dissable linkage flag transmission
Enable application identifier transmission
Dissable application identifier transmission
Enable Group separator transmission (EAN128)
Dissable Group separator transmission (EAN128)
BaracodaPencil 2 – Communication Protocol v1.3
RESPONDING HEADERS
All
All
A, B, C, E, F, G, H, J, K
A, B, C, E, F, G, H, J, K
E, F, G, H, J, K
E, F, G, H, J, K
C, D, E, F, G, H, J, K, L, M,N,O
C, D, E, F, G, H, J, K, L, M,N,O
E, F
E, F
E
E
E
E
E
D, L
D, L
All
All
All
All
D
D
D, M
D, M
L
L
D
D
A, B, C, E, F, G, H, J, K
A, B, C, E, F, G, H, J, K
D, L, M
D, L, M
N,O
N,O
N,O
N,O
C
C
- 28 -
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.
(2): This option will not have any effect on symbologies requiring a checksum calculation (EAN/UPC, Code128).
Concerning the symbologies that allow two check digits (code93, code11), the first check digit is obligatory.
Thus, this option will affect the calculation/non calculation of the second check digit.
(3): The default maximal length is 32 characters for all symbologies.
2.4.5.4.
Special Commands (Type "E")
Some commands require more than a Boolean digit and require one or more arguments.
Special commands will be used in this case (defined code "E" in type field). It is made of one byte
corresponding to the type of command. Then, depending on the type of command, a certain number
of parameters will be expected. Each of these will be 1 byte long.
This type of command allows the sending of multiple commands in one frame. The Size field must
then specify the total length, in bytes, of the command field.
SPECIAL COMMANDS
ASCII
CODE
DESCRIPTION
PARAMTER(S)
RESPONSE
A
DEFINE AND ENABLE MIN. LENGTH
[MIN LENGTH]
B
DEFINE AND ENABLE MAX. LENGTH
[MAX LENGTH]
C
DEFINE AND ENABLE LENGTH FRAME
[MIN][MAX]
D
DEFINE VOTING VALUE (*)
[VOTING]
E
GET VOTING VALUE
[VOTING]
F
DEFINE GS REPLACEMENT CHARACTER
[CHAR]
G
GET GS REPLACEMENT CHARACTER
[CHAR]
H
DEFINE AND ENABLE PREFIX
[length] « prefix »
I
DEFINE AND ENABLE SUFFIX
[length] «suffix»
J
GET PREFIX
[length] « prefix »
K
GET SUFFIX
[length] «suffix»
L
FREE
…
…
…
…
(*): this command will only de effective with ‘A’ header. Otherwise, it will be ignored. Values
accepted for voting are: 2, 3, 4. this command is also unavailable with Pencil2 scanner.
BaracodaPencil 2 – Communication Protocol v1.3
- 29 -
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.
Frame to be sent to the decoder:
‘E’
‘A’
0
-
Header
Type
Size
Command
The decoder answers the following frame:
‘E’
‘A’
4
$01 , $05, $06, $20
Header
Type
Size
Command
By reading this answer frame, we can check that the decoder has well understood the selected
symbology (header "E"). The command field contains the configuration itself:
1st byte : $01
1
0
0
0
0
0
0
0
Bit
0
1
2
3
4
5
6
7
Option
Symbology Enabled
Min. length Disabled
Checksum calculation Disabled
Checksum transmission Disabled
Max. length Disabled
-
2nd byte : $05
1
0
1
0
0
0
0
0
Bit
0
1
2
3
4
5
6
7
Option
start-stop transmission Enabled
Full ACSII Mode Disabled
"*" as start-stop character Enabled
"$" as start-stop character Disabled
-
3rd byte : Min length = 6
4th byte Max length = $20 = 32
BaracodaPencil 2 – Communication Protocol v1.3
- 30 -
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). Then, the Command field contains
the configuration itself:
1st byte : $03
1
1
0
0
0
0
0
0
Bit
0
1
2
3
4
5
6
7
Option
Symbology Enabled
Min. length Enabled (set to 6 as default)
Checksum calculation Disabled
Checksum transmission Disabled
Max. length Disabled
-
2nd byte : $01
1
0
0
0
0
0
0
0
Bit
0
1
2
3
4
5
6
7
Option
start-stop transmission Enabled
-
BaracodaPencil 2 – Communication Protocol v1.3
- 31 -
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. Then, the
Command field contains the configuration itself:
$013
1
1
0
0
1
0
0
0
Bit
0
1
2
3
4
5
6
7
Option
Symbology Enabled
Min. length Enabled (set to 6 as default)
Checksum calculation Disabled
Checksum transmission Disabled
Max. length Enabled (set to 32 as default)
-
2.4.6.3.
Usual command
Example 3.1
Modifying a configuration of all symbologies.
We now want disable Min length and Enable start/stop characters (for the symbologies having
those), regardless of the other options’ settings.
Frame to be sent to the decoder:
‘A’
‘D’
2
‘C’ , ‘I’
Header
Type
Size
Command
Reading this frame, the decoder understands:
The user wants to send a command (Type "D") to all the symbologies (Header "A"). Any command
can be sent but not all may be effective on all symbologies.
The command "C" will first be sent to all symbologies, and applied to all of them since they all have
this option available.
Then the command "I" will also be sent to all symbologies but only some of them will apply it
(Code39, Codabar).
BaracodaPencil 2 – Communication Protocol v1.3
- 32 -
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").
The size must be at least 2 and the first byte of the command field must contain a code (ACSII) that
will tell (indirectly) the number of parameters following.
The command "C" will first read, it means “setting a Min. length and a Max. length”. Then the usual
commands ‘D’ and ‘e’ will be sent to enable Min length and Max. length for Code 39 symbology.
Then the Min length will be set to 2 and the Max. length will be set to 40.
BaracodaPencil 2 – Communication Protocol v1.3
- 33 -
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. (Défaut “0000”)
0x07 {PinCode size} {Pincode}
Command
Header
Length
Payload
Response
Set Name
0x02 (flash only)
xx xx
(new name size)
New name 0x02 00 01 01 if done
0x02 00 01 00 if not
(Names up to 248 Bytes)
Remark
Command
Header
Length
Payload
Response
Remark
Get Name
0x08
00 00
Command
Header
Length
Payload
Response
Set Mode
0x03 (flash only)
00 01
0x01 if MASTER, 0x00 if SLAVE
0x03 00 01 01 if done
0x03 00 01 00 if not
0x08 {name size} {name}
Name size: 2 Bytes MSB, LSB Names up to 248 Bytes
BaracodaPencil 2 – Communication Protocol v1.3
- 34 -
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. We used to speak about MASTER too for devices which create the connection
(that's true if you do not switch the clock role)
A device with a slave BT clock role is unable to synchronize more than one master clock. If more than
one SmartModule needs to connect to the same other device (PC, Access Point…) you will need to
switch the clock role to allow the slave to be connected to more than one master. Note that most of
the BT access point already generates the BT clock role switch when a master device creates a
connection.
Command
Header
Length
Payload
Response
Remark
Get Mode
0x04
00 00
Command
Header
Length
Payload
Response
Set Remote BDA (Used by Master Mode of the SM)
0x05
00 06
BDA(ex:0x00,0x02,0xC3,0x21, 0xDE,0xFA)
0x05 00 01 01 if done
0x05 00 01 00 if not
If The SM is set to Master (using Set MODE command), the SM use
this Address to connect to.
Remark
Command
Header
Length
Payload
Response
Remark
0x04 00 02 {Mode (1byte) | Switch role (1byte)}
0x01 if MASTER, 0x00 if SLAVE
0x01 if want automatic switch role, 0x00 otherwise
Get Remote BDA
0x06
00 00
0x06 00 06 {6 bytes of BDA}
BaracodaPencil 2 – Communication Protocol v1.3
- 35 -
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 of Bluetooth
slots) (1 slot = 0.625 ms)
Set inquiry scan timeout
0x26
00 04
Inquiry Interval (MSB) | Inquiry Interval (LSB) | Inquiry Window
(MSB) | Inquiry Window (LSB)]
(default 0xC80, 0x18)
0x26 00 01 01 if done
0x26 00 01 00 if not
Inquiry Scan TimeOuts are used by the Module to answer to
Inquiries. So, if you set both values to 0, the Module will not be
discoverable.
BaracodaPencil 2 – Communication Protocol v1.3
- 36 -
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.
Get page scan timeout
0x25
00 00
0x25 00 04 [Page Interval (MSB) | Page Interval (LSB) | Page
Window (MSB) | Page Window (LSB)]
Page Scan Interval and Page Scan Window are in number of
Bluetooth slots) (1 slot = 0.625 ms)
Typical values are:
Full power:
Inquiry Interval = 0x400
Inquiry Window = 0x200
Page Scan Interval = 0x400
PageScan Window = 0x200
Low power:
Inquiry Interval = 0x320
Inquiry Window = 0x80
Page Scan Interval = 0x320
PageScan Window = 0x80
Here is how these values change the consumption of the Module:
Page Scan
Window
Inquiry Scan
Window
Page Scan and Inquiry Scan Interval
BaracodaPencil 2 – Communication Protocol v1.3
- 37 -
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 00 01 01 if done
0x09 00 01 00 if not
Remark
Command
Header
Length
Payload
Response
Remark
Get Sniff
0x10
00 00
0x10 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]
When setting only MinSniff and MaxSniff values, the default value
0x08 will be used for Sniff attempts and Sniff timeout.
Typical values are:
Full speed (full power)
MinSniff = 0
MaxSniff = 0
Very Low Power (low speed): (sniff of 500ms Only are accepted. If the remote device does
not support sniffs of 500ms, no sniff will be used)
MinSniff = 0x0320
MaxSniff = 0x0320
Very Low Power (low speed): (sniff between 250ms to 500ms are accepted. No sniff will be
used if the remote device does not support any sniff values in this specified range)
MinSniff = 0x0160
MaxSniff = 0x0320
BaracodaPencil 2 – Communication Protocol v1.3
- 38 -
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.
MinSniff must be inferior to MaxSniff.
Possible values for MinSniff and MaxSniff are 0x12 to 0xFFFF.
Sniff attempts of 0 is not allowed.
Warning: Setting MaxSniff to 0xFF means a sniff period of 40s! You will have very very low data rate.
Note: This setting takes effect immediately.
For further details on Sniff values, see the Bluetooth spec 1.1, chapter 10.8.2
Command Get link timeout
Header
0x18
Length
00 00
Payload
Response 0x18 00 02 [MSB of link Tmo, LSB of link Tmo]
Remark
Command
Header
Length
Payload
Response
Remark
Set link timeout
0x19
00 02
[MSB of link Tmo, LSB of link Tmo]
0x19 00 01 01 if done
The link Time Out is a multiple of 625µsec (625µs = 1 Bluetooth
slot) (default 0x7D00 (=20s))
This Timeout is use by the Link Manager to monitor the Bluetooth Link. If there is no answer from the
other device after this timeout, the Link Manager assumes that we are disconnected. By default, this
value is set to 20 seconds. You can go down to 1s, but then you can have disconnection even if it’s
only a temporary perturbation.
This value will take effect at the next connection.
BaracodaPencil 2 – Communication Protocol v1.3
- 39 -
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
Command
Header
Length
Payload
Response
Set Bluetooth class device
0x31
00 04
[Class of Device (4 bytes, MSB->LSB)] (default 0x500)
0x31 00 01 01 if done
0x31 00 01 00 if not
0x30 00 04 [Class of device]
See the Bluetooth specification for more details
BaracodaPencil 2 – Communication Protocol v1.3
- 40 -
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 connect (if in master mode) to the specified
rfcomm channel.
Setting the channel to zero will force the Module to connect (if in master mode) to the first specified
Remote Service UUID (by default SPP).
The services in the Module are all set to channel 1.
Command
Header
Length
Payload
Response
Remark
Set Target Service UUID
0x38
00 02
[UUID (2 Bytes)]
(default 0x1101)
0x38 00 01 01 if done
0x38 00 01 00 if not
Try to connect to this remote service.
Command Get Target Service UUID
Header
0x39
Length
00 00
BaracodaPencil 2 – Communication Protocol v1.3
- 41 -
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.
Command
Header
Length
Payload
Response
Remark
Get Encryption Mode
0x40
00 00
Command
Header
Length
Payload
Response
Set Encryption Mode
0x41 ( flash only)
00 01
[Encryption (1 byte)]
0x41 00 01 01 if done
0x41 00 01 00 if not
Argument is: 0x01 to enable encryption, 0x00 to disable.
Remark
Command
Header
Length
Payload
Response
Remark
0x40 00 01 [encryption]
Get local Bluetooth Address
0x43
00 00
0x43 00 06 {6 Bytes (BD_address MSB, ..., LSB)}
BaracodaPencil 2 – Communication Protocol v1.3
- 42 -
Download PDF

advertising