ZhongXun Topin Locator Communication Protocol-180612
ZhongXun Topin Locator Communication Protocol-180612
ZhongXun Topin Locator Communication Protocol-180612
Introduction
1. This document mainly describes the relevant functional protocols between the locator and the
server, as well as their data formats and content.
2. This protocol only applies to the communication between the locator and the server. The
current version corresponds to the time of May 2017. If there is any modification later, the
document will be adjusted accordingly.
3. All communication data formats are 0x780x78 + data length + protocol number + data content
+ 0x0d0x0a, and the data length value is the sum of the byte count of the data content and the
byte number of the protocol number. A few special rules that are not of this rule are described in
the details of the agreement.
4. All communication data is transmitted through tcpip protocol, the server address is ______
port is ______
5. There is a part of the protocol data transmission is two-way, that is, the data is initiated by the
device or one of the servers, the receiving party to reply to a response data of the corresponding
protocol. Some of the agreements are one-way, that is, after the device or server is sent out, the
receiving party does not need to reply data. Unless otherwise specified, the protocol data is all
one-way, ie the party receiving the data does not need to reply data.
6. The sample data is all hexadecimal
Details
0x01 Login
Start 2Byte, packet content length 1Byte, protocol number 1Byte, status 1Byte, stop bit 2Byte
7878 02 05 xx 0D0A
01. Supervisory number dialing device number The device automatically answers Pickup effect
02. Supervisory Number Dialing Device Number Automatically Answering Two-way Calls
03. Regulatory phone number to dial the device number Ring manually answer the two-way call
In the example, the state heading is 3460 and is converted to binary as 0011 0100 0110 0000,
indicating that the GPS is in the positioning state, east longitude, north latitude, and heading is
96°.
Server reply:
Start bit 2byte Packet length 1byte Protocol number 1byte Date time 6byte Stop bit 2byte
Eg.7878 00 10 0A03170F3217 0D0A
Server reply:
Start bit 2byte Packet length 1byte Protocol number 1byte Date time 6byte Stop bit 2byte
Eg.7878 00 11 0A03170F3217 0D0A
Bidirectional instructions
The device sends an instruction to the server after receiving an SMS reply to the factory setting
instruction
Start bit 2byte Packet length 1byte Protocol number 1byte End bit 2byte
Eg.7878 01 15 0D0A
Server sends to device
Start bit 2byte Packet length 1byte Protocol number 1byte End bit 2byte
Eg.7878 01 15 0D0A
30 seconds after the device receives the instruction, restore the factory settings
The server receives the data also needs to reply the protocol number plus time
Start bit 2byte Packet length 1byte Protocol number 1byte Time 6byte End bit 2byte
7878 00 17 170622123031 0d0a
Bidirectional instructions
Device sent to server request time synchronization
Start bit 2byte Packet length 1byte Protocol number 1byte End bit 2byte
Eg.7878 01 30 0D0A
GMT time after server receives
Start Bit 2byte Packet Length 1byte Protocol Number 1byte Date Time 6byte End Bit 2byte
Eg.7878 07 30 07E00705053718 0D0A
The time is in hexadecimal, 07E00705053718 converts to 5:55:24 on July 5, 2016
0x34 Server Sends GPS LBS Switch to Terminal Computer Upload Data Switching Time
Start 2Byte, Packet Length 1Byte, Protocol Number 1Byte, gps 1Byte + data 5Byte + lbs 1Byte +
on3Byte + off 3Byte, Stop Bits 2Byte
7878 0E 34 01 0108001200 01 010700 012200 0D0A 01 = Off ; 00 = ON (ON can be uploaded with
base station positioning)
Gps 01=on
Data 00 = off not set off 0800:08:00 1200 = 12:00
Lbs 01=on
On 01 = setting boot 0700 = 07:00
Off 01 = set off 2200 = 22:00
0x41SOS number
Server sent to device
Start bit 2byte Packet length 1byte Protocol number 1byte Number End bit 2byte
Eg.7878 07 41 3133353333333333333333 0D0A
The number is in ASCII encoding, 3133353333333333333333 is 13533333333 after conversion
Dial the sos phone and send the device to the server
7878 02 41 01 0d0a
0x49 device
Bidirectional instructions
The device sends to the server, requesting data settings, including device switches, alarm clocks,
phone numbers,
Start bit 2byte Packet length 1byte Protocol number 1byte End bit 2byte
Eg.7878 01 57 0D0A
Server sends data to device settings
Start bit 2byte Packet length 1byte Protocol number 1byte Upload interval 2byte Switch 1byte
Alarm 9byte Do not disturb Time switch 1byte Do not disturb time 9byte GPS timer switch 1byte
GPS timing time 4byte SOS father and mother 3 numbers (indefinite length, 3B(";") Delimiter bit
2byte
Eg. 7878 1F 57 0060 01 000000 000000 000000 00 000000000000000000 00 00000000
3B3B3B0D0A
Upload interval: BCD code, 0060, this is 60 seconds
Switch: Each bit represents a switch, as shown in the following table
7 6 5 4 3 2 1 0
N/a N/a sensor light Bluetooth vibration step GPS
switch sense alarm
The first one is GPS open switch
The fourth place is the light switch, synchronization 0x61 setting
Alarm clock: 9byte. If no alarm is set, it is 0. If yes, it is in the format set by alarm clock 0x50.
Do not disturb the time switch 1byte, do not disturb the time setting is the same as the 0x47
protocol format
GPS time switch: synchronization 0x46 settings
SOS Mom and Dad 3 numbers: All are ASCII codes, number is 0x41 0x42 0x43 These three
protocol numbers
Bidirectional instructions
The device is sent to the server
Start bit 2byte Packet length 1byte Protocol number 1byte End bit 2byte
Eg.7878 01 58 0D0A
After the server receives the reply, the device whitelist is returned. The maximum number of
whitelists is 50.
Start bit 2byte Packet length 1byte Protocol number 1byte White list (indefinite length) End bit
2byte
Eg.7878 01 58 646473 3A 3138383338303231303133 3B 63 3A 3138353338303035343032 3B
0D0A
The delimiter for name and number is 3A(":"), and the direct delimiter for each set of whitelist is
3B(";")
There are two sets of white lists in the above example, using the utf8 encoding: name
646473=dds number 3138383338303231303133=18838021013, name 63=c number
3138353338303035343032=18538005402
The server writes the data part to the .amr file according to the index of each package.
If data is received incorrectly, it can be sent
7878 02 65 00 0D0A
Resend
If one or two of the received packets are missing, the request packet is sent separately. For
example, a total of 10 packages, less the seventh, send:
Start bit 2byte Total packet number 1byte Current package index 1byte Data length 2byte
6868 10 07 0200
The server sends a request to the terminal to update the positioning information
Instant Update WIFI / GPS / LBS 7878 01 80 0D0A
Instant Update WIFI / LBS 7878 02 80 0D0A
Eg.7878 01 80 0D0A
After the device receives the device, it starts positioning and uploads the latest positioning data
within 1 minute. If GPS can be located within 1 minute, the positioning data is 0x10 protocol
data. If it is WIFI+LBS data, 0x69 protocol data is returned.
The reason that the device sent to the server and the device sent to the server without uploading
Start bit 2byte Packet length 1byte Protocol number 1byte Cause 1byte stop bit 2byte
7878 02 80 xx 0d0a
01-Incorrect time
02lbs less
03 wifi less
04lbs search more than 3 times
05 same lbs and wifi data
06 prohibit lbs upload, and there is no wifi
07gps spacing is less than 50 meters
Bidirectional instructions
Server sends to device
Start bit 2byte Packet length 1byte Protocol number 1byte Overspeed 1byte End bit 2byte
Eg.7878 02 86 50 0D0A
Speeding speed: 50 km/h
When the speed exceeds the set value 50km/h, the device sends to the server:
Start bit 2byte Packet length 1byte Protocol number 1byte Overspeed 1byte End bit 2byte
Eg.7878 02 86 50 0D0A
0x98 The device sets the upload interval via SMS and synchronizes with the server
Bidirectional instructions
The device is sent to the server
Start bit 2byte Packet length 1byte Protocol number 1byte Upload interval 2byte Endbit 2byte
Eg.7878 03 98 0050 0D0A
After the SMS is set, the device sends this command to the server
Server reply
Start bit 2byte Packet length 1byte Protocol number 1byte Upload interval 2byte Endbit 2byte
Eg.7878 03 98 0050 0D0A
The server responds to the data, and the device returns a text message after receiving it. The
notification setting is successful.