Baracoda All in One Printer User Manual

Data Capture
ToughRunners / ScanWear
for Workforce
in Motion
©Baracoda TM – May 2009
Data Capture
for Workforce
in Motion
SUMMARY
SUMMARY ................................................................... 2
REVISION HISTORY .......................................................... 3
1.
INTRODUCTION: GENERIC PACKET FORMAT ................................. 4
2.
COMMAND ID SUMMARY .................................................. 5
3.
COMMAND DETAILS ..................................................... 8
3.1.
S
3.2.
3.3.
3.4.
3.5.
3.6.
3.7.
3.8.
3.9.
3.10. C
3.11. P
ETTING MODE
O
PERATIONAL STATISTICS
W
RIST MOTION DETECTION LEVEL (FOR
R
ESTORE DEFAULT SETTINGS
MMI
SETTINGS
B
LUETOOTH COMMANDS
R
EADING AND TRIGGERING COMMANDS
D
ECODER COMMANDS
D
ATA FORMAT COMMANDS OMMUNICATION COMMANDS OWER SAVING COMMANDS
......................................................... 8
................................................. 8
BSW
ONLY
) ............................... 9
.............................................. 10
....................................................... 10
................................................... 12
........................................ 13
.................................................... 17
................................................. 19
................................................ 24
................................................ 25
4.
4.1.
4.2.
4.3.
4.4.
5.
5.1.
5.2.
6.
SPECIAL PACKETS .................................................... 27
D
EPRECATED PACKETS
A
CKNOWLEDGMENT PACKETS
S
PECIAL SCANNER TO HOST MESSAGES
S
PECIAL HOST TO SCANNER MESSAGES
APPENDIX A: BLUETOOTH PROTOCOL. .................................... 29
T
HE CONFIGURATION FRAMES ARE AS FOLLOWS
C
OMMANDS
APPENDIX B: DECODER PROTOCOL. ...................................... 38
: .......................................................... 29
................................................... 27
................................................ 27
........................................ 28
........................................ 28
: ................................. 29
ToughRunners / ScanWear – Communication Protocol v1.2 - 2 -
Data Capture
Revision History
Changes to the original manual are listed below.
Document Date Description
1.0 25th Sep. 07 Initial release
1.1 16th Dec. 08 Graphic Presentation updated
1.2 15th May 09 Updated for firmware version 4.00.6
for Workforce
in Motion
ToughRunners / ScanWear – Communication Protocol v1.2 - 3 -
Data Capture
for Workforce
in Motion
1.
Introduction: generic packet format
All the frames described in this document are formatted as shown (*):
STX Frame # Nbr of cmds Command 1 Command x Checksum ETX
1 byte 1 byte 1 byte 3 n bytes 3 n bytes 1 byte 1 byte
Command ID Data length data
1 byte 1 byte x bytes
Ba) 1 Byte : STX Bb) 1 Byte : Frame number Bc) 1 Byte : Number of commands (or number of commands responses) Bd) 3..n Bytes : Command 1 … Bx) 3..n Bytes : Command x …
By) 1 Byte : CheckSum = (
Bz) 1 Byte : ETX
Each command is formatted as follows: Ca) 1 Byte : Command ID Cb) 1 Byte : Data length Cc) 0..n Bytes : Data
(*): a limited number of frames do not follow this format. They are described in the section 2/.
=xbi
) mod 256
B
i
ToughRunners / ScanWear – Communication Protocol v1.2 - 4 -
Data Capture
2.
Command ID summary
The commands are sorted by category (4 MSB of Command ID):
0x0? Scanner control commands
0x01 Enter "Setting Mode"
0x02 Exit "Setting Mode"
0x03 Launch autotest // RESERVED
0x04 Endurance (AutoScan) test setting // RESERVED
0x05 Retrieve operational statistics
0x06 Reset operational statistics
for Workforce
in Motion
0x07 Get wrist motion detection level
0x08 Set wrist motion detection level
0x0E firmware presence flag // RESERVED
0x0F Restore default settings
0x1? RESERVED
0x2? Firmware upgrade commands // RESERVED
0x27 Start programming (application AT89C51ED2)
0x28 End programming
0x29 Clear firmware
0x2A Read 128Byte bloc
0x2B Write 128Byte bloc
0x2C Verify checksum
0x2D Read Boot cartouche
0x2E Read Application cartouche
0x2F Switch to download mode
ToughRunners / ScanWear – Communication Protocol v1.2 - 5 -
Data Capture
0x3? RESERVED
0x4? MMI commands
0x40 Get vibrator
0x41 Set vibrator
0x42 Get beeps (since version 3.01.00)
0x43 Set beeps (since version 3.01.00)
0x5? Bluetooth commands
0x5E Bluetooth module commands
for Workforce
in Motion
0x6? Reading and triggering commands
0x60 Get reading mode
0x61 Set reading mode
0x62 Get remote triggering settings
0x63 Set remote triggering settings
0x7? RESERVED
0x8? Decoder commands
0x80 Get symbology settings
0x81 Set symbology settings
0x82 Get voting value
0x83 Set voting value
0x84 Get scan beam timeout
0x85 Set scan beam timeout
0x9? RESERVED
ToughRunners / ScanWear – Communication Protocol v1.2 - 6 -
Data Capture
0xA? Data format commands
0xA2 Get symbology prefix
0xA3 Set symbology prefix
0xA4 Get data suffix
0xA5 Set data suffix
0xA6 Get data prefix
0xA7 Set data prefix
0xA8 Get AIM symbology ID transmission
0xA9 Set AIM symbology ID transmission
for Workforce
in Motion
0xAA Get symbology suffix
0xAB Set symbology suffix
0xB? RESERVED
0xC? RESERVED
0xD? Communication commands
0xD5 Get Radio behavior when in charge
0xD6 Set Radio behavior when in charge
0xE? RESERVED
0xF? Power saving commands
0xF0 Get shutdown timers
0xF1 Set shutdown timers
0xF2 Get battery status
ToughRunners / ScanWear – Communication Protocol v1.2 - 7 -
Data Capture
0x01
0x02
0x05
AAAABBBBCC
3.
Command details
3.1. Setting mode
Command ID
Description Enter Setting mode
Length 0
payload none
Response 0 (1 = ERROR)
Command ID
Description Exit Setting mode
Length 0
for Workforce
in Motion
payload none
Response 0 (1 = ERROR)
A radio disconnection leads to an exit from this setting mode.
3.2. Operational statistics
Command ID
Description Retrieve operational statistics
Length 0
payload none
Response
10 bytes :
where :
AAAA = Number of scans done
BBBB = Operating time (minutes)
CC = Number of charge cycles done (MSB first)
ToughRunners / ScanWear – Communication Protocol v1.2 - 8 -
Data Capture
0x06
AAAABBBBCC
0x07
0x08
A
Command ID
Description Reset operational statistics
Length 10
payload
Response 0 (1 = ERROR)
10 bytes :
where :
AAAA = Number of scans done
BBBB = Operating time (minutes)
CC = Number of charge cycles done (MSB first)
for Workforce
in Motion
3.3. Wrist motion detection level
Command ID
Description Get wrist motion detection level
Length 0
payload none
Response 1 byte :
A = 0, 1 or 2
0 = medium, 1 = easy, 2 = hard
Default setting = 1 (easy)
Command ID
Description Set wrist motion detection level
Length 1
(for BSW only)
payload
Response 0 (1 = ERROR)
ToughRunners / ScanWear – Communication Protocol v1.2 - 9 -
= 0, 1 or 2
0 = medium, 1 = easy, 2 = hard
Data Capture
0x0F
A
0x40
ABC
0x41
ABC
for Workforce
3.4. Restore default settings
Command ID
Description Restore factory default settings (reboots scanner)
Length 1
payload
Response none
= 0
3.5. MMI settings
Command ID
Description Get vibrator
Length 0
in Motion
payload none
Response
where :
A = Vibration duration on BAD READ event
B = Vibration duration on BARCODE LOST event
C = Vibration duration on NACK event
Durations in 1/10 sec
Default settings:
0x0A 0x0A 0x0A
Command ID
Description Set vibrator
Length 3
payload
where :
A = Vibration duration on BAD READ event
ToughRunners / ScanWear – Communication Protocol v1.2 - 10 -
Data Capture
B
0x42
(Since version 3.01.00)
1
0x43
(Since version 3.01.00)
1
= Vibration duration on BARCODE LOST event
C = Vibration duration on NACK event
Durations in 1/10 sec
Response 0 (1 = ERROR)
Command ID
Description Get beeps
Length 0
payload none
Response 1 byte:
for Workforce
in Motion
Bit A.0 = 0 enable barcode decoded beep, 1 disable barcode decoded beep
Bit A.1 = 0 enable barcode acknowledgement beep, disable barcode acknowledgement beep
Default settings:
0x00
Command ID
Description Set beeps
Length 1
payload 1 byte:
Bit A.0 = 0 enable barcode decoded beep, 1 disable barcode decoded beep
Response 0 (1 = ERROR)
ToughRunners / ScanWear – Communication Protocol v1.2 - 11 -
Bit A.1 = 0 enable barcode acknowledgement beep, disable barcode acknowledgement beep
Data Capture
0x5E
{Code ID} {length}
for Workforce
in Motion
3.6. Bluetooth commands
Command ID
Description Bluetooth Commands
Length Variable (1-255)
payload {Code ID} {length} “Parameters”
Response If the device responds:
“Response”
Else: {0}
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 -
Data Capture
for Workforce
in Motion
------01 : Simple scan
------10 : Start Multiscan Session
---1---- : Stop Multiscan Session
D = long press duration x 100ms
E = maximum scans in session:
-0000000 : unlimited
-XXXXXXX : number of scans in the session
1------- : Anti-doubloon in the session
F = Inter-scan interval x100ms
G = 0
H = 0
I = 0
Default settings :
ScanWear : 0x00 0x01 0x01 0x0A 0x00 0x0A 0x00 0x00 0x00 ToughRunners :0x01 0x01 0x01 0x0A 0x00 0x0A 0x00 0x00 0x00
ToughRunners / ScanWear – Communication Protocol v1.2 - 14 -
Data Capture
0x61
ABCDEFGHI
Command ID
Description Set reading mode
Length 9
payload
where :
A = long press action (1 sec.):
------00 : Disabled
------01 : Hold laser beam
------10 : Shut down scanner
------11 : Start Multiscan Session
for Workforce
in Motion
B = simple press action :
------00 : Disabled
------01 : Simple scan
------10 : Start Multiscan Session
---1---- : Stop Multiscan Session
C = wrist motion action :
------00 : Disabled
------01 : Simple scan
------10 : Start Multiscan Session
---1---- : Stop Multiscan Session
D = long press duration x 100ms
E = maximum scans in session:
-0000000 : unlimited
-XXXXXXX : number of scans in the session
1------- : Anti-doubloon in the session
F = Inter-scan interval x100ms
ToughRunners / ScanWear – Communication Protocol v1.2 - 15 -
Data Capture
G
0x62
ABCDEFG
= 0
H = 0
I = 0
Response 0 (1 = ERROR)
Command ID
Description Get remote triggering settings
Length 0
payload none
Response
for Workforce
in Motion
where :
A = character to trigger a Good Read signal
B = character to trigger a Good Read signal
C = character to trigger a Simple Scan
D = character to start an Multiscan Session
E = character to stop an Multiscan Session
F = character to lock the scan engine
G = character to unlock the scan engine
Default settings :
0xA1 0xA2 0xB1 0xB2 0xB3 0xC1 0xC2
ToughRunners / ScanWear – Communication Protocol v1.2 - 16 -
Data Capture
0x63
ABCDEFG
0x80
(cf. Appendix
If length = 0 then 17 bytes, if length = 1 then 20
Command ID
Description Set remote triggering settings
Length 7
payload
where :
A = character to trigger a Good Read signal
B = character to trigger a Good Read signal
C = character to trigger a Simple Scan
D = character to start an Multiscan Session
E = character to stop an Multiscan Session
for Workforce
in Motion
F = character to lock the scan engine
G = character to unlock the scan engine
Response 0 (1 = ERROR)
3.8. Decoder commands
Command ID
Description Get symbology settings
Length 0 or 1
payload none
Response 17 or 20 bytes (since version 3.02.03)
B for more details)
bytes
Default value:
0xB4 0x90 0xEF 0x20 0x36 0x00 0x00 0x00 0x77 0x00 0x00 0x00 0xE3 0x2F 0x08 0x00 0x1D
ToughRunners / ScanWear – Communication Protocol v1.2 - 17 -
Data Capture
0x81
0x82
V
0x83
V
0x84
T
0x85
Command ID
Description Set symbology settings
Length 20 (since version 3.02.03)
payload cf. Appendix B for details
Response 0 (1 = ERROR)
Command ID
Description Get voting value
Length 0
payload none
for Workforce
in Motion
Response
Command ID
Description Set voting value
Length 1
payload
Response 0 (1 = ERROR)
Command ID
Description Get scan beam timeout
Length 1
= number of decodes to validate a good scan
Default value = 1
= number of decodes to validate a good scan
payload
Response 0 (1 = ERROR)
Command ID
Description Set Scan beam timeout
ToughRunners / ScanWear – Communication Protocol v1.2 - 18 -
= timeout in seconds (255 = Autoscan mode)
Default value = 3
Data Capture
T
0xA2
(if length =
Length 1
payload
Response 0 (1 = ERROR)
= timeout in seconds (255 = Autoscan mode)
3.9. Data format commands
Command ID
Description Get symbology prefix
Length 0 or 1
payload None
Response 22 or 28 bytes (since version 3.02.03)
0 then 22 bytes, if length = 1 then 28 bytes):
for Workforce
in Motion
AABBCCDDEEFFGGHHIIJJKKLLMMNN
Where:
AA = Code39
BB = Interleaved 2 of 5
CC = Standard 2 of 5
DD = Codabar
EE = EAN/UPC
FF = Code128
GG = MSI
HH = PLESSEY
II = Code93
JJ = EAN128
ToughRunners / ScanWear – Communication Protocol v1.2 - 19 -
KK = Codablock F
LL = RSS 14 (GS1 Databar)
MM = RSS Ltd (GS1 Databar Ltd)
NN = RSS Expanded (GS1 Databar Expanded)
0x00 means disabled.
Data Capture
0xA3
AABBCCDDEEFFGGHHIIJJKK
LLMMNN
Default settings :
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Command ID
Description Set symbology prefix
Length 28 (since version 3.02.03)
payload
Where:
AA = Code39
for Workforce
in Motion
BB = Interleaved 2 of 5
CC = Standard 2 of 5
DD = Codabar
EE = EAN/UPC
FF = Code128
GG = MSI
HH = PLESSEY
II = Code93
JJ = EAN128
KK = Codablock F
LL = RSS 14 (GS1 Databar)
MM = RSS Ltd (GS1 Databar Ltd)
Response 0 (1 = ERROR)
ToughRunners / ScanWear – Communication Protocol v1.2 - 20 -
NN = RSS Expanded (GS1 Databar Expanded)
0x00 means disabled.
Data Capture
0xA4
suffix
0xA5
suffix
0xA6
prefix
0xA7
prefix
Command ID
Description Get data suffix
Length 0
payload None
Response
Command ID
Description Set data suffix
Length 0-32
payload
0-32 bytes:
Default settings :
No suffix
for Workforce
in Motion
Response 0 (1 = ERROR)
Command ID
Description Get data prefix
Length 0
payload None
Response
Command ID
0-32 bytes:
Default settings :
No prefix
Description Set data prefix
Length 0-32
payload
Response 0 (1 = ERROR)
ToughRunners / ScanWear – Communication Protocol v1.2 - 21 -
Data Capture
0xA8
A
0xA9
A
0xAA
(if length =
Command ID
Description Get AIM symbology ID transmission
Length 0
payload None
Response
:
0 = disabled
1 = enabled
Default settings :
A = 0
for Workforce
in Motion
Command ID
Description Set AIM symbology ID transmission
Length 1
payload
Response 0 (1 = ERROR)
Command ID
Description Get symbology suffix
Length 0 or 1
payload None
Response 22 or 28 bytes (since version 3.02.03)
:
0 = disabled
1 = enabled
0 then 22 bytes, if length = 1 then 28 bytes):
ToughRunners / ScanWear – Communication Protocol v1.2 - 22 -
AABBCCDDEEFFGGHHIIJJKKLLMMNN
Where:
AA = Code39
BB = Interleaved 2 of 5
Data Capture
CC
0xAB
AABBCCDDEEFFGGHHIIJJKK
LLMMNN
for Workforce
in Motion
= Standard 2 of 5
DD = Codabar
EE = EAN/UPC
FF = Code128
GG = MSI
HH = PLESSEY
II = Code93
JJ = EAN128
KK = Codablock F
LL = RSS 14 (GS1 Databar)
MM = RSS Ltd (GS1 Databar Ltd)
NN = RSS Expanded (GS1 Databar Expanded)
0x00 means disabled.
Default settings : 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Command ID
Description Set symbology suffix
Length 28 (since version 3.02.03)
payload
Where:
ToughRunners / ScanWear – Communication Protocol v1.2 - 23 -
AA = Code39
BB = Interleaved 2 of 5
CC = Standard 2 of 5
DD = Codabar
Data Capture
EE
0xD5
0xD6
for Workforce
in Motion
= EAN/UPC
FF = Code128
GG = MSI
HH = PLESSEY
II = Code93
JJ = EAN128
KK = Codabloc F
LL = RSS 14 (GS1 Databar)
MM = RSS Ltd (GS1 Databar Ltd)
NN = RSS Expanded (GS1 Databar Ltd)
0x00 means disabled.
Response 0 (1 = ERROR)
3.10. Communication commands
Command ID
Description Get radio behavior when in charge
Length 0
payload None
Response 1 byte:
Bit A.0 = 1 if switch to slave when charging
Bit A.1 = 1 if switch radio off when charging
Default settings :
A = 0x01
Command ID
Description Set radio behavior when in charge
ToughRunners / ScanWear – Communication Protocol v1.2 - 24 -
Data Capture
A.0
0xF0
0xF1
AABBCCU
Length 1
payload
Response 0 (1 = ERROR)
Bit
Bit A.1 = 1 if switch radio off when charging
= 1 if switch to slave when charging
3.11. Power saving commands
Command ID
Description Get shutdown timers
Length 0
payload None
Response 7 bytes:
for Workforce
in Motion
AABBCCU
Where:
AA = scanner shutdown timer (sec.)
BB = radio shutdown timer when in Master mode (sec.)
CC = radio shutdown timer when in Slave mode (sec.)
U = 0 (unused)
Default settings : 0x04 0xB0 0x04 0xB0 0x04 0xB0 0x00
Command ID
Description Set shutdown timers
Length 7
payload
Where:
AA = scanner shutdown timer (sec.)
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.
for Workforce
in Motion
Interval (LSB) | Inquiry Window (MSB) | Inquiry Window (LSB)]
Inquiry Interval and Inquiry Window are in number of Bluetooth slots) (1 slot = 0.625 ms)
scan timeout
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.
ToughRunners / ScanWear – Communication Protocol v1.2 - 31 -
Inquiry Window (MSB) | Inquiry Window (LSB)]
(default 0xC80, 0x18)
done
0x26 00 01 00 if not
Data Capture
Command
Header
Length
Payload
Answer
Get page scan timeout
0x25
00 00
-
0x25 00 04 [Page Interval (MSB) | Page Interval
Command
Header
Length
Payload
Answer
Set page
0x24
00 04
[Page Interval (MSB) | Page Interval (LSB) |
0x24 00 01 01 if done
Page Scan and Inquiry Scan Interval
Page Scan
Inquiry Scan
for Workforce
(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)
scan timeout
Page Window (MSB) | Page Window (LSB)]
0x24 00 01 00 if not
(default 0x320, 0xb0)
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.
in Motion
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:
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 -
Data Capture
Command
Header
Length
Payload
Answer
Set link
timeout
0x19
00 02
[MSB of link Tmo, LSB of link Tmo]
0x19
00 01 01 if done
Command
Header
Length
Payload
Answer
Get link timeout
0x18
00 00
-
0x18 00 02 [MSB of link Tmo, LSB of link Tmo]
for Workforce
in Motion
MinSniff = 0x0050 MaxSniff = 0x00F0 Attempt = 0x0008 Timeout = 0x0030
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.
Byte # Byte name Default value
1 COD1 0xB4 2 COD2 0x90 3 OPC39 0xEF 4 OPMUL 0x20 5 OP25I 0x36 6 LEI1 0x00 7 LEI2 0x00 8 LEI3 0x00
9 OP25S 0x77 10 LES1 0x00 11 LES2 0x00 12 LES3 0x00 13 OPMON 0xE3 14 OPEAN1 0x2F 15 OPEAN2 0x08 16 OPC93 0x00 17 FNC1 0x1D 18 RSS 14 (GSS Databar) 0x3B 19 RSS Ltd (GSS Databar Ltd) 0x3B 20 RSS Expanded (GSS Databar Expanded) 0x3B
The symbologies 18,19,20 are available since firmware version 3.02.03.
COD1 Description Default
b0 Reserved 0 b1 Enable MSI-PLESSEY 0 b2 Enable Code 128 1 b3 Enable standard 2/5 0 b4 Enable CODABAR / MONARCH 1 b5 Enable UPC/EAN 1 b6 Enable interleaved 2/5 0 b7 Enable CODE 39 1
COD2 Description Default
b0 unused 0 b1 unused 0 b2 unused 0 b3 unused 0 b4 Enable EAN 128 1 b5 Enable AIM ID for EAN128 0 b6 Disable EAN8 check digit transmission 0 b7 Enable code 93 1
in Motion
Remark:
The EAN128 is encoded with code128 symbology.
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 -
Data Capture
for Workforce
in Motion
OPEAN2 Description Default
b0 UPCE check digit not transmitted 0 b1 UPCE conversion enabled 0
b2
b3
b4 Reserved (do not modify) 0 b5 UPCE number system not transmitted 0 b6 Reserved (do not modify) 0 b7 EAN13check digit not transmitted 0
Code93 parameters :
OPC93 Description Default
Reserved (do not modify) 0
EAN128 parameters :
FNC1 Description Default
b0-b6 ASCII (0 à 127) GS replacment character 0x1D
b7 FNC1 separator character transmitted 0
RSS 14 (GS1 Databar) parameters :
RSS14 Description Default
b0 RSS14 validation 1 b1 AIM Prefix « ]e0 » validation 1 b2 AIM Prefix « ]C1 » validation (prioritary over b1) 0 b3 Application indentifier AI=(01) validation 1 b4 Checksum modulo 10 validation 1 b5 Linear decoding of composite 2D barcodes allowed 1 b6 Not used 0 b7 Not used 0
0: transmit UPCE as UPCA
1: transmit UPCE as EAN13
0: transmit UPCA as EAN13
1: transmit UPCA as UPCA
0
1
RSS Ltd (GS1 Databar Ltd) parameters :
RSS Ltd Description Default
b0 RSS Ltd validation 1 b1 AIM Prefix « ]e0 » validation 1 b2 AIM Prefix « ]C1 » validation (prioritary over b1) 0 b3 Application indentifier AI=(01) validation 1 b4 Checksum modulo 10 validation 1 b5 Linear decoding of composite 2D barcodes allowed 1 b6 Not used 0 b7 Not used 0
ToughRunners / ScanWear – Communication Protocol v1.2 - 41 -
Data Capture
RSS Expanded (GS1 Databar Expanded) parameters :
RSS
Expanded
b0 RSS Expanded validation 1 b1 AIM Prefix « ]e0 » validation 1 b2 AIM Prefix « ]C1 » validation (prioritary over b1) 0 b3 Application indentifier AI=(01) or (019) validation 1 b4 Checksum modulo 10 validation 1 b5 Linear decoding of composite 2D barcodes allowed 1 b6 Not used 0 b7 Not used 0
Description Default
for Workforce
in Motion
ToughRunners / ScanWear – Communication Protocol v1.2 - 42 -
Loading...