Protocol Details
TCP/UDP transport, Table 1 primitive data types, Table 2 12/16-byte message header, and XOR BCC checksum.
Protocol Details
5.1 Communication Method#
The communication protocol adopts TCP or UDP, with the telematics platform serving as the server side and the vehicle terminal operating as the client side.
5.2 Data Type#
See Table 1 for primitive data types used across all protocol packets:
| Data Type | Description and Requirements | Format / Value Range |
|---|---|---|
| BYTE | Unsigned single-byte integer (single byte, 8 bits) | Decimal: 0 ~ 255; Hexadecimal: 0x00 ~ 0xFF |
| WORD | Unsigned double-byte integer (double byte, 16 bits, Big-Endian) | Decimal: 0 ~ 65535; Hexadecimal: 0x0000 ~ 0xFFFF |
| DWORD | Unsigned four-byte integer (4-byte double word, 32 bits, Big-Endian) | Decimal: 0 ~ 4294967295; Hexadecimal: 0x00000000 ~ 0xFFFFFFFF |
| BYTE[n] | n-byte array | Sequential raw byte stream |
| BCD[n] | 8421 BCD code, n bytes | 2 decimal digits per byte (e.g. Phone number, IMEI, Time) |
| STRING | GBK encoded string | Variable length string; leave blank if there is no data |
5.3 Transmission Rules#
The protocol strictly uses Big-Endian network byte order for multi-byte words and double words:
Transmission rules are as follow:
5.4 Message Composition#
5.4.1 Message Structure#
Each packet consists of a delimiter identifier, message header, message payload body, and check character:
+---------------+-----------------------+--------------------+----------------+---------------+
| Identifier | Message Header | Message Body | Checksum (BCC) | Identifier |
+---------------+-----------------------+--------------------+----------------+---------------+
| 0x7E (1 B) | 12 or 16 Bytes | 0 ~ 1023 Bytes | XOR (1 B) | 0x7E (1 B) |
+---------------+-----------------------+--------------------+----------------+---------------+5.4.2 Identifier & Escaping Rules#
This document designates 0x7E as the frame delimiter. If 0x7E or 0x7D appears in the message header, body, or checksum, it must be escaped according to the following rules:
| Original Byte in Stream | Escaped Byte Sequence | Meaning |
|---|---|---|
| 0x7E | 0x7D 0x02 | Delimiter byte escaped |
| 0x7D | 0x7D 0x01 | Escape byte escaped |
The escape process is as follows:
0x7E head and tail.0x7E framing โ perform escape reduction (unescaping) โ verify check character โ parse header and body.5.4.3 Message Header#
0x30 0x7E 0x08 0x7D 0x55, the encapsulated wire packet becomes: 0x7E 0x30 0x7D 0x02 0x08 0x7D 0x01 0x55 0x7E.The content of the standard 12~16 byte message header is shown in Table 2:
| Start Byte | Field | Data Type | Description and Requirements |
|---|---|---|---|
| 0 | Message ID | WORD | Unique packet identifier (e.g. 0x0100, 0x0200, 0x8001) |
| 2 | Message Body Properties | WORD | Bit-mapped attributes: body length, encryption type, packet segmentation (See Fig. 3) |
| 4 | Terminal SN (Phone/IMEI) | BCD[6] | 6-byte BCD derived from the first 14 digits of the terminal IMEI. E.g. IMEI 123456789012347 โ 0x0B3A73CE2FF2. |
| 10 | Message Sequence Number | WORD | Cyclic counter (0~65535) incremented per sent message. Originator increments loop; responder keeps response ID consistent. |
| 12 | Message Packet Encapsulation Item | Structure | *(Optional)* Total sub-packets + packet index. Only present when bit 13 in Message Body Properties is 1. |
Bit: 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
+----+----+----+----+----+----+----+---+---+---+---+---+---+---+---+---+
| R | R | P | Data Encrypt | Message Body Length |
+----+----+----+----+----+----+----+---+---+---+---+---+---+---+---+---+Field Specifications:
0.0: Single complete packet (no encapsulation item in header).1: Long message segmented into sub-packets (header includes Table 3 encapsulation item).bit 13 = 0 (single packet). For multi-packet transfers, refer to specific sub-command specifications.000: No encryption.001: Message body encrypted with RSA algorithm.111: Super encryption (refer to Appendix 10.4).1023 bytes).| Start Byte | Field | Data Type | Description and Requirements |
|---|---|---|---|
| 0 | Total Number of Packets | WORD | The total number of packets after segmentation |
| 2 | Packet Number | WORD | Current packet sequence number (starts from 1) |
5.4.4 Check Character (Checksum)#
The check character is obtained by applying the bitwise XOR operation from the first byte of the message header to the very last byte prior to the check character:
Checksum (BCC) = Byte[0] ^ Byte[1] ^ Byte[2] ^ ... ^ Byte[N-1]The check character occupies 1 byte and is appended immediately before the ending 0x7E delimiter.