Introduction: generic packet format – Baracoda All in One Printer User Manual

Page 4

Advertising
background image

ToughRunners / ScanWear – Communication Protocol v1.2

- 4 -

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

B

a

) 1 Byte

: STX

B

b

) 1 Byte

: Frame number

B

c

) 1 Byte

: Number of commands (or number of commands responses)

B

d

) 3..n Bytes

: Command 1

B

x

) 3..n Bytes

: Command x

B

y

) 1 Byte

: CheckSum = (

=

x

b

i

i

B

) mod 256

B

z

) 1 Byte

: ETX

Each command is formatted as follows:

C

a

) 1 Byte

: Command ID

C

b

) 1 Byte

: Data length

C

c

) 0..n Bytes

: Data

(*): a limited number of frames do not follow this format. They are described in the section 2/.

Command ID

Data length

data

1 byte

1 byte

x bytes

Advertising