Jimi
Jimi
V2.0
(SEEWORLD)
1. Communication Protocol ..........................................................................................................................1
5. Detailed explanation of the terminal sending data packets to the server ................................................ 7
5.2. Positioning data packet (GPS, LBS combined information packet: 0x12) ............. 9
5.2.2. The terminal sends the mileage positioning data packet ............................................... 12
5.2.3. Server reply ......................................................................................................................13
5.3. Positioning data packet ( add ACC, data reporting mode: 0x22 ) ................................. 14
5.8. The terminal sends the IMSI number to the server (0x90) .....................................31
5.9. The terminal sends the ICCID number to the server (0x94) ...................................32
7. Attached is the AAU CRC-ITU table lookup algorithm CC language code snippet ...................................39
1. Communication Protocol
Introduction
This document defines the description of the application layer interface protocol
for the vehicle GPS locator and positioning service platform. This interface protocol
is only applicable to the interactive communication between the server platform and the
positioning terminal.
Terms,
English meaning Chinese meaning
abbreviations
1
Identity Identity
2
三、Basic rules
1. GPRS connection is established successfully and send the first landing
information packet to the server, the server response packet is received within 5
seconds that the connection is normal, start to send positioning information (GPS, LBS
information packet), 3 minutes later will send status information packet, regular
2. When the GPRS connection is not established successfully, the terminal can not
send the landing information packet. When the GPRS connection fails for 3 times, the
terminal starts the timed restart function, and the time is 20 minutes. Within 20
minutes, if the terminal and the server successfully establish a connection, and
receive the server to the terminal sent by the landing information packet to respond to
the data packet, then the timing restart function is closed, the terminal does not
3. The server needs to return the response data packet to the terminal after
receiving the landing information packet sent by the terminal. If the terminal sends
the landing information packet or the status information packet, after more than 5
seconds, the server does not receive the return packet, it is considered that the
current connection is abnormal, start the GPS positioning data retransmission function,
disconnect the current GPRS connection, Re-establish a new GPRS connection and send the
3
information packet can not receive the server response data packet, the terminal starts
the timing restart function, the timing time is 10 minutes, in 10 minutes if the
terminal and the server successfully establish a connection and receive the server
response data packet then the timing restart function is closed, The terminal does not
changed, the terminal regularly sends the GPS and LBS combined information package to
the server, and the server can set the default sending protocol through the command;
6. In order to ensure the validity of the connection, the heartbeat packet is sent
to the server at a fixed time interval, and the server returns the response packet for
confirmation;
7. For terminals without registered IMEI number, please reply the login request and
heartbeat packet response, do not disconnect directly. (If you disconnect directly or
do not reply, it will lead to continuous reconnection of the terminal, and GPRS traffic
consumption is serious).
4
Data flow chart
5
四、Data packet format
Format Length(Byte)
start bit 2
packet length 1
Agreement number 1
information content N
Information serial number 2
error check 2
stop bit 2
check, a total of (5+N) bytes, because the information content is a variable length
field.
6
instructions)
Alarm information 0x16
Query Address Information (GPS) 0x1A
LBS multi-base station information 0x18
With mileage location data (added ACC, data
0x28
escalation mode)
LBS+WIFI information 0x2C
The IMSI number reports platform information 0x90
ICCID number Reports platform information 0x94
Recording file reports platform information 0x8D
Issue instructions 0x80
4.4. Information content
According to different applications, corresponding to the corresponding "protocol
number", determine the specific content.
4.5. Information serial number
The serial number of the first GPRS data (including status packets and GPS, LBS and
other packets) sent after the boot is' 1 ', and the serial number of each sent data
(including status packets and GPS, LBS packets) is automatically added to 1.
4.6. Error check
The terminal or server can use the verification code to determine whether the
received information is wrong. In order to prevent data from making mistakes in the
transmission process, the error check is added to prevent data misoperation, which
increases the security and efficiency of the system. The error check code adopts
CRCITU check method.
The CRC-ITU value of the data from "packet length" to "Message serial number"
(including "packet length" and "message serial number") in the protocol body.
If there is a CRC error in the calculation of the received information, the
receiver ignores and abandons the packet.
4.7. Stop bit
Fixed value, uniform hexadecimal 0x0D 0x0A.
8
5. The terminal sends data packets to the server
Separately explain common packet sending and server return
5.1. Login Packet (0x01)
5.1.1. Terminal sends packet to server
The login packet is used to confirm to the server that the connection is
established, and submit the terminal ID to the server.
7
Format Length(Byte) Example
Start bit 2 0x78 0x78
Packet
1 0x0D
Length
Protocol
Login 1 0x01
number
Information Terminal ID 8 0x01 0x23 0x45 0x67 0x89 0x01 0x23 0x45
Pack
(18 Byte)) Message
serial 2 0x00 0x01
number
Error Check 2 0x8C 0xDD
Stop bit 2 0x0D 0x0A
8
[Link]. Start bit
[Link]. Terminal ID
The terminal ID is 0x01 0x23 0x45 0x67 0x89 0x01 0x23 0x45
9
Terminal
2 0x00 0x01
ID
Message
serial 2 0XD9 0xDC
number
Error
2 0x0D 0x0A
Check
The protocol number in the response packet is the same as the protocol number of
0x78 0x78 0x0B 0x01 0x00 0x01 0x14 0x01 0x08 0x09 0x1E 0x0A 0xD9 0xDC 0x0D 0x0A
DateTime
10
1011
11
[Link]. Start bit
[Link]. Datetime
12
and the number of satellites involved in positioning is 11.
[Link]. Latitude
Takes 4 bytes and represents the latitude value of the positioning data. The value
ranges from 0 to 162000000, representing the range from 0 degrees to 90 degrees. The
conversion method is as follows:
Convert the longitude and latitude value output by GPS module into decimal units;
Then multiply the converted decimal by 30000, and convert the multiplication result
into a hexadecimal number.
For example, 22º 32.7658 '=(22X60+32.7658)X30000=40582974, and then convert to
hexadecimal number
40582974(base 10)= 26B3F3E (base 16)
The last value is 0x02 0x6B 0x3F 0x3E.
Note: The uploaded latitude and longitude are all positive numbers, take the
absolute value if it is negative
[Link]. Longitude
Takes 4 bytes and represents the longitude value of the positioning data. The value
ranges from 0 to 324000000, representing a range of 0 degrees to 180 degrees.
13
The conversion method is the same as the conversion method for latitude.
[Link]. Speed
Occupies 1 byte, indicating the operating speed of the GPS, the value range is 0x00
~ 0xFF, indicating the range 0 ~ 255 km/h.
For example:
0x00 stands for 0 km/h;
0x10 represents 16 km/h;
0xFF stands for 255 km/h.
[Link]. Status Heading
Take 2 bytes and convert to binary, the first six bits of the first byte represent
the device status, the last two bits and eight bits of the second byte represent the
GPS operating direction, representing the range 0 ~ 360, unit: degrees, with true
north
as 0 degrees, clockwise.
The first six bits of 8-bit binary in the first byte represent the state, and the
following two bits and 8 bits of the second byte, a total of 10 bits of binary,
represent the heading degree.
13
Bit7 (ACC ON/OFF) Note: The status information in the
data packet is the status at the moment
Bit6 (ACC ON/OFF) recorded by the time bit in the data
GPS packet.
Bit5 Real-time/differential
positioning
For example: the value is 0x15 0x4C, converted to binary is 00010101 01001100,
BYTE_1 Bit7 0 (no definition yet)
BYTE_1 Bit6 0 (ACC OFF)--0: ACC OFF, 1: ACC ON (some projects do not use this
bit)
BYTE_1 Bit5 0 (real-time GPS )——0: real-time GPS, 1: differential positioning
BYTE_1 Bit4 1 ( GPS has been positioned) - 0: GPS has not been positioned, 1:
GPS has been positioned
BYTE_1 Bit3 0 (East longitude)——0: East longitude, 1: West longitude
BYTE_1 Bit2 1 (Northern latitude)——0: South latitude, 1: North latitude
BYTE_1 Bit1 0
BYTE_1 Bit0 1
BYTE_2 Bit7 0
BYTE_2 Bit6 1
BYTE_2 Bit5 0 Heading 332° (0101001100 binary converted to decimal 332)
BYTE_2 Bit4 0
BYTE_2 Bit3 1
BYTE_2 Bit2 1
BYTE_2 Bit1 0
BYTE_2 Bit0 0
14
It means that the GPS has been positioned, real-time GPS, north latitude, east
longitude, and heading 332°.
[Link]. MCC
[Link].MNC
[Link].LAC
Location area code Location Area Code (LAC) included in LAI , consisting of two bytes,
using 16 Base encoding. The available range is 0x0001-0xFFFE, code group 0x0000 and
0xFFFF Not available (see GSM Specification 03.03, 04.08 and 11.11). A location area can
contain one or more cells.
[Link]. Cell ID
Mobile base stationCell Tower ID(Cell ID) , the value range is 0x000000 00 ~ 0xFFFFFFFF,
occupies 4 bytes
15
5.2.2. The terminal sends the mileage positioning data packet to the
server
The mileage is 4 bytes in meters, 0x00 0x0F 0x42 0x40, 1,000,000 meters, or 1000
kilometers
Note: 0x12 GPS/LBS packet will be saved first when the GSM signal is abnormal, and
16
then uploaded to the platform; The method of supplementary transmission is not real
time upload, but after the device is stationary, the reserved anchor point is uploaded.
The time in the positioning packet shall prevail when the track is played back. When
the positioning packet time is less than 5 minutes of the current time, it should not
be displayed.16
0x22)
17
temperature 2 0x8BD1 _ _ _
humidity 2 0x1AF0 _ _
serial number 2 0x00 0x03
error checking 2 0x9D 0xDC _ _
end bit 2 0x0D 0x0A
[Link]. Datetime
[Link]. Latitude
[Link]. Longitude
[Link]. Speed
18
See Packet Format [Link] for details
[Link].MCC
[Link].MNC
[Link].LAC
[Link].Cell ID
1718
[Link].ACC
Data 0x04: After changing from motion to static state, the last
reporting type positioning point is transmitted.
0x05: After the network is disconnected and reconnected, the
last valid upload point before reporting
0x06: Reporting mode: Mandatory upload of GPS points for
ephemeris update
0x07: Reporting mode: press the button to upload the anchor
point
19
0x08: Reporting mode: report location information after power
on
0x09: Reporting mode: not used
0x 0A : Reporting mode: the device reports the last longitude
and latitude after being stationary, but the time is updated
0x 0B : WIFI parsing longitude and latitude upload package
0x 0C : Reporting mode: LJDW (immediate positioning) command
reporting
0x 0D : Reporting mode: report the last longitude and latitude
after the device is stationary
0x 0E : Reporting mode: GPSDUP upload (scheduled upload in
static state)
Mileage data is 4 bytes in meters, e.g. 0x00 0x0F 0x42 0x40 (1,000,000 meters, i.e.
1000 km)
Total travel time accounts for 4 bytes in seconds, e.g. 0x00 0x0F 0x42 0x40 (1,000,000
seconds)[Link]. Temperature
[Link]. Humidity
20
Humidity unit: percent relative humidity (%RH). The range is 0-100
Note: 0x28 When the GSM signal is abnormal, the packet will be saved first and then
upload, but after the device is stationary, the reserved anchor point is uploaded. The
time in the positioning packet shall prevail when the track is played back. When the
positioning packet time is less than 5 minutes of the current time, it should not be
displayed.
1920
21
The heartbeat packet is the packet that maintains the connection between the
It occupies 1 byte and is converted into binary to represent the status information of
the terminal. One byte is regarded as 8 bits, the lowest bit is 0 bits, and the highest
bit is 7 bits. When transmitting, the high bit is transmitted first, and then the low
bit is transmitted. The specific meanings of each representative are as follows:
22
1: Oil and
electricity
disconnected
Bit 7
0: oil and
electricity
connected
1: GPS has
positioned
Bit 6
0: GPS not
positioned
111: Door open
alarm
110: Door closing
alarm
100: SOS alarm
Bit 5- 011: Low battery
BYTE Bit 3 alarm
010: Power failure
alarm
001: Vibration
alarm
000: normal
1: Connected to
external power
supply
Bit 2
0: No external
power supply
connected
1:ACC ON
Bit 1
0:ACC O F
1: Fortification
Bit0
0: Disarm
There are a total of 7 voltage levels, ranging from 0-6, indicating the voltage from
low to high.
0: No power (power off);
1: The battery status is not enough to make calls, send text messages, etc.;
2: Low battery;
3-6: All can be used normally, but they are arranged according to the amount of
electricity.
Range of GSM information: 0-100; converted to decimal, the larger the value, the
23
stronger the GSM signal
0: Indicates no signal
100: full signal
Operating mode:
0x 00= smart sleep mode;
0x 01= normal mode;
0x 02= deep sleep mode;
0x 03= Timed return mode;
0x04 = Remote power on/off mode;
Device sleep state:
When the device is working normally, it is 0x 00 ;
When the device sleeps, the device sleep status bits are consistent with the working
mode bits. For example, in deep sleep mode, the reserved extension bits when the device
sleeps are 0x02 0x02 .
24
start bit 2 0x78 0x78
Packet
1 0x05
length
Agreement
1 0x13
number
information
information
2 0x00 0x01
sequence
error
2 0xE9 0xF1
checking
After receiving the data packet from the terminal, the server responds with an empty
data packet.
Note: The "information sequence number" in the data packet must be consistent with
the "information sequence number" sent by the responding terminal.
5.4.2.1Start bit
25
For details, see Data Packet Format 4.3
26
[Link] package ( 0x16 )
5.5.1. The terminal sends an alarm data packet to the server
Format Length(Byte) Example
27
[Link] Protocol number
[Link] Latitude
[Link] Longitude
[Link] Speed
[Link] MCC
28
[Link] MNC
[Link] LAC
[Link] Cell ID
0x00: normal
29
0x04: Alarm when entering
the fence
fence
alarm
alarm
alarm
30
0x0E: Low battery alarm
opened
[Link] Language
English: 0x02
31
For details, see Data Packet Format 4.7
Packet length 1 0x 05
Stop bit 2 0x 0D 0x 0A
32
Length(Byt
Format Example
e)
start bit 2 0x78 0x78
Packet length 1 0x2E _ _
Agreement number 1 0x1A
date time 6 0x13 0x01 0x08 0x09 0x1E 0x0A
GPS information
1 0xCD
GPS satellite number
informat longitude 4 0x02 0x6B 0x3F 0x3E
in ion latitude 4 0x0C 0x45 0x49 0x53
fo
rm speed 1 0x00
at heading, bearing 2 0x14 0x8F
io
n 0x31 0x33 0x38 0x30 0x30 0x31 0x39
telephon
telephone number twenty one 0x39 0x38 0x38 0x35 0x20 0x20 0x20
e number
0x20 0x20 0x20 0x20 0x20 0x20 0x20
language reserved 1 0x00
status language 1 0x02
information sequence 2 0x00 0x06
error checking 2 0x29 0xD1
Stop bit 2 0x0D 0x0A
33
For details, see Data Packet Format [Link]
[Link] Latitude
[Link] Longitude
[Link] Speed
The phone number is 21 digits, and any less than 21 digits must be filled with spaces,
For example: 13800138000, the device reports: 0x31 0x33 0x38 0x30 0x30 0x31 0x33 0x38
0x30 0x30 0x30 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20
34
For details, see Data Packet Format 4.7
NCI1 3 Same as CI
35
NCI2 3 Same as CI
NCI3 3 Same as CI
NCI4 3 Same as CI
NCI5 3 Same as CI
NCI6 3 Same as CI
36
the mobile station and the base station is
0.
Used to determine the number of WIFI
WiFi quantity 1 transmitted in the package, 0 means no WIFI
is detected
Received signal 1WIFI MAC (transmit
according to the actual number of searched
WIFIs, if one is found, one is transmitted,
WIFIMAC1 6 if many are found, multiple are
transmitted, if no transmission is found,
it is 0)
… …
The base station information is fixed at 7, and 0x00 is added for any shortage. The WIFI
78786b 2c
110b1709362501cc00287200101a3f28720010193f2872000df3282872000df419000000000000000000
00000000000000000000007e4a1e6
37
5384bf4af49eef65772b4c34967204ebbf53bc46996697f853f0fe6b5d752c5424050f247e205ab0d59d
0efdd15c000450f80d0a
38
m 00: External voltage
a D 01~03: (customized)
t a 04: Terminal status synchronization
i t Informat 1 05: Door status
o a ion type 08: Self-test parameters
n c 09: Positioning satellite information
o 0A: ICCID information
n ...to be added
t Data Depending on the type of information, the content is also
content N different. See the table below for details of 0A.
e
n Example: ICCID number is 12345123456789123456, then the
t ICCID 10 terminal ID is: 0x12 0x34 0x51 0x23 0x45 0x97 0x89 0x12 0x34
0x56
Information
After turning on the phone, every time you send data, it will
serial 2
automatically +1
number
error CRC-ITU value from "Packet Length" to "Message Sequence
2
checking Number"
end bit 2 0x0D 0x0A
39
5.10.1. The terminal sends a data packet to the server:
Format Length(Byte) describe
40
6. The server sends data packets to the terminal
41
6.1.6. Instruction content
Represented by ASCⅡ of string, the command content is compatible with SMS commands
42
6.2.4. Instruction length
Instruction length = Server flag+ Command content length
For example: in byte length, 0x0A means that the instruction content occupies 10 bytes
[Link] _ _
The language used by the terminal
Chinese: 0x00 0x01
English: 0x00 0x02
RELAY,1#
DYD,000000#
Function description: Cut off the vehicle’s oil and electricity control circuit
returned messages:
43
1. Successful return: DYD=Success!
30 30 23 00 A0 DC F1 0D 0A
Device response: 78 78 18 15 10 00 01 A9 58 44 59 44 3D 53 75 63 63 65 73 73 21 00 02
00 18 91 77 0D 0A
HFYD,000000#
Function description: Connect the vehicle’s oil and electricity control circuit
returned messages:
Instruction format:
DWXX,000000#
44
Function description:
Get positioning information instructions. Both mobile phone users and SMS servers can
returned messages:
1、 Return successfully:
DWXX=Lat:< South / North Latitude > ,Lon:< East / West Longitude >,Course:<Angle> ,
For example:
Lat:N23d5.1708m,Lon:E114d23.6212m,Course:120,Speed:53.02;DateTime:08-09-12 [Link]
The meaning is: 23 degrees 5.1708 minutes north latitude, 114 degrees 23.6212 minutes
east longitude, angle: 120 degrees, speed: 53.02 kilometers/hour, time and date: [Link]
Course:,Speed:,DateTime:-:
The platform delivery and device reply formats are similar to DYD
45
7. Attached is the AAU CRC-ITU table lookup algorithm CC
46
// Calculate 16-bit CRC of data of given length
U16 GetCrc16(const U8* pData, int nLength)
{
U16 fcs = 0xffff; // initialization
while(nLength>0){
fcs = (fcs >> 8) ^ crctab16[(fcs ^ *pData) & 0xff];
nLength--;
pData++;
}
return ~fcs; // Negation
}
47
Not requiring server-side responses to protocol packets like IMSI number transmissions streamlines operations by reducing unnecessary data traffic and increases efficiency in the communication process. However, the potential drawback is the lack of immediate confirmation of data receipt, which might lead to uncertainties in whether the data successfully reached its destination .
The addition of ACC data in location packets provides functional benefits such as enhanced status monitoring capabilities, offering insights into the vehicle's ignition status. This inclusion adds depth to the data packets compared to standard GPS/LBS packets, which primarily provide positional data without engine-related status information .
The heartbeat packet is sent at fixed time intervals to ensure the connection's validity. It prompts a response packet from the server for confirmation. This mechanism helps maintain consistent communication by preventing terminal disconnection and conserving GPRS traffic by avoiding continuous reconnection attempts due to perceived inactivity .
The handling of packets using the 0x28 protocol for 4G device positioning differs in that it specifically includes data escalation modes, such as the addition of ACC for status monitoring, whereas regular GPS/LBS packets focus primarily on location data without these extended functionalities .
The error check is crucial for determining whether received information is erroneous, which helps prevent data misoperations during transmission. It increases system security and efficiency by employing the CRC-ITU check method to validate data from "packet length" to "Message serial number." If a CRC error is detected, the receiver ignores the packet, reducing unnecessary processing and potential errors .
Allowing protocol data packet transmissions without immediate server acknowledgments, such as GPS real-time supplementary transmissions, implies an increase in system efficiency by minimizing server load. However, it risks data loss or discrepancies due to lack of immediate receipt confirmation, potentially requiring further mechanisms to ensure data integrity and reliability .
The protocol is designed to suppress outdated positioning packets to optimize current tracking data accuracy and relevance. The criterion for suppression is when the positioning packet's time is less than 5 minutes from the current time; these packets should not be displayed to ensure only the most relevant data is presented during playback .
The protocol ensures that data packets are not mishandled by incorporating an error-checking mechanism using the CRC-ITU method. This method checks the value from "packet length" to "Message serial number," including these fields, to determine if errors are present. If errors are detected, the packet is ignored, preventing potential misoperations during data transmission .
When a GSM signal is abnormal, the GPS/LBS data is first saved and then uploaded to the platform once the device becomes stationary. This non-real-time upload ensures that data integrity is maintained until transmission is possible, based on the reserved anchor point rather than real-time signals .
The system utilizes protocol packet formats to manage multiple data transmission scenarios by structuring data into predefined formats that can handle asynchronous communication. Key elements of these formats include start and stop bits for data demarcation, packet length for size management, agreement numbers for data type identification, and error-check codes for ensuring data integrity. This modular design allows specific protocol numbers to define and manage various transmission types, such as location, status, and alarm packets, effectively handling diverse scenarios .