Baracoda Pencil 2 User Manual

Page 1
Data Capture for Workforce
Communication Protocol
BaracodaPencil 2
©Baracoda TM – January 2009
in Motion
Page 2
SUMMARY
SUMMARY
SUMMARYSUMMARY
Data Capture
for Workforce
in Motion
SUMMARY ................................................................... 2
REVISION HISTORY .......................................................... 3
1.
INTRODUCTION ........................................................ 4
1.1. G
1.2. G
2.
2.1. B
2.1.1. C
2.2. S
2.2.1. E
2.2.2. D
2.3. H
2.3.1. C
2.3.2. S
2.3.3. U
2.3.4. M
2.3.5. C
2.4. D
2.4.1.
2.4.2. H
2.4.3. T
2.4.4. S
2.4.5. C
2.4.6. E E
XAMPLE
E
XAMPLE
E
XAMPLE
E
XAMPLE
E
XAMPLE
ENERALITIES ENERIC PACKET
COMMUNICATION PROTOCOL .............................................. 5
IDIRECTIONAL PACKETS
ONTROL MESSAGES
CANNER TO HOST MESSAGES
NCAPSULATION SCHEME ATA STRING FORMAT
OST TO SCANNER MESSAGES
OMMUNICATION MESSAGES CANNER MESSAGES SER INTERFACE MESSAGES ISCELLANEOUS MESSAGES APTURE MESSAGES
ECODER COMMUNICATION PROTOCOL
FRAME FORMAT
EADER YPE IZE OMMAND XAMPLES
1.1 – G
2.1 – S
2.2 – S
3.1 – M
4.1 – S
.......................................................... 4
........................................................ 4
................................................... 5
.............................................. 5
................................................ 6
........................................... 6
............................................ 6
................................................ 7
......................................... 7
.............................................. 9
....................................... 11
........................................ 14
............................................. 18
.......................................... 21
................................................ 21
..................................................... 21
....................................................... 22
....................................................... 22
.................................................... 22
................................................... 30
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 -
Page 7
Data Capture
Code ID
0x40
-
0x41
Description
Get Comm unicati o n Descri p t or
Payload
None
Response
2 bytes:
Code ID
0x42
-
0x43
Description
Get Retr a nsmissi o n Paramet ers
Payload
None
Response
2 bytes:
Code ID
0x44
-
0x45
Description
Set Ret r a nsmissi o n Paramet ers
Payload
2 bytes:
Response
1 b
yte:
Code ID
0x46
-
0x47
Description
Get Ca p t u re Fram e Format
Payload
None
Response
1 byte
Code ID
0x48
-
0x49
Description
Set Capt u re Frame Format
Payload
1 byte
Response
1 byte:
for Workforce
2.3.
2.3. Host to scanner
2.3.2.3.
2.3.1.
2.3.1. Communication messages
2.3.1.2.3.1.
{Wireless link: (Bit 0: Bluetooth)} {Wired link: (Bit 0: Serial Dock)}
{Max number of retransmission, 1 to 0xFE, 0xFF = infinity} {Delay between transmission, 1 to 0xFF, in tenth of seconds}
Host to scanner messages
Host to scannerHost to scanner
Communication messages
Communication messagesCommunication messages
messages
messagesmessages
in Motion
{Max number of retransmissions, 1 to 0xFE, 0xFF = infinity} {Delay between transmissions, 1 to 0xFF, in tenth of seconds}
{(Bit 0: Success)}
{0 = Baracoda, 1 = Baracoda + ACK, 2 = Raw}
{0 = Baracoda, 1 = Baracoda + ACK, 2 = Raw}
{Bit0: Success}
BaracodaPencil 2 – Communication Protocol v1.3 - 7 -
Page 8
Data Capture
Code ID
0x50
-
0x51
Description
Lock/Unl o c k Sca n e ngine
Payload
1 byte :
Response
1 byte : {Bit 0 : Success}
Code ID
0x52
-
0x53
Description
Disable B a rcode P rogramm i ng F
unc tional i t y
Payload
1 byte :
Response
1 byte : {Bit 0 : Success}
Code ID
0x56
-
0x57
Description
Get/Set I n charge behavior
Payload
Get : None
Response
Get : 1 byte :
Remarks
When scanner in charge, the shutdown timers can be modified
Code I
D 0x5A
-
0x5B
Description
Get/Set m aster m o de
Payload
Get : None
Response
Get : 1 byte :
Cod
e ID 0x5E
-
0x5F
Description
Bluetoot h Comma n ds
Payload
{Code ID} “Parameters”
Response
If the device responds: {Code ID} “Response”
for Workforce
{0 = Unlock, 1 = Lock}
{1 = Disable barcode programming functionality, 0 = Enable}
in Motion
Set : 1 byte :
{shutdown timeout (0 = leave current timeouts (default), 255 = infinity)}
{shutdown timeout (0 = leave current timeouts (default), 255 = infinity)}
Set : 1 byte :
{Bit 0 : Success}
Set : 1-2 byte(s) :
{1 : enable, 0 : disable} [OPTIONAL]{1 : disconnect the scanner if connected}
{1 : enabled 0 : disabled}
Set : 1 byte :
{Bit 0 : Success}
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 -
Page 9
Data Capture
Code ID
0x60
-
0x61
Description
Get Sca n n er Stat u s
Payload
None
Response
2 bytes:
Code ID
0x62
-
0x63
Description
Get Ope r a t ing Mo d e
Payload
None
Response
1 byte:
Remarks
“limited” means barcode buffer = 0 when in real time, no data loss mode and
Code ID
0x64
-
0x65
Description
Set Oper a ting Mo d e
Payload
1 byt
e:
Response
1 byte:
Remarks
Batch mode is not available for D
-
Fly scanner
Code ID
0x66
-
0x67
Description
Get Shut d own Tim e rs
Payload
None
Response
2 bytes:
Code ID
0x68
-
0x69
Description
Set Shut d own Tim e rs
Payload
2 bytes:
for Workforce
2.3.2.
2.3.2. Scanner messages
2.3.2.2.3.2.
Scanner messages
Scanner messagesScanner messages
{(Bit 7: Upgrading) (Bit 1: Docked) (Bit 0: Charging)}
{Battery level, 0 to 100}
{Bit 0 = 0:real time, Bit 0 = 1: batch}
{(Bit 7: limited)}
in Motion
disconnected
{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”
{Bit 0: Success}
{Number of minutes before shutdown when connected, 1 to 0xFE,
0xFF = infinity}
{Number of minutes before shutdown when disconnected, 1 to 0xFE,
0xFF = infinity}
{Number of minutes before shutdown when connected, 1 to 0xFE,
0xFF = infinity}
BaracodaPencil 2 – Communication Protocol v1.3 - 9 -
Page 10
Data Capture
{Number of minutes before shutdown when disconnect
ed, 1 to 0xFE,
Response
1 byte:
Code ID
0x6A
-
0x6B
Description
Get RTC t ime
Payload
None
Response
6 bytes:
Code ID
0x6C
-
0x6D
Description
Set RTC t i me
Payload
6 bytes:
Response
1 byte:
Code ID
0x74
-
0x75
Description
Restore de faults se ttings
Payload
None
Response
1 byte:
Remarks
External Flash memory is also erased
Code ID
0x76
-
0x77
Description
Get Pro d uct Ver si on
Payload
None
Response
x bytes :
Code ID
0x78
-
0x79
Description
Get Swit c hing O n D e lay
Payload
None
Response
1 byte :
Code ID
0x7A
-
0x7B
Description
Set Switc hing On D elay
Payload
1 byte :
Response
1 byte :
for Workforce
0xFF = infinity}
{Bit 0: Success}
{YY}{MM}{DD}{HH}{MM}{SS}
{YY}{MM}{DD}{HH}{MM}{SS}
in Motion
{Bit 0: Success}
{Bit 0: Success}
«BaracodaPencil2…»
{1 = 0 second, 2 = 1 second, 3 = 2 seconds}
{1 = 0 second, 2 = 1 second, 3 = 2 seconds}
{Bit 0 :Success}
BaracodaPencil 2 – Communication Protocol v1.3 - 10 -
Page 11
Data Capture
Code ID
0x80
-
0x81
Description
Get MMI D e script o r
Payload
None
Response
2 bytes:
Code ID
0x82
-
0x83
Description
Get MMI M ode
Payload
None
Response
1 byte:
Code ID
0x84
-
0x85
Description
Set MMI Mode
Payload
1 by
te:
Response
1 byte: {(Bit 0: Success)}
Code ID
0x86
-
0x87
Description
Get MMI S ignal ( U
ser int e rface)
Payload
1 byte:
Response
(1 + 3n) bytes:
Code ID
0x88
-
0x89
Description
Set MMI S i gnal
Payload
(2 + 3n) bytes
for Workforce
2.3.3.
2.3.3. User Interface messages
2.3.3.2.3.3.
User Interface messages
User Interface messagesUser Interface messages
{(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)}
in Motion
{(Bit 1: Buzzer Enabled) (Bit 0: LEDs enabled)}
{(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)}
{Signal number, 0 - 3}
{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}
BaracodaPencil 2 – Communication Protocol v1.3 - 11 -
{Signal number, 0 - 3}
{Number of steps, 0 - 4}
Page 12
Data Capture
For each step:
Response
1 byte: {(Bit 0: Success)}
Code ID
0x8A
-
0x8B
Description
Play
Signal
Payload
2 bytes:
Response
1 byte: {(Bit 0: Success)}
Code ID
0x8C
-
0x8D
Description
Stop Si g n al
Payload
1 byte:
Response
1 byte:
Code ID
0x92
-
0x93
Description
Get Beep s mode
Payload
Response
1 byte:
Code ID
0x94
-
0x95
Description
Set Bee p s m ode
Payload
1 byte:
for Workforce
{(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}
{Signal number, 0 - 3}
{Number of loops, 0 – 0xFE, 0xFF = infinity}
in Motion
{Signal number, 0 – 3}
{(Bit 0: Success)}
The list of MMI signals is: IHM_SIGNAL_CAPTURE_READ : 0 IHM_SIGNAL_CAPTURE_ACK : 1 IHM_SIGNAL_CAPTURE_NAK : 2 IHM_SIGNAL_CAPTURE_LOST : 3
{(Bit 0: Beep level 0=low, 1=high)
(Bit 1: Read beep)
(Bit 2: ACK beep)}
BaracodaPencil 2 – Communication Protocol v1.3 - 12 -
{(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)}}
Page 13
Response
1 byte:
{(Bit 0: Success)}
Data Capture
for Workforce
in Motion
BaracodaPencil 2 – Communication Protocol v1.3 - 13 -
Page 14
Data Capture
Code ID
0xC2
-
0xC3
Description
Get/Set D ataPrefi x
Payload
Get : None
Response
Get : 1
-
33 bytes:
Code ID
0xC4
-
0xC5
Description
Get/Set D ataSuff i x
Payload
Get : None
Response
Get : 1
-
33 bytes:
Code ID
0xC6
-
0xC7
Description
Get/Set D ata Form a t 2
Payload
Get : None
Response
Get : 1 byte:
for Workforce
2.3.4.
2.3.4. Miscellaneous messages
2.3.4.2.3.4.
Set : 1-33 bytes:
Set : 1 byte:
Miscellaneous messages
Miscellaneous messagesMiscellaneous messages
{ DataPrefix length} “DataPrefix String”
{ DataPrefix length} “DataPrefix String”
{Success?}
in Motion
Set : 1-33 bytes:
{ DataSuffix length} “DataSuffix String”
{ DataSuffix length} “DataSuffix String”
Set : 1 byte:
{Success?}
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)
BaracodaPencil 2 – Communication Protocol v1.3 - 14 -
{(Bit 1: DataPrefix) (Bit 0: DataSuffix)}
Set : 1 byte:
{(Bit 0:Success)}
Page 15
Data Capture
Code ID
0xC8
-
0xC9
Description
Get / Se t B arcode l ength
Payload
Get : None
Response
Get : 2 bytes
Code ID
0xCA
-
0xCB
Desc
ription
Get and e rase st o r ed barc od es wit h no data loss m o d e
Payload
None
Response
1 byte
Code ID
0xCC
-
0xCD
Description
Res
et mode s
Payload
None = restore defaults, keep link keys, reboot scanner
Response
1 byte
Code ID
0xCE
-
0xCF
Description
Batch u p l o ad comm ands
Payload
{Code ID} “Parameters” (cf. below)
Respo
nse {Code ID} “Response”
Code ID
0
Description
Launch upload process (typically used only for the upload barcode)
Payload
1 byte:
Response
1 byte:
Code ID
1
Description
Ready to start upload
(Scanner to host message)
Payload
3 bytes :
for Workforce
Set : 2 bytes
{authorized barcode length. 0 = disabled}
{authorized barcode length. 0 = disabled}
Set : 1 byte
{(Bit 0:Success)}
in Motion
{(Bit 0:Success)}
1byte :
0 = restore defaults, keep link keys, reboot scanner
1 = switch off scanner (no restoring defaults)
2 = reboot scanner (no restoring defaults)
{(Bit 0:Success)}
The UPLOAD Code IDs are:
{0 mandatory}
{Bit 0: Success}
{0 mandatory}
BaracodaPencil 2 – Communication Protocol v1.3 - 15 -
Page 16
Data Capture
{ number of elements to be uploaded MSB }
Response
None
Code ID
2
Description
Start uploading barcodes
Payload
1 byte:
Response
1 byte:
Code ID
3
Description
RESERVED
Payload
N/A
Response
N/A
Code ID
4
Description
Set upload status and end process
Payload
2 bytes :
Response
1 byte:
Code ID
0xD2
-
0xD3
Description
Get/Set A nt i dupl i c ate sc a n s
Payload
Get : None
Response
Get : 1 byte
Comments
The comparison will be made over the 32
first characters of the barcodes only.
Code ID
0xD4
-
0xD5
Description
Restore l a st batc h
Payload
None
for Workforce
{ number of elements to be uploaded LSB }
{0 mandatory}
{Bit 0: Success}
in Motion
{0 mandatory}
{1 : upload successful, data can be erased from the scanner
0 : upload failed, do not erase data}
{Bit 0: Success}
Set : 1 byte
{0 = disabled
1 = no consecutive duplicate scans + error signal
2 = no consecutive duplicate scans + no decoding}
{0 = disabled
1 = no consecutive duplicate scans + error signal
2 = no consecutive duplicate scans + no decoding }
Set : 1 byte
{(Bit 0:Success)}
or 1 byte (optional):
BaracodaPencil 2 – Communication Protocol v1.3 - 16 -
Page 17
Data Capture
{1 = upload data after retrieving}
Response
1 byte:
Comments
This is only available if no new scan has
been made.
Code ID
0xD8
-
0xD9
Description
Enable r e m ote tri g ger
Payload
None : use default 5s timeout
Response
1 byte
for Workforce
{(Bit 0:Success)}
1 byte : {timeout (s)}
{(Bit 0:Success)}
in Motion
BaracodaPencil 2 – Communication Protocol v1.3 - 17 -
Page 18
Data Capture
Code ID
0xE0
-
0xE1
Description
Get
Capture
Versio n
Payload
None
Respon
se “Capture Version String” or {0} if not applicable
Code ID
0xE2
-
0xE3
Description
Get Mod e
Payload
None
Response
1 byte:
Code ID
0xE4
-
0xE5
Description
Set Mode
Payload
1 byte OR
Response
1 byte:
Code ID
0xE6
-
0xE7
Description
Get Dat a Format
Payload
None
Response
1 byte:
Code ID
0xE8
-
0xE9
Description
Set Data F ormat
Payload
1 byte:
Response
1 byte:
Code ID
0xEA
-
0xEB
Description
Get
Capture
Prefix
Payload
None
Response
1-
33 bytes:
for Workforce
2.3.5.
2.3.5. Capture
2.3.5.2.3.5.
Capture messages
CaptureCapture
messages
messagesmessages
{0 = trigger, , 2 = disabled}
in Motion
{0 = trigger, 2 = disabled}
{(Bit 0: Success)}
{(Bit 2:Timestamp)
(Bit 1: Capture Prefix)
(Bit 0: Capture Suffix)}
{(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) }
{(Bit 0:Success)}
{ Capture Prefix length}
BaracodaPencil 2 – Communication Protocol v1.3 - 18 -
Page 19
Data Capture
“Capture Prefix String”
Code ID
0xEC
-
0xED
Description
Set
Capture
Prefix
Paylo
ad 1-33 bytes:
Response
1 byte:
Code ID
0xEE
-
0xEF
Description
Get
Capture
Suffix
Payload
None
Response
1-
33 bytes:
Code ID
0xF0
-
0xF1
Description
Set
Capture
Suffix
Payload
1-
33 bytes:
Response
1 byte:
Code ID
0xF4
-
0xF5
Description
Set Tim e s tamp
Payload
6 bytes:
Response
1 byte:
Remark
This feature is not available in the D
-
Fly Product
Code ID
0xF6
-
0xF7
Description
Set AI M S ym bolog y I dentifi e r transm i ssion
Payload
1 byte:
Response
1 byte:
Code ID
0xF8
-
0xF9
Description
G
et sto r e d barco d e s count
Payload
None
Response
2 bytes:
for Workforce
{ Capture Prefix length}
“Capture Prefix String”
{(Bit 0:Success)}
{ Capture Suffix length}
“Capture Suffix String”
in Motion
{ Capture Suffix length}
“Capture Suffix String”
{(Bit 0:Success)}
{YY}{MM}{DD}{HH}{MM}{SS}
{Bit 0: Success}
{0 : disabled, 1 : enabled}
{Bit 0: Success}
BaracodaPencil 2 – Communication Protocol v1.3 - 19 -
Page 20
Data Capture
{Stored barcodes count [15:8]}
Code ID
0xFA
-
0xFB
Description
Get and e rase st o r ed barc od es
Payload
None
Response
1 byte:
Code ID
0xFC
-
0xFD
De
scription
Erase st o red barc o des
Payload
None
Response
1 byte:
Code ID
0xFE
-
0xFF
Description
Barcode decoder C ommand s
Payload
{header} {type} {size} “Parameters”
Response
If the device responds:
for Workforce
{Stored barcodes count [7:0]}
{(Bit 0:Success)}
{(Bit 0:Success)}
in Motion
{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 -
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
for Workforce
in Motion
Window (MSB) | Inquiry Window (LSB)]
slots) (1 slot = 0.625 ms)
(MSB) | Inquiry Window (LSB)] (default 0xC80, 0x18)
0x26 00 01 00 if not
Inquiries. So, if you set both values to 0, the Module will not be discoverable.
BaracodaPencil 2 – Communication Protocol v1.3 - 36 -
Page 37
Data Capture
Command
Set page scan timeout
Header
0x24
Length
00 04
Payload
[Page Interval (MSB) | Page Interval (LSB) | Page Window (MSB) |
Response
0x24 00 01 01 if done
Remark
Page Scan TimeOuts are used by the Module to answer to Connect
Command
Get page scan timeout
Header
0x25
Length
00 00
Payload
Response
0x25 00 04 [P
age Interval (MSB) | Page Interval (LSB) | Page
Remark
Page Scan Interval and Page Scan Window are in number of
Inquiry Sc
an
Page Scan
for Workforce
Page Window (LSB)] (default 0x320, 0xb0)
0x24 00 01 00 if not
Inquiries. So, if you set both values to 0, the Module will not be Connectable.
in Motion
Window (MSB) | Page Window (LSB)]
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:
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
th
for Workforce
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.
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...