OEM Barcode Scanner Supplier Manufacturer From China

1. Scope

This document describes the Totinfo decoded-data packet format, including 1D and 2D packet structures, field definitions, symbology code values, checksum calculation, configuration barcodes, decoded-output examples, and host acknowledgment requirements.

2. Data Packet Format Overview

The Packet Data Format is a structured output method in which the scanner uploads decoded data as protocol packets instead of raw decoded text. This format is recommended when the host application requires reliable, bidirectional, protocol-level integration.

FeatureEngineering Value
Checksum protectionEach packet contains a two-byte checksum to help prevent undetected data transmission errors.
Retransmission capabilityIf the scanner does not receive a host ACK within the specified timeout, it can retransmit the decoded-data packet.
SDK integrationThe Totinfo SDK can parse packet instructions internally. The host application can register a callback function to receive decoded data with minimal integration code.

3. Packet Communication Requirement

After receiving a decoded-data packet, the host must return the ACK packet within 3 seconds. If no ACK is received within this period, the scanner may treat the packet as unacknowledged and attempt retransmission.

DirectionPacketDescription
Scanner -> HostDecoded-data packetThe scanner sends the decoded barcode result using the selected packet structure.
Host -> Scanner04 D0 04 00 FF 28ACK returned by the host after successful packet reception.

4. 1D Barcode Packet Format (SSI Structure)

LengthOpcodeSourceStatusBarcode TypeDecoded DataChecksum
0xF30x00

 

Field Name

 

FormatSub-field/ValueMeaning
Length1 ByteLengthDoes not include the checksum bytes; Max value is 0xFF
Opcode1 Byte0xF3Identifies the data as a 1D barcode.
Message Source1 Byte0x000x00 identifies the source as the barcode reader.
StatusBit 0Retransmission0 = First transmission;
1 = Retransmission attempt.
Bits 1 – 7ReservedAlways set to 0.
Barcode Type1 ByteSymbology TableRefer to the Barcode Type Table.
Decoded DataDataData content does not include the two checksum bytesChecksum formatted as High Byte first, then Low Byte.

 

Checksum2 BytesData content does not include the two checksum bytesChecksum formatted as High Byte first, then Low Byte.

5. 2D Barcode Packet Format (SSI Extension Structure)

Identifier

0xFF

Opcode1Length High ByteLength Low ByteOpcode 2SourceStatusDataChecksum
0xFF0xF40xF40x00

 

Field NameFormatSub-fieldMeaning
Identifier1 ByteLength 1Fixed value: 0xFF
Opcode 11 ByteSee Table 2-1Identifies the type of data packet transmitted.
Length2 BytesPacket LengthLength 2 is 2 bytes; High Byte first, Low Byte last.
Opcode 21 ByteSee Table 2-1Same as Opcode 1.
Source1 Byte0x00: Engine

0x04: Host

Identifies the source of the information.
StatusBit 0Retransmission0 =First transmission of the data packet

1 =Subsequent transmission attempt.

Bits 4 – 7ReservedUnused bits must be set to 0
Barcode Type1 ByteSymbology TableRefer to the 2D Symbology Table.
DataVariable BytesPlease refer to the details of each section.
Checksum2 BytesData content does not include the two checksum bytesThe checksum information is formatted as High Byte followed by Low Byte

6. Symbology Code Table

SymbologyHex ValueSymbologyHex Value
Not Applicable0x00EAN 13 with 5 Supps.0x8B
Code 390x01EAN 130x0B
Codabar0x02EAN 13 with 2 Supps.0x4B
Code 128, Setup1280x03EAN 13 with 5 Supps.0x8B
Discrete 2 of 50x04MSI0x0E
IATA 2 of 50x05GS1-1280x0F
Interleaved 2 of 50x06UPC E10x10
Code 930x07UPC E1 with 2 Supps.0x50
UPC A0x08UPC E1 with 5 Supps.0x90
UPC A with 2 Supps.0x48Trioptic Code 390x15
UPC A with 5 Supps.0x88Bookland EAN0x16
UPC E00x09Coupon Code0x17
UPC E0 with 2 Supps.0x49GS1 DataBar-140x30

 

UPC E0 with 5 Supps.0x89GS1 DataBar Limited0x31
EAN 80x0AGS1 DataBar Expanded0x32
EAN 8 with 2 Supps0x4ACode110x0C
EAN 8 with 5 Supps0x8APDF4170xF0
QR0xF1Data Matrix(DM)0xF2
Aztec Code0xF3Maxi Code0xF4
Veri Code0xF5Han Xin0xF7
AIM1280xA2ISSN0xA3
PLESSEY0xA4

7. Checksum Algorithm

The checksum is calculated as the two’s complement of the byte sum over the packet content excluding the checksum bytes. The checksum is transmitted as high byte first, followed by low byte.

unsigned short _cts_checksum(unsigned char *pData, unsigned short usLen)
{
unsigned short usSum = 0;if ((pData == NULL) || (0 == usLen))
return 0;

while (usLen–)
{
usSum += (pData[usLen] & 0xFF);
}

return ((~usSum) + 1);
}

8. Output Format Setting Codes

Parameter number: 0xEE. Scan one of the following configuration barcodes to select raw decoded data output or packet decoded data output.

Configuration ItemBarcode DataParameter ValueConfiguration Barcode
Send Raw Decoded Data10406100x00Configuration Barcode1
Send Decoded Data Packet10406110x01Configuration Barcode2

9. Decoded Packet Examples

9.1 Example 1: 1D Barcode Decoded Data Packet (Codabar)

1D Barcode Decoded Data Packet (Codabar)

Decoded output:

0F F3 00 00 02 32 31 34 37 34 38 33 36 34 37 FC EE

 

Byte(s)ValueMeaning
Byte 10x0FLength = 15. The checksum bytes are excluded.
Byte 20xF3Opcode for 1D barcode decoded data.
Byte 30x00Message source: scanner.
Byte 40x00Status: first transmission.
Byte 50x02Barcode type: Codabar.
Byte 6 and later32 31 34 37 34 38 33 36 34 37Decoded data bytes, representing 2147483647.
Last 2 bytesFC EEChecksum.

Note: The host must reply with ACK 04 D0 04 00 FF 28 within 3 seconds.

9.2 Example 2: 2D Barcode Decoded Data Packet (QR Code)

2D Barcode Decoded Data Packet (QR Code)

Decoded output:

FF F4 00 12 F4 00 00 F1 32 31 34 37 34 38 33 36 34 37 FA 08

 

Byte(s)ValueMeaning
Byte 10xFFIdentifier / fixed frame header.
Byte 20xF4Opcode 1.
Bytes 3-400 12Length = 0x0012. The checksum bytes are excluded.
Byte 50xF4Opcode 2; must match Opcode 1.
Byte 60x00Message source: scanner.
Byte 70x00Status: first transmission.
Byte 80xF1Barcode type: QR Code.
Byte 9 and later32 31 34 37 34 38 33 36 34 37Decoded data bytes, representing 2147483647.
Last 2 bytesFA 08Checksum.

10. Data Packet Interaction Flow

10. Data Packet Interaction Flow

Send A Inquiry

We are delighted and grateful for your interest in our products, please use the form below to send us a message and we look forward to helping you!
Please fill in the quantity you wish to purchase so that we can provide a more accurate quote.
Fill your name and needs, such as the number of products, custom details, etc.