Bluetooth specific commands from the Bluetooth communication protocol are to be framed within
the payload of this message. See Appendix A for more details.
The default Bluetooth settings are the BT module’s default settings, excepted the BT name which
default value must be handled by the firmware:
ToughRunners : “ToughRunners xx xx”
Scanwear : “ScanWear xx xx”
xx xx being the 4 last readable characters of the BDA written in hexadecimal (two last
bytes of BDA).
Example : “Get PIN Code”
Command :
Ba) 0x02 : STX
Bb) 0x00 : Frame number
Bc) 0x01 : Number of commands (or number of commands responses)
Bd) : Command
Bd1) 0x5E : Command ID
Bd2) 0x03 : Data length
Bd3) : Data
B
) 0x07 : Get PIN Code
d31
B
) 0x00 : Length MSB
d32
B
) 0x00 : Length LSB
d33
Be) 0x69 : CheckSum = (
Bf) 0x03 : ETX
Response:
Ba) 0x02 : STX
Bb) 0x00 : Frame number
Bc) 0x01 : Number of commands (or number of commands responses)
Bd) : Command
ToughRunners / ScanWear – Communication Protocol v1.2 - 12 -
B
∑
i
=ebi
Bd1) 0x5E : Command ID
Bd2) 0x07 : Data length
) : Data
B
d3
B
) 0x07 : Get PIN Code
d31
) mod 256
Data Capture
0x60
ABCDEFGHI
B
) 0x00 : Length MSB
d32
B
) 0x04 : Length LSB
d33
B
) 0x30 : PIN Code 0
d34
B
) 0x30 : PIN Code 1
d35
B
) 0x30 : PIN Code 2
d36
B
) 0x30 : PIN Code 3
d37
Be) 0x31 : CheckSum
= (
= 0x01+0x5E+x007+0x07+0x04+0x00
= 0x131 mod 0x100
= 0x31
Bf) 0x03 : ETX
) mod 256
B
∑
i
=xbi
+0x30+0x30+0x30+0x30 mod 0x100
3.7. Reading and triggering commands
Command ID
for Workforce
in Motion
Description Get reading mode
Length 0
payload none
Response
where :
A = long press action (1 sec.):
------00 : Disabled
------01 : Hold laser beam
------10 : Shut down scanner
------11 : Start Multiscan Session
B = simple press action :
------00 : Disabled
------01 : Simple scan
------10 : Start Multiscan Session
---1---- : Stop Multiscan Session
C = wrist motion action :
------00 : Disabled
ToughRunners / ScanWear – Communication Protocol v1.2 - 13 -
BB = radio shutdown timer when in Master mode (sec.)
ToughRunners / ScanWear – Communication Protocol v1.2 - 25 -
Data Capture
CC
0xF2
= radio shutdown timer when in Slave mode (sec.)
U = 0 (unused)
Response 0 (1 = ERROR)
Command ID
Description Get battery status
Length 0
payload None
Response 1 byte:
Bits A.0-6 = battery level (RFU)
for Workforce
in Motion
Bit A.7 = 1 low battery
ToughRunners / ScanWear – Communication Protocol v1.2 - 26 -
Data Capture
Code ID
Description
frame
Code ID
Description
frame
Code ID
Description
Frame
for Workforce
in Motion
4.
Special packets
These packets do not follow the above frame format.
4.1. Deprecated packets
0x01 Legacy 1 1 1 or 1 2 1
These 2 sequences will be recognized and purged for backward compatibility with older Baracoda
products.
4.2. Acknowledgment packets
0x06 ACK 0x06 1 X
0x15 NAK 0x15 1 X
These messages acknowledge the reception of a valid message with the expected sequence number
X, 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.
0x16 SYN 0x16 1 X
This message acknowledges the reception of a message to acknowledge with an unexpected
sequence number. X is the expected sequence number.
The device will resynchronize its remote sequence number when receiving this message.
From this point, all the frames described in this section 2/ are formatted as shown:
Code ID length Payload
1 byte 2 bytes -
1 byte for code ID
o Bits 7:5 is the logical device
o Bits 4:1 is the command
o 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.
ToughRunners / ScanWear – Communication Protocol v1.2 - 27 -
Data Capture
Code ID
Description
Payload
Code ID
Description
Payload
Response
Code ID
Description
Payload
Response
Code ID
Description
Payload
Response
4.3. Special scanner to host messages
0x32–0x33 Barcode data Barcode string
4.4. Special host to scanner messages
0x46-0x47
Get Capture Frame Format
None
1 byte
{0 = Baracoda, 1 = Baracoda + ACK, 2 = Raw}
for Workforce
in Motion
Default settings = 0
0x48-0x49
Set Capture Frame Format
1 byte
{0 = Baracoda, 1 = Baracoda + ACK, 2 = Raw}
1 byte:
{Bit 0: Success}
0x76-0x77
Get Product Version
None
x bytes :
«Baracoda ScanWear…» / «Baracoda ToughRunners…»
ToughRunners / ScanWear – Communication Protocol v1.2 - 28 -
Data Capture
Command
Header
Length
Payload
Answer
Set PinCode
0x01
xx xx
N digits PIN.
0x
01 00 01 01 if done
Command
Header
Length
Payload
Answer
Get PinCode
0x07
00 00
N digits PIN. (D
efault
“0000”)
0x07 {PinCode size} {Pincode}
Command
Header
Length
Payload
Answer
Set Name
0x02
xx xx
New name
0x02 00 01 01 if done
Command
Header
Length
Payload
Answer
Get Name
0x08
00 00
0x08 {name size} {name}
Command
Header
Length
Payload
Answer
Set mode
0x03
00 01
0x0
1 if MASTER, 0x00 if SLAVE
0x03 00 01 01 if done
5.
Appendix A: Bluetooth Protocol.
5.1. The configuration frames are as follows:
Header Length Payload
1 byte 2 bytes(MSB, LSB) 0 to 65535 bytes
5.2. Commands:
(new pin size)
Max Pin length=16
(Default “0000”)
for Workforce
in Motion
0x01 00 01 00 if not
(new name size)
(Names up to 20 Bytes)
(Name size: 2 Bytes MSB, LSB)
0x02 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.
ToughRunners / ScanWear – Communication Protocol v1.2 - 29 -
(default SLAVE)
0x03 00 01 00 if not
Data Capture
Command
Header
Length
Payload
Answer
Set mode
0x03
00 02 [0x01 if MASTER, 0x00 if SLAVE],
0x03 00 01 01 if done
Command
Header
Length
Payload
Answer
Get mode
0x04
00 00
-
0x04 00 02 {Mode (1byte) | Switch role (1byte)}
Command
Header
Length
Payload
Answer
Set Remote BDA
0x05
00 06
BDA(ex:0x00,0x02,0xC3,0x21, 0xDE,0xFA)
0x05 00 01 01 if done
Command
Header
Length
Payload
Answer
Get Remote BDA
0x06
00 00
-
0x06 00 06 {6 bytes of BDA}
for Workforce
in Motion
[BT Clock Role switch] (default SLAVE)
You can set the size to 2. In this case, the second argument tells the module for an automatic BT
clock role switch. This is an optional argument.
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 generate the BT clock role switch when a master device creates a
connection. In that case you don't need to specify this argument (if you do, it will cancel the Access
Point clock switch and the result is as nothing was done).
0x03 00 01 00 if not
Mode: 0x01 if MASTER, 0x00 if SLAVE
Switch role: 0x01 if want automatic switch role, 0x00 otherwise
(Used by Master
Mode)
If The SM is set to Master (using Set MODE command), the SM use this Address to connect to.
(No default value, depends of the last programmed)
0x05 00 01 00 if not
ToughRunners / ScanWear – Communication Protocol v1.2 - 30 -
Data Capture
Command
Header
Length
Payload
Answer
Get
0x76
00 00
-
0x76,
x, x, {version string
}
Command
frame
Answ
er
Restore Factory Settings
'R', 's', 't'
-
Command
Header
Length
Payload
Answer
Get inquiry scan timeout
0x27
00 00
-
0x27 00 04 [Inquiry Interval (MSB) | Inquiry
Command
Header
Length
Payload
Answer
Set inquiry
0x26
00 04
[Inquiry Interval (MSB) | Inquiry Interval (LS
B) |
0x26 00 01 01 if
Bluetooth
Version
Restore default settings:
Pin code “0000”
Mode : Slave
Link Timeout : 5s
Security mode : ON
Sniff
Uart settings.
Class of Device : 0x500 (peripheral)
Encryption Mode
Page And Inquiry Scan.
Remote Channel (0) and Target Service (SPP)
Bluetooth Name (Smart Module)
Local Services (SPP only)
All other settings are not changed.
Here is how these values change the consumption of the Module:
Window
Window
ToughRunners / ScanWear – Communication Protocol v1.2 - 32 -
Data Capture
Command
Header
Length
Payload
Answer
Set sniff
0x09
00 04
[MSB of
MinSniff interval, LSB of MinSniff
0x09 00 01 01 if done
Command
Header
Length
Payload
Answer
Set sniff
0x09
00 08
[MSB of MinSniff interval, LSB of MinSniff
0x09 00 01 01 if done
Command
Header
Length
Payload
Answer
Ge
t sniff
0x10
00 00
0x10 00 08 [MSB of MinSniff interval, LSB of MinSniff interval,
(advanced)
(default 0xf0, 0x50, 0x08, 0x08)
interval, MSB of MaxSniff interval, LSB of
MaxSnif interval]
interval, MSB of MaxSniff interval, LSB of
MaxSnif interval,
Sniff Attempts MSB, Sniff attempts LSB,
Sniff timeout MSB, Sniff timeout LSB]
for Workforce
in Motion
0x09 00 01 00 if not
0x09 00 01 00 if not
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
Low Power (medium speed):
ToughRunners / ScanWear – Communication Protocol v1.2 - 33 -
MaxSniff and MinSniff are only used for sniff negociation between the Smartodule 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.
Attempt Negociated Sniff
For further details on Sniff values, see the Bluetooth spec 1.1, chapter 10.8.2
0x19 00 01 00 if not
The link Time Out is a multiple of 625µsec (625µs = 1 Bluetooth slot) (default 0x7D00 (=20s))
This Timeout is used 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.
ToughRunners / ScanWear – Communication Protocol v1.2 - 34 -
Data Capture
Command
Header
Length
Payload
Answer
Set security
0x21
00 {size}
{00 non secured, 01 secured} {PIN CODE
0x21 0
0 01 01 if done,
Command
Header
Length
Payload
Answer
Get secur
ity
0x20
00 00
-
0x20 00 01 01 if secured
Command
Header
Length
Payload
Answer
Get Bluetooth class
0x30
00 00
-
0x30 00 04 [Class of Device]
Peripheral
0x00
0500
(default)
Undefined
0x00
1F00
Phone
0x502204
Computer
0x120104
PDA 0x100114
Access Point
0x120320
Command
Header
Length
Payload
Answer
Set BT class of device
0x31
00 04
[Class of Device (4 bytes, MSB
-
>LSB)]
0x31 00 01 01 if done
Command
Header
Length
Payload
Answer
Get BT class of device
0x30
00 00
- 0x30 00 04 [CoD (4 bytes, MSB
-
>LSB)]
mode
(default 01)
Size=PINCODE size + 1
For example : 0x21 00 05 00 30 30 30 30 to disable security
mode
0x20 00 01 00 if non secured
for Workforce
in Motion
0x21 00 01 00 if not
of device
See the Bluetooth spec. for more details.
Typical Bluetooth class of device:
ToughRunners / ScanWear – Communication Protocol v1.2 - 35 -
(default 0x500)
0x31 00 01 00 if not
Data Capture
Command
Header
Length
Payload
Answer
Get local BT address
0x43
00 00
-
0x43 00 06 {6 Bytes (BD_address MSB, ..., LSB)}
Command
Header
Length
Payload
Answer
Set Target
0x38
00 02
[UUID (2 Bytes)]
0x38 00 01 01 if done
Com
mand
Header
Length
Payload
Answer
Get Target
0x39
00 00
-
0x39 00 02 [UUID]
Command
Header
Length
Payload
Answer
Set
Encryption Mode
0x41
00 01
[Encryption (1
Byte)]
0x41 00 01 01 if done
Command
Header
Length
Payload
Answer
Get
Encryption mode
0x40
00 00
-
0x40
00 01 [
encryption
]
Service UUID
Try to connect to this remote service.
Here are some service UUID:
SPP 0x1101
DUN 0x1103
(default 0x1101)
for Workforce
in Motion
0x38 00 01 00 if not
FAX 0x1102
You can get more UUIDs by reading the Bluetooth spec.
Service UUID
Argument is: 0x01 to enable encryption, 0x00 to disable.
0x41 00 01 00 if not
ToughRunners / ScanWear – Communication Protocol v1.2 - 36 -
Data Capture
Command
Header
Length
Payload
Answer
Set Remote rfcomm
0x36
00 01
[channel (1
Byte)]
0x36 00 01 01 if done
Command
Header
Length
Payload
Answer
Get
Remote rfcomm
0x37
00 00
-
0x37
00 01 [
channel
]
for Workforce
in Motion
channel
0x36 00 01 00 if not
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.
ToughRunners / ScanWear – Communication Protocol v1.2 - 37 -
Data Capture
6.
Appendix B: Decoder Protocol.
for Workforce
This section describes in detail the 20 bytes of the response/payload of the 0x80/0x81.
When code128 is enabled, EAN128 barcodes are decoded but the symbology ID is the
code128’s one.
ToughRunners / ScanWear – Communication Protocol v1.2 - 38 -
Data Capture
for Workforce
in Motion
When both code128 and EAN128 are enabled, both are decoded but have a different
symbology ID.
When only EAN128 is enabled, only EAN128 codes are decoded.
Code39 parameters:
OPC39 Description Default
b0 Standard 43 characters (1) / FULL ASCII (0) 1
b1 Start/Stop characters not transmitted 1
b2
b3 1
b4 Check digit not transmitted 0
b5 Reserved (do not modify) 1
b6 Reserved (do not modify) 1
b7 Reserved (do not modify) 1
OPMUL Description Default
b0 Reserved (do not modify) 0
b1 Reserved (do not modify) 0
b2 Reserved (do not modify) 0
b3 Reserved (do not modify) 0
b4 Reserved (do not modify) 0
b5 Reserved (do not modify) 1
b6 Reserved (do not modify) 0
b7 Reserved (do not modify) 0
Interleaved 2 of 5 parameters:
OP25I Description Default
b0 Reserved (do not modify) 0
b1
b2 1
b3 Check digit not transmitted 0
b4 Check Digit not calculated 1
b5 Reserved (do not modify) 1
b6 Reserved (do not modify) 0
b7 Reserved (do not modify) 0
LEI1 / LEI2 / LEI3 Description Default
n
Nota :
If one length allowed, specify it in LEI1.
If two lengths allowed, fill LEI1 and LEI2 with positive values.
If zero is specified and the (b1,b2) bits of OP25I are not (1,1) then the first interleaved
2/5 decoded barcode will fix the length.
(1,0) : 2 fixed allowed lengths (specified in LEI1 and LEI2)
(0,1) : 3 fixed allowed lengths (specified in LEI1, LEI2 and
(0,0): mod43 checksum calculation enabled
(0,1): CIP checksum calculation enabled
(1,0): Italian checksum calculation enabled
(1,1): checksum calculation disabled
(0,0) : 1 fixed allowed length (specified in LEI1)
LEI3)
(1,1) : any length allowed (>4)
0: No length test
>0: Authorise n-character barcodes
1
1
0
ToughRunners / ScanWear – Communication Protocol v1.2 - 39 -
Data Capture
for Workforce
in Motion
Standard 2 of 5 and MSI parameters:
OP25S Description Default
b0 Reserved (do not modify) 1
b1
b2 1
b3 Check digit not transmitted 0
b4 Check digit not calculated 1
b5
b6 1
b7 Code MSI check digit not transmitted 0
LES1 / LES2 / LES3 Description Default
n
Nota :
If one length allowed, specify it in LES1.
If two lengths allowed, fill LES1and LES2 with positive values.
If zero is specified and the (b1,b2) bits of OP25S are not (1,1) then the first standard 2/5
decoded barcode will fix the length.
CODABAR et PLESSEY parameters :
OPMON Description Default
b0 Reserved (do not modify) 1
b1 Reserved (do not modify) 1
b2
b3 0
b4 Reserved (do not modify) 0
b5 Reserved (do not modify) 1
b6 Reserved (do not modify) 1
b7 Code PLESSEY check digit not transmitted 1
UPC/EAN parameters :
OPEAN1 Description Default
b0 Validation UPCA 1
b1 Validation UPCE 1
b2 Validation EAN8 1
b3 Validation EAN13 1
b4 ADD-ON required and transmitted (**) 0
b5 ADD-ON disabled 1
b6 UPCA number system not transmitted 0
b7 UPCA check digit not transmitted 0
(**) when decoded, the add-on is transmitted.
(0,0) : 1 fixed allowed length (specified in LES1)
(1,0) : 2 fixed allowed lengths (specified in LES1 and LES2)
(0,1) : 3 fixed allowed lengths (specified in LES1, LES2 and
LES3)
(1,1) : any length allowed (>4)
Code MSI Check Digit
(0,0): not calculated
(1,0): Modulo 11
(0,1): Double modulo 10
(1,1) : Modulo 10
0: No length test
>0: Authorise n-character barcodes
Start/Stop CODABAR
(0,0) : start/stop abcd/abcd
(1,0) : start/stop ABCD,ABCD
(0,1) : start/stop abcd,tn*e
(1,1) : standard
1
1
0
0
ToughRunners / ScanWear – Communication Protocol v1.2 - 40 -