TT18-4G-M TCP Data Protocol_v1.2
TT18-4G-M TCP Data Protocol_v1.2
1 Data communication
After a connection is established between the device and the server, the device sends a data
message to the server. The server sends the following information to the device to change the RTC
time. It is recommended that the server set the RTC time each time when the device connects to
the server.
Set the RTC time Format:@UTC,yyyy-MM-dd HH:mm:ss#
For example:@UTC,2021-11-24 02:56:43#
*please note the time setting should be UTC +0 time,the RTC time is set first, and then the ACK
reply is set.
C# code:
_NetStream.Write(utcBytes, 0, utcBytes.Length);
After a connection is established between the device and the server,each time the machine sends a
piece of data to the server, the server must reply with an ACK message to the machine, otherwise
the machine will continue to send duplicate data。
Reply ACK Format:@ACK,Packet index (Hex converted into decimal)#
For example:@ACK,0035#
C# code:
_NetStream.Write(ackBytes, 0, ackBytes.Length);
2 Data parsing
54 5A 00 52 24 24 04 07 03 08 00 00 01 80 32 30 00 00 50 98 17 05 04 16 34 1E
00 13 01 17 05 04 16 34 32 01 57 BF 08 06 CC AE B8 00 00 00 00 00 14 01 52 04
60 00 00 1D 2F 0D 63 5F 52 00 16 00 0E 66 53 0C 46 00 0B AA 00 16 3F 01 76 4
0 CE 03 2B 01 00 2B 12 AE 0D 0A
Here below is a table which informs more detailed information about the protocol.
Number Data
Data block Meaning
of bytes Content
Tzone company identifier. This is the header of every
Start bits 2 ‘T’ ‘Z’
packet
The bytes length from the start at protocol number to the
Packet length 2 Variable
end at the CRC.
Protocol number 2 ‘$$’ Normal data
Hardware type 2 0x04 0x07 The hardware is TT18
Each byte represents a first-level version
Firmware version 4 Variable For example, 03H 08H 00H 00H indicates that the
version is 3.8.0.0
The high four bits of the first byte are ignored, and every
other 4 bits represent a character, such as 01H 80H 32H
IMEI 8 Variable
30H 00H 00H 50H 98H
Indicates that the IMEI is 180323000005098.
The time when the piece of data is packaged and ready to
be sent is in the order of year, month, day, hour, minute,
RCT time date 6 Variable and second, and 2000 is added to the year.
For example, 17H 05H 04H 16H 34H 1EH indicates that
the time is: 2023/05/04 22:52:30
Indicates the length of GPS information (unit: byte), if it
GPS data length 2 Variable
is 0000H, it means that there is no such data
bit0: latitude mark, 1=N north latitude, 0=S south
Status 1 Variable latitude; bit1: longitude mark, 1=W west longitude, 0=E
east longitude, other bits are reserved
UTC date time 6 Variable The format is the same as the RTC date time
Unit: degree, HEX format, this value/1000000 is the
longitude 4 Variable
latitude, such as 0157BF08H means 22.527752
Unit: degree, HEX format, this value/1000000 is the
latitude 4 Variable
longitude, such as 06CCAEB8H means 114.077368
angle 2 Variable Unit: degree, reserved
speed 2 Variable Unit: 0.1Knots, reserved
GSM LBS’s data length excludes LBS data length part. If
LBS data length 2 Variable
the value is 0, there is no LBS data.
The number of The number of LSB base stations included in this
1 Variable
LBS package data
Single LBS base station information length and base
station information indication, bit7-5 indicates the base
Signal LBS station type, where 000H-2G base station, 010H-NB base
1 Variable
information station, 100H-CATM1 base station, 110H-LTE base
station; bit4-0 indicates the base station information
length;
Mobile Country Code, ignore the first digital, only 3
MCC 2 Variable
digital, 04 60 means that MCC is 460.
Mobile Network Code, 2 or 3 digital, if the first digital is
MNC 2 Variable 8 , MNC is 3 digital. If the first digital is 0, MNC is 2
digital. 87 56 means that MNC is 756. 00 56 means 56.
location area code, hex code
LAC 2 Variable
0x27 0x56 means LAC is 10070
Cell identification code, 4 byte, hex code,
i.e. 01H23H45H67H means CELL ID is 19088743;