ETTING CONFIGURATION OF CODE 39 SYMBOLOGY
ETTING A CONFIGURATION OF CODABAR SYMBOLOGY
ETTING A CONFIGURATION OF ALL SYMBOLOGIES
ODIFYING A CONFIGURATION OF ALL SYMBOLOGIES
ENDING A SPECIAL COMMAND TO CODE39 SYMBOLOGY
. ................. 30
. ................ 31
. .................. 32
. ................ 32
. ............... 33
APPENDIX 1: BLUETOOTH PROTOCOL ........................................... 34
BaracodaPencil 2 – Communication Protocol v1.3 - 2 -
Page 3
Revision History
Revision History
Revision HistoryRevision History
Changes to the original manual are listed below.
Document Date Description
Data Capture
for Workforce
in Motion
1.1 26 Jan. 07
1.2 29 Sept. 08
1.3 02 Jan. 09
Initial release
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"
Add “Decoder Communication Protocol” section
Add “Appendix 1 – Bluetooth Protocol” section
BaracodaPencil 2 – Communication Protocol v1.3 - 3 -
Page 4
Data Capture
Code ID
Length
Payload
1 Byte
2 Bytes
N Bytes
for Workforce
1.
1.
Introduction
Introduction
1.1.
IntroductionIntroduction
1.1.
1.1. Generalities
1.1.1.1.
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
Generalities
GeneralitiesGeneralities
in Motion
http://www.baracoda.com
1.2.
1.2. Generic packet
1.2.1.2.
All the frames described in this document are formatted as shown:
- 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.
Generic packet
Generic packetGeneric packet
BaracodaPencil 2 – Communication Protocol v1.3 - 4 -
Page 5
Data Capture
Code ID
Description
Frame
0x01
Legacy
0x01 0x01 0
x01
Code ID
Description
Frame
0x06
ACK 0x06 0x01 0xYY
0x15
NACK
0x15 0x01 0xYY
Code ID
Description
Frame
0x16
SYN 0x16 0x01 0xYY
for Workforce
2.
2.
Communication protocol
Communication protocol
2.2.
Communication protocolCommunication protocol
2.1.
2.1. Bidirectional packets
2.1.2.1.
2.1.1.
2.1.1. Control messages
2.1.1.2.1.1.
Bidirectional packets
Bidirectional packetsBidirectional packets
Control messages
Control messagesControl messages
2.1.1.1. Specific packets
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
in Motion
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
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 -
Page 6
Data Capture
Code ID
Description
Payload
0x32
–
0x33
Barcode data
DATA
string
Data
0-32
0-32
0-32
for Workforce
2.2.
2.2. Scanner to host
2.2.2.2.
2.2.1.
2.2.1. Encapsulation scheme
2.2.1.2.2.1.
Scanner to host messages
Scanner to hostScanner to host
Encapsulation scheme
Encapsulation schemeEncapsulation scheme
messages
messagesmessages
2.2.2.
2.2.2. Data
2.2.2.2.2.2.
Data string format
DataData
string format
string formatstring format
in Motion
Timestamp
12 bytes
Data
Prefix
bytes
Capture
Prefix
0-32 bytes 0-4 bytes 0, 2 or 3 bytes - 0-4 bytes
Symbology
Prefix
AIM Identifier
Barcode / RFID
data
Symbology
suffix
Capture
suffix
bytes
suffix
bytes
BaracodaPencil 2 – Communication Protocol v1.3 - 6 -
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 -
Page 21
1Byte
1Byte
1Byte
Header
Selected
Symbolog
y
A SELECT ALL
B Code 93
C Code 128 / EAN 128
D EAN 13 / UPC
A
E Code 39
F Codabar
G Interleaved 2 of 5
H Standard 2 of 5 (industrial 2 of 5)
I Matrix 2 of 5
(symbology dis
abled)
J Code 11
K MSI
L UPC E
M EAN 8
N RSS14
(not available on RoadRunners product)
O RSSLTD
(not available on RoadRunners product)
2.4.
2.4. Decoder Communication
2.4.2.4.
2.4.1.
2.4.1. frame format
2.4.1.2.4.1.
Header Type Size (Bytes) Command
2.4.2.
2.4.2. Header
2.4.2.2.4.2.
The Header field defines the type of symbology to select; it is 1 byte long (ACSII code):
Decoder Communication Protocol
Decoder CommunicationDecoder Communication
frame format
frame formatframe format
Header
HeaderHeader
Protocol
ProtocolProtocol
Data Capture
for Workforce
in Motion
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 -
Page 22
Type
Description
D
E
2.4.3.
2.4.3. Type
2.4.3.2.4.3.
The Type field defines the type of command to be sent to the reader, it is 1 byte long.
Type
TypeType
Data Capture
for Workforce
in Motion
A
B
C
(*): 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.
Get config: asks the reader to give the configuration options for the selected symbology. (1) (*)
Set config : sets an options configuration for the selected symbology. (1)
Set Default: sets the default options configuration for the selected symbology(ies).
Usual Command.
Special Command (with parameters). (2)
2.4.4.
2.4.4. Size
2.4.4.2.4.4.
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.
2.4.5. Comma
2.4.5.2.4.5.
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.
2.4.5.1. Set Config
2.4.5.1.2.4.5.1.
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 -
Size
SizeSize
Command
CommaComma
nd
ndnd
Set Config ((((Type
Set ConfigSet Config
Type """"BBBB")
TypeType
")
")")
Page 23
Data Capture
Bit Option
LSB 0 Enable/Disable Symbology
1
Enable/Disable
Min.
length (1)
2
Enable/Disable Checksum calculation
(2)
3
Enable/Disable Checksum transmission
4
Enable/Disable M
ax
. length (
3)
5
Enable/Disable
symbology prefix (4)
6
Enable/Disable
symbology suffix (4)
MSB
7
FREE
CODE 93 (Header "B")
Bit Option
LSB 0 FREE
1
FREE
2
FREE
3
FREE
4
FREE
5
FREE
6
FREE
MSB
7
FREE
for Workforce
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.
in Motion
(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.
BaracodaPencil 2 – Communication Protocol v1.3 - 23 -
Page 24
Data Capture
CODE 128 / EAN 128 (Header "C")
Bit Option
LSB 0 GS transmit (EAN128)
1
AIM Sym
b ID transmit (EAN128)
2
FREE
3
FREE
4
FREE
5
FREE
6
FREE
MSB
7
FREE
EAN 13 / UPC
-
A (Header "D")
Bit Option
LSB 0 Number System transmitted (UPC A)
1
Enable/disable ISBN and ISSN
2
ISSN hyphen transmission
3
ISSN price co
de transmission
4
UPC-A, transmitted as EAN 13
5
Add-on Digits required/not required
6
Enable/disable Add
-
on 2
MSB
7
Enable/disable Add
-
on 5
CODE 39 (Header "E")
Bit Option
LSB 0 Enable/Disable start
-
stop transmission
1 Enable/Disable Full ACSII Mode
2
Enable/Disable "*" as start
-
stop character
3
Enable/Disable "$" as start
-
stop character
4
FREE
5
FREE
6
FREE
MSB
7
FREE
CODABAR (Header "F")
Bit Option
LSB 0 Enable/Disable start
-
stop transmission
1
FREE
2
FREE
3
FREE
4
FREE
5
FREE
6
FREE
MSB
7
FREE
for Workforce
in Motion
BaracodaPencil 2 – Communication Protocol v1.3 - 24 -
Page 25
Data Capture
INTERLEAVED 2 OF 5 (Header "G")
Bit Option
LSB 0 FREE
1
FREE
2
FREE
3
FREE
4
FREE
5
FREE
6
FREE
MSB
7
FREE
STANDARD 2 OF 5 (Header "H")
Bit Option
LSB 0 FREE
1
FREE
2
FREE
3
FREE
4
FREE
5
FREE
6
FREE
MSB
7
FREE
MATRIX 2 OF 5 (Header "I")
Bit Option
LSB 0 FREE
1
FREE
2
FREE
3
FREE
4
FREE
5
FREE
6
FREE
MSB
7
FREE
CODE 11 (Header "J")
Bit Option
LSB 0 FREE
1
FREE
2
FREE
3
FREE
4
FREE
5
FREE
6
FREE
MSB
7
FREE
for Workforce
in Motion
BaracodaPencil 2 – Communication Protocol v1.3 - 25 -
Page 26
Data Capture
MSI (Header "K")
Bit Option
LSB 0 FREE
1
FREE
2
FREE
3
FREE
4
FREE
5
FREE
6
FREE
MSB
7
FREE
UPC-E (Header "
L")
Bit Option
LSB 0 Numb
er System transmitted
1 -
2 -
3 -
4
FREE
5
UPC-E transmitted as UPC
-A
6 -
MSB
7
FREE
EAN 8 (Header "
M")
Bit Option
LSB 0 FREE
1 -
2 -
3 -
4
EAN 8
transmitted as EAN 13
5
FREE
6 -
MSB
7
FREE
RSS 14
(Header "
N")
Bit Option
LSB 0 LINKAGE FLAG PRINT
1
APPLICATION ID PRINT
2
FREE
3
FREE
4
FREE
5
FREE
6
FREE
for Workforce
in Motion
BaracodaPencil 2 – Communication Protocol v1.3 - 26 -
Page 27
Data Capture
MSB
7
FREE
RSS Limited
(Header "
O")
Bit Option
LSB 0 LINKAGE FLAG PRINT
1
APPLICATION ID PRI
NT
2
FREE
3
FREE
4
FREE
5
FREE
6
FREE
MSB
7
FREE
for Workforce
in Motion
2.4.5.2.
2.4.5.2. Get config
2.4.5.2.2.4.5.2.
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.
2.4.5.3. Usual
2.4.5.3.2.4.5.3.
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.
Get config((((Type
Get configGet config
Usual Commands
Usual Usual
Commands (Type
CommandsCommands
Type """"AAAA")
Type Type
")
")")
(Type """"DDDD""""))))
(Type (Type
BaracodaPencil 2 – Communication Protocol v1.3 - 27 -
Page 28
Data Capture
COMMANDS TABLE
Ascii
A Enable Symbology
B Disable Symbology
C Disable Min. length
D Enable Min. length (1)
E Enable Checksum calculation (2)
F Disable Checksum
calculation (2)
G Enable Checksum transmission
H Disable Checksum transmission
I Enable start/stop characters transmission
J Disable start/stop characters transmiss
ion
K Start/stop accepted characters "*" only
L Start/stop accepted characters "$" only
M start/stop accepted characters "*" and "$"
N Enable Code 39 full ASCII mode
O Disable Code 39 full ASCII mode
P Enable number system transmission
Q Disable number system transmission
R Disable prefix
S Enable
prefix
T Disable suffix
U Enable suffix
V Enable ISBN and ISSN
W Disable ISBN and ISSN
X UPC-A/EAN 8 transmitted as EAN 13
Y UPC-A/EAN 8 trans
mitted as UPC
-
A/EAN 8
Z UPC-E transmitted as UPC
-A
a UPC-E transmitted as UPC
-E
b Enable hyphen transmission for ISSN
c Dis
able hyphen transmission for ISSN
d Disable Max. length
e Enable Max. length (3)
f Enable all EAN/UPC symbologies
g Disable all EAN/UPC symbologies
i Enable linkage flag transmission
j Dissable linkage flag transmission
k Enable application identifier transmission
l Dissable applic
ation identifier transmission
m Enable Group separator transmission (EAN128)
n Dissable Group separator transmission (EAN128)
for Workforce
in Motion
CODE COMMAND
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
BaracodaPencil 2 – Communication Protocol v1.3 - 28 -
Page 29
Data Capture
o Enable AIM symbology identifier transmission
p Dissable AIM symbology identifier transmission
q Enable Price Co
de transmission for ISSN
r Disable Price Code
transmission for ISSN
s Add-on Digits not required but transmitted if read
t Add-on Digits required and transmitted
u Enable 2
-
digit Add
-
on
v Disable 2
-
digit Add
-on
w Enable 5
-
digit Add
-on
x disable 5
-
digit Add
-on
SPECIA
L COMMANDS
ASCII
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
- -
… … … …
for Workforce
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.
in Motion
2.4.5.4.
2.4.5.4. Special
2.4.5.4.2.4.5.4.
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.
CODE DESCRIPTION PARAMTER(S) RESPONSE
Special Commands
Special Special
Commands (Type
CommandsCommands
(Type """"EEEE""""))))
(Type (Type
(*): 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 -
Page 30
Data Capture
Header
Type
Size
Command
Header
Type
Size
Command
1st
byte :
$01 Bit Option
1 0 Symbology Enabled
0 1 Min.
length
Disable
d
0 2 Checksum calculation
Disable
d
0 3 Checksum transmission Disable
d
0 4 Max. length Disable
d
0 5 -
0 6 -
0 7 -
2nd
byte :
$05
Bit Option
1 0 s
tart-stop transmission
Enabled
0 1 Full ACSII Mode
Disable
d
1 2 "*" as start
-
stop character
Enabled
0 3 "$" as start
-
stop character
Disable
d
0 4 -
0 5 -
0 6 -
0 7 -
for Workforce
2.4.6.
2.4.6. Examples
2.4.6.2.4.6.
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.
2.4.6.1. Get Config
2.4.6.1.2.4.6.1.
Example 1
Example 1.1
Example 1Example 1
Frame to be sent to the decoder:
‘E’ ‘A’ 0 -
The decoder answers the following frame:
.1 Getting configuration of Code 39 symbology.
.1 .1
Examples
ExamplesExamples
Get Config
Get ConfigGet Config
Getting configuration of Code 39 symbology.
Getting configuration of Code 39 symbology.Getting configuration of Code 39 symbology.
in Motion
‘E’ ‘A’ 4 $01 , $05, $06, $20
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:
3rd byte : Min length = 6
th
byte Max length = $20 = 32
4
BaracodaPencil 2 – Communication Protocol v1.3 - 30 -
Page 31
Data Capture
Header
Type
Size
Command
1st
byte :
$03
Bit Option
1 0 Symbology Enabled
1 1 Min.
length
Enabled (set to 6 as defa
ult)
0 2 Checksum calculation
Disable
d
0 3 Checksum transmission Disable
d
0 4 Max. length Disable
d
0 5 -
0 6 -
0 7 -
2nd
byte :
$01
Bit Option
1 0 start
-
stop transmission
Enabled
0 1 -
0 2 -
0 3 -
0 4 -
0 5 -
0 6 -
0 7 -
for Workforce
2.4.6.2.
2.4.6.2. S
2.4.6.2.2.4.6.2.
Set Config
et Config
SS
et Configet Config
in Motion
Exa
Example
mple 2.1
ExaExa
mple mple
Frame to be sent to the decoder:
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:
2.1 Setting a configuration of Codabar symbology.
2.1 2.1
‘F’ ‘B’ 2 $03 , $01
Setting a configuration of Codabar symbology.
Setting a configuration of Codabar symbology.Setting a configuration of Codabar symbology.
BaracodaPencil 2 – Communication Protocol v1.3 - 31 -
Page 32
Data Capture
Header
Type
Size
Command
$013
Bit Option
1 0 Symbology Enabled
1 1 Min.
length
Enabled (set to 6 as defaul
t)
0 2 Checksum calculation
Disable
d
0 3 Checksum transmission Disable
d
1 4 Max. length
Enabled (set to
32 as default)
0 5 -
0 6 -
0 7 -
Header
Type
Size
Command
for Workforce
Example
Example 2.2
Example Example
Frame to be sent to the decoder:
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:
2.2 Setting a configuration of all symbologies.
2.2 2.2
‘A’ ‘B’ 1 $13
Setting a configuration of all symbologies.
Setting a configuration of all symbologies.Setting a configuration of all symbologies.
in Motion
2.4.6.3.
2.4.6.3. Usual command
2.4.6.3.2.4.6.3.
Example
Example 3.1
Example Example
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:
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).
3.1 Modifying a configuration of all symbologies.
3.1 3.1
‘A’ ‘D’ 2 ‘C’ , ‘I’
Modifying a configuration of all symbologies.
Modifying a configuration of all symbologies.Modifying a configuration of all symbologies.
Usual command
Usual commandUsual command
BaracodaPencil 2 – Communication Protocol v1.3 - 32 -
Page 33
Data Capture
Header
Type
Size
Command
for Workforce
2.4.6.4.
2.4.6.4. Special command
2.4.6.4.2.4.6.4.
Example
Example 4.1
Example Example
We now want set a larger frame of Min-Max length for Code39 symbology.
Frame to be sent to the decoder:
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.
4.1 Sending a special command to Code39 symbology.
4.1 4.1
‘E’ ‘E’ 3 ‘C’ , 2 , 40
Sending a special command to Code39 symbology.
Sending a special command to Code39 symbology.Sending a special command to Code39 symbology.
Special command
Special commandSpecial command
in Motion
BaracodaPencil 2 – Communication Protocol v1.3 - 33 -
Page 34
Header: 1 Byte
Length: 2 Bytes (MSB, LSB)
Payload: 0 to 65535 Bytes.
Command
Set Pin Code
Header
0x01 (flash only)
Length
xx xx (new pin size)
Payload
N di
gits PIN. (Defaut “0000”)
Response
0x01 00 01 01 if done
Remark
Max Pin length=16
Command
Get Pin Code
Header
0x07
Length
00 00
Payload
N digits PIN. (Défaut “0000”)
Response
0x07 {PinCode size} {Pincode}
Remark
Command
Set Name
Header
0x02 (flash only)
Length
xx xx
Payload
(new name size)
Response
New name 0x02 00 01 01 if done
Remark
(Names up to 248 Bytes)
Command
Get Name
Header
0x08
Length
00 00
Payload
Response
0x08 {name size} {name}
Remark
Name size: 2 Bytes MSB, LSB Names up to 248 Bytes
Command
Set Mode
Header
0x03 (flash only)
Length
00 01
Payload
0x01 if MASTER, 0x00 if SLAVE
Response
0x03 00 01 01 if done
APPENDIX 1
APPENDIX 1: Bluetooth Protocol
APPENDIX 1APPENDIX 1
The configuration frames are as follows:
The configuration frames are as follows:
The configuration frames are as follows:The configuration frames are as follows:
Commands
Commands
CommandsCommands
0x01 00 01 00 if not
: Bluetooth Protocol
: Bluetooth Protocol: Bluetooth Protocol
Data Capture
for Workforce
in Motion
0x02 00 01 00 if not
0x03 00 01 00 if not
BaracodaPencil 2 – Communication Protocol v1.3 - 34 -
Page 35
Data Capture
Command
Set Mode
Header
0x03 (flash only)
Length
00 02
Payload
0x01 if MASTER, 0x00 if SLAVE, [Role switch]
Response
0x03 00 01 01 if done
Command
Get Mode
Header
0x04
Length
00 00
Payload
Response
0x04 00 02 {Mode (1byte) | Switch role (1byte)}
Remark
0x01 if MASTER, 0x00 if SLAVE
Command
Set Remote BDA (Used by Master Mode of the SM)
Header
0x05
Length
00 06
Payload
BDA(ex:0x00,0x02,0xC3,0x21, 0xDE,0xFA)
Response
0x05 00 01 01 if done
Remark
If The SM is set
to Master (using Set MODE command), the SM use
Command
Get Remote BDA
Header
0x06
Length
00 00
Payload
Response
0x06 00 06 {6 bytes of BDA}
Remark
for Workforce
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.
in Motion
0x01 if want automatic switch role, 0x00 otherwise
0x05 00 01 00 if not
this Address to connect to.
BaracodaPencil 2 – Communication Protocol v1.3 - 35 -
Page 36
Data Capture
Command
Get Bluetooth Version
Header
0x76
Length
00 00
Payload
R
esponse
0x76, x, x, {version string }
Command
Restore Factory Settings
Header
Length
Payload
('R', 's', 't')
Response
Command
Get inquiry scan timeout
Header
0x27
Length
00 00
Payload
Response
0x27 00 04 [Inquiry Interval (MSB) | Inquiry
Interval (LSB) | Inquiry
Remark
Inquiry Interval and Inquiry Window are in number of Bluetooth
Command
Set inquiry scan timeout
Header
0x26
Length
00 04
Payload
Inquiry Interval (MSB) |
Inquiry Interval (LSB) | Inquiry Window
Response
0x26 00 01 01 if done
Remarks
Inquiry Scan TimeOuts are used by the Module to answer to
Here is how these values change the consumption of the Module:
Window
Window
Page Scan and Inquiry Scan Interval
BaracodaPencil 2 – Communication Protocol v1.3 - 37 -
Page 38
Data Capture
Command
Set sniff
Header
0x09
Length
00 04
Payload
[MSB of MinSniff interval, LSB of MinSniff interval,
Response
0x09 00 01 01 if done
Remark
Command
Set sniff (advanced)
Header
0x09
Length
00 08
Payload
[MSB of MinSniff interval, LSB of MinSniff interval,
Response
0x09 00 01 01 if done
Remark
Command
Get Sniff
Header
0x10
Length
00 00
Payload
Response
0x10 00 08 [MSB of MinSniff interval, LSB of MinSniff interval, MSB
Remark
When setting only MinSniff and MaxSniff values, the default value
for Workforce
MSB of MaxSniff interval, LSB of MaxSnif interval]
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]
in Motion
0x09 00 01 00 if not
of MaxSniff interval, LSB of MaxSnif interval, Sniff Attempts MSB,
Sniff attempts LSB, Sniff timeout MSB, Sniff timeout LSB]
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 -
Page 39
Data Capture
Command
Get link timeout
Header
0x18
Length
00 00
Payload
Respons
e 0x18 00 02 [MSB of link Tmo, LSB of link Tmo]
Remark
Command
Set link timeout
Header
0x19
Length
00 02
Payload
[MSB of link Tmo, LSB of link Tmo]
Response
0x19 00 01 01 if done
Remark
The link Time Out is a multiple of 625µsec (625µs = 1 Bluetoo
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.
in Motion
For further details on Sniff values, see the Bluetooth spec 1.1, chapter 10.8.2
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 -
Page 40
Data Capture
Command
Get Security Mode
Header
0x20
Length
00 00
Payload
Response
0x20 00 01 01 if
secured
Remark
Command
Set Security Mode
Header
0x21
Length
00 {size}
Payload
{00 non secured, 01 secured} {PIN CODE
Response
0x21 00 01 01 if done,
Remark
Size=PINCODE size + 1
Command
Get Bluetooth class device
Header
0x30
Length
00 00
Payload
Response
0x30 00 04 [Class of device]
Remark
See the Bluetooth specification for more details
Command
Set Bluetooth class
device
Header
0x31
Length
00 04
Payload
[Class of Device (4 bytes, MSB
-
>LSB)] (default 0x500)
Response
0x31 00 01 01 if done
for Workforce
0x20 00 01 00 if non secured
(default 01)
in Motion
0x21 00 01 00 if not
For example : 0x21 00 05 00 30 30 30 30 to disable security
0x31 00 01 00 if not
BaracodaPencil 2 – Communication Protocol v1.3 - 40 -
Page 41
Peripheral
0x000500 (default)
Undefined
0x001F00
Phone
0x502204
Computer
0x120104
PDA 0x100114
Access Point
0x120320
Command
Set Remote rfcomm channel
Header
0x36
Length
00 01
Payload
[channel (1byte)]
Response
0x36 00 01 01 if done
Remark
Command
Get Remote rfcomm channel
Header
0x37
Length
00 00
Payload
Response
0x37 00 01 [channel]
Remark
Command
Set Target Service UUID
Header
0x38
Length
00 02
Payload
[UUID (2 Bytes)]
Response
0x38 00 01 01 if d
one
Remark
Try to connect to this remote service.
Command
Get Target Service UUID
Header
0x39
Length
00 00
Typical Bluetooth class of device:
Data Capture
for Workforce
in Motion
0x36 00 01 00 if not
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.
(default 0x1101)
0x38 00 01 00 if not
BaracodaPencil 2 – Communication Protocol v1.3 - 41 -
Page 42
Payload
Response
0x39 00 02 [UUID]
Remark
Try to connect to this remote service.
SPP 0x1
101
DUN
0x1103
FAX 0x1102
Command
Get Encryption Mode
Header
0x40
Length
00 00
Payload
Response
0x40 00 01 [encryption]
Remark
Command
Set Encryption Mode
Header
0x41 ( flash only)
Length
00 01
Payload
[Encryption (1 byte)]
Response
0x41 00 01 01 if done
Remark
Argument is: 0x01 to enable encryption, 0x00 to disable.
Command
Get local Bluetooth Address
Header
0x43
Length
00 00
Payload
Response
0x43 00 06 {6 B
ytes (BD_address MSB, ..., LSB)}
Remark
Here are some service UUID:
You can get more UUIDs by reading the Bluetooth spec.
Data Capture
for Workforce
in Motion
0x41 00 01 00 if not
BaracodaPencil 2 – Communication Protocol v1.3 - 42 -
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.