Vous êtes sur la page 1sur 19

GOOME AICHEAN

GOOME GPS Vehicle Tracker communication protocol


(Ver 1. 3)

1
GOOME AICHEAN

Important revision records

editor date version Review Approval Modify the point


GOOME 1.0 First edition
Technology 2012-4-11

GOOME 1.1 Add language pack terminal landing


Technology 2013-1-24 open and short circuit alarms

GOOME 2015-5-3 1.3 Add the LBS protocol


Technology

2
GOOME AICHEAN

Table of Contents

Communication protocol ............................................................................ 4

Terminology definition ............................................................................... 4

Basic rules ................................................................................................... 5

Packet format .............................................................................................. 6


1. Head of information ............................................................................................ 6
2. Agreement number .................................................................................................. 6
3. Package length ...................................................................................................... 6
4. Information serial number ................................................................................ 7
5. information ............................................................................................................ 7
5.1 Log Packet (0x01) ................................................................................... 7
5.2 GPS data packets (0x02) ..................................................................................... 8
5.3 Heartbeat packets (0x03)....................................................................................... 9
5.4 Data packet alarm (0x04) ................................................................................. 11
5.5 The terminal state acquisition data packet (0x05) ............................................ 12
5.6 SMS commands uploading data packets (0x06) .............................................. 12
5.7 Issued instruction / interactive message data packet (0x80) ............................ 13
5.8 Retransmission data packet (0x81) message normal ........................................ 14
5.9 Software upgrades (to be determined).............................................................. 15
5.10 LBS data packet (0x91) ........................................................................................ 15
5.11 Extended heartbeat packets (0x07) ........................................................... 17
5.12 Calibration Time Protocol (0x08)............................................................. 19

3
GOOME AICHEAN

Communication protocol
1. Introduction
This document defines an application layer protocol interface to the on board
GPS locator and GOOME location-based services platform. Related interface
protocol applies only to the interaction between GOOME platform and positioning
terminal.

2. Compatibility
This protocol compatible

Terminology definition
1. The terms and abbreviations

Terminology, English meaning Chinese meaning


abbreviation
China Mobile
CMPP China Mobile Peer to Peer
Point-to-Point Agreement
Global satellite
GPS Global Positioning System
positioning system
Global mobile
GSM Global System for Mobile Communication
communication system
General wireless packet
GPRS General Packet Radio Service
service
Transmission control
TCP Transport Control Protocol
protocol
Auxiliary location
LBS Location Based Services
service
International Mobile
IMEI International Mobile Equipment Identity
Equipment Identifier
The country code of the
MCC Mobile Country Code
mobile user
MNC Mobile Network Code Mobile network number
LAC Location Area Code Location area code
Cell ID Cell Tower ID Mobile base station
RSSI Received Signal Strength Indicator Receive signal strength
UDP User Datagram P rotocol User Datagram Protocol
SOS Save Our Ship / Save Our Souls Rescue the distress

4
GOOME AICHEAN

signal
CRC Cyclic Redundancy Check Cyclic Redundancy Check
NITZ Network Identity and Time Zone, Time zone
Geographic Information
GIS Geographic Information System
System

2. General definition
2.1 Byte order
Protocol field that involves multiple byte data, endian byte order for the
network, i.e., Big Endian
2.2 Mentioned information content, values are time field containing UTC
seconds.
See also: http://en.wikipedia.org/wiki/UTC
2.3 A maximum packet size can not exceed 1024 bytes.
2.4 Domain name usage rule
DNS ip local cache, if this ip 3 times (tentative, see Note below) are unable
to connect, only to re-name resolution request.
The purpose is:
① Ip can quickly determine local cache server (DNS resolution to avoid
delays), the user experience better.
② Reducing the number of requests domain name (a DNS server to the mobile
apparatus to avoid excessive pressure, causing false positives).
③ DNS service problems, also can use on even the (i p servers generally
do not change) ip cache, even if the server ip change, but also a gradual
transition process that does not lead to a sudden end can not be accessed.

Note: About the number of connections, the general principle is to establish


a connection to the server as soon as possible. Now some terminal establishes a
connection takes about 20s to the 60s, there is a delay before reconnection is
recommended connection times set at three times, each terminal itself select the
appropriate algorithm, flexible.

Basic rules
1. The device starts by sending a login packet by default, waiting for the server to
confirm. The server returns a response packet acknowledgment.
(Device and the server after the connection is established, the first packet
must be sent login packet).
2. After the connection is normally established, the terminal information
changes after gps, gps regularly send data to the server.

5
GOOME AICHEAN

3. In order to ensure the validity of the connection, sends a heartbeat packet


at fixed intervals to the server, the server returns a response packet identified.
4. Protocol number and sequence number response packet inside the protocol
number and the serial number of receipt of the information packet.

Packet format

format Head of Agreement Package Information


information number length serial number information
Length 2 1 2 2 N.
(B yte)

The total sum of the packet length 7 + N byte


Up and down packets are used in this packet structure

1. Head of information

2 bytes, is fixed at 0x67 0x67

2. Agreement number

Occupies 1 byte, agreements with the packet number, see the table below
Agreement Packet description Whether to
number respond
0x01 Log in packets Yes
0x0 2 G PS Packet no
0x 0 3 Heartbeat packets Yes
0x04 Alarm packets Yes
0x0 5 The terminal state acquisition data packet Yes
0x0 6 Data packet on command message Yes
0x80 The command packet sent SMS / message Yes
interaction
0x81 Ordinary message no
0x07 Extended heartbeat packets Yes
0x08 Time calibration package Yes

3. Package length

2 bytes.

6
GOOME AICHEAN

Calculated packet length ranges "serial number information" To "Information


content" (including "Serial number information" with "Content")

4. Information serial number

The first data transmission after power GPRS (GPS data packet, the heartbeat
packet, the command packet) with sequence number '1', after each transmission data
sequence number automatically incremented. After reaching the maximum value of
65535, again counting from 1.

5. information

5.1 Log Packet (0x01)

information
format
Terminal ID Terminal language
Length (byte) 8 1
The login packet is used to confirm that the connection is established to the server,
submitting the terminal ID to the server
5.1.1 Terminal ID (8 bytes)
The terminal ID uses a 15-bit IMEI number.
E.g. IMEI of: 123456789012345,
The terminal ID is: 0x01 0x23 0x45 0x67 0x89 0x01 0x23 0x45
5.1.2 Terminal language (1 byte)
This field is used to represent the language of the terminal device
Numbering Language
0x00 Simplified Chinese
0 x0 1 English
In situations that require the server to the terminal in response to a text
message, the server returns the corresponding language text terminal according to
the set language.
For example, SOS alarm, if the terminal is simplified Chinese, the server returns
an alarm SMS text Simplified Chinese address, such as
SOS Alarm: Bao'an District, Shenzhen, Guangdong Liuxian .G4 all the way from
Gaoxinqi Technology Co., about 86 meters high about 88 meters from the new industrial
area.
If the terminal is English, then the server returns the alarm information in English,
such as
SOS http:! //maps.google.com/ q = 22.577308,113.916685 ? <DateTime: 2013-01-22
19:40:00>

5.1.3 Server response


E.g:

7
GOOME AICHEAN

The terminal transmits login information packet to the server as follows (the
example here is the terminal ID 123456789012345)
0x67 0x67 0x01 0x00 0x00 0x01 0x010x23 0x45 0x67 0x89 0x01 0x23 0x0 0
0x0 B 0x45
Head of Information Terminal id Terminal
information Agreement Packet serial number language
number length (Simplified Chinese)

The server response data packet to the terminal (the same number and response
protocol packet sent from the terminal of the packet protocol number)
0x67 0x67 0x01 0x00 0x02 0x00 0x01
Head of information Agreement number Packet length Information serial number

5.2 GPS data packets (0x02)

information
format
Dat
Base
e Position
latitu longitu spe cour stati
and ing
de de ed se on
tim status
e
Length (byte) 4 4 4 1 2 9 1
5.2.1 Date and time
4 bytes UTC in seconds, that the satellite time
5.2.2 latitude
4 bytes, the data represents the latitude value of the positioning. Numerical
Range - 162 to 162 million, represents the range of -90 degrees (latitude) to 90
degrees (latitude), unit: 1/500 second, the conversion method is as follows:
The latitude and longitude values output from the GPS module into a unit to
be converted into decimal; and then the conversion is multiplied by the decimal
30,000, converts the multiplication result into hexadecimal can.
The latitude 22 °32.7658 '(22 × 60 + 32.7658) * 30000 = 40582974, then converted
into a hexadecimal number: 0x02 0x6B 0x 3F 0x3E.
south latitude - 22 °32.7658 '(- 22 × 60 + (- 32.7658)) * 30000 = -
40582974 is then converted into a hexadecimal number: 0x FD 0x 94 0x C 0 0x
C2
5.2.3 longitude
4 bytes, longitude value of the positioning data. Numerical Range - 324 to
324 million, represents -180 degrees (west longitude) to a range of 180 degrees
(east longitude), the unit: 1/500 sec, consistent conversion method and latitude
conversion method.
5.2.4 speed

8
GOOME AICHEAN

It occupies one byte, represents the GPS speed, a value in the range of 0x00
~ 0xFF represents the range of 0 to 255 km / h.
5.2.5 course
It occupies 2 bytes and indicates the running direction of the GPS,
represents the range of 0 to 360, units: degrees to 0 degrees north, clockwise.
5.2.6 Base station
It takes 9 bytes, there are not enough bytes left up projects 0x00
format MCC MNC LAC CI
Length (byte) 2 2 2
3
Such as a base station in China
0x01 0xCC 0x00 0x01 0x27 0x49 0 x00 0x 0C 0xEE
MCC MNC LAC CI

5.2.7 Positioning status


1 byte, used to indicate the state of the terminal positioning device. 1 byte
as 8, the least significant bit is 0, the most significant bit is 7, the first transfer
high, and then send low. The specific meaning of the delegates is as follows:
High
Low
position
7 6 5 4 3 2 1 0

0: GPS positioning is not


Bit 0
1: GPS positioning has been
1st place Reserved
Second place Reserved
No. 3 Reserved
No. 4 Reserved
5th Reserved
No. 6 Reserved
7th Reserved

5.2.8 response
The protocol does not need to respond
5.2.9 Remarks
When GPS is not available, GPS does not pass the packet, unless the triggering
mechanism 10 will transfer data (e.g. call, alarms, etc.).

5.3 Heartbeat packets (0x03)

format information
status

9
GOOME AICHEAN

Length (byte) 2
5.3.1 Used to confirm the connection between the terminal and the server is
normal, send the packet at a fixed frequency.
5.3.2 status
It takes 2 bytes, is used to represent the various states of the terminal
apparatus information. 1 byte as 8, the least significant bit is 0, the most
significant bit is 7, the first transfer high, and then send low. The specific
meaning of the delegates is as follows:
High
Low
position
15 14 ... .... ... ... 1 0

0: GPS positioning is not


Bit 0
1: GPS positioning has been
10: ACC OFF
1, 2 11: ACC ON
00: No such status
10: disarmed
3rd and 4th place 11: fortification
00: No such status
10: oil and electricity off
5, 6 11: oil and electricity connected
00: No such status
10: The charger is not inserted
7, 8 11: Charger is inserted
00: No such status
9th Reserved
... ...
14th Reserved
15th Reserved
Example: The 0x0 0 BB i.e. 101 1 1011, GPS has been positioned, ACC OFF,
fortification, oils electrically disconnected, the charger is not inserted

5.3.3 Server response


E.g:
Heartbeat packets are sent to the terminal server as follows
0x67 0x67 0x03 0x00 0x0 4 0x00 0x 1A 0x00 0x01
Head of Agreement Packet Information serial status
information number length number

The server response data packet to the terminal (the same number and response
protocol packet sent from the terminal of the packet protocol number)

10
GOOME AICHEAN

0x67 0x67 0x0 3 0x00 0x02 0x00 0x 1A


Head of information Agreement number Packet length Information serial number

5.4 Data packet alarm (0x04)

information
format
Da Position Ala
te Base ing rm
an latit longit spe cour stati status typ
d ude ude ed se on e
ti
me
Length (byte) 4 4 4 1 2 9 1 1
5.4.1 Upload the packet terminal when an alarm occurs.
5.4.2 Date and time, latitude, longitude, speed, heading, the base station,
refer to the state of positioning 5.2 GPS data packet instructions.
5.4.3 Alarm type
When the alarm is triggered, an alarm report packet, a corresponding alarm
position.
value status
0x01 Power failure alarm
0x02 SOS alarm
0x03 Battery low alarm
0x04 Vibration alarm
0x05 Displacement alarm
0x06 Enter the blind alarm
0x07 Leave the blind alarm
0x0 8 GPS antenna open alarm
0x0 9 GPS antenna short circuit alarm
0x0a Light alarm
0x0b Magnetic alarm
0x0c Tamper alarm
0x0d Speed alarm
0x0e Signal shielding alarm
5.4.4 Server response content
format information
Alarm SMS
Byte (byte) N.

11
GOOME AICHEAN

Alarm information content are used in UTF-8 encoding. For example: power alarm:
Wuhan, Hubei Gutian. About 140 meters from King's Gate Meat processing company
(Southwest).
After the terminal receives the response, sending an alarm message content to
a text message center number / SOS numbers, if the alarm message is empty (0 byte),
then no texting.

5.5 The terminal state acquisition data packet (0x05)

information
format
Da Positio Sta Sta
te ning tus tus
Base
an latit longi spe cou status typ val
stat
d ude tude ed rse e ue
ion
ti
me
Length (byte) 4 4 4 1 2 9 1 1 N.

5.5.1 When the terminal needs to upload the state change acquired the packet.
5.5.2 Date and time, latitude, longitude, speed, heading, the base station,
refer to 5.2 gps positioning state packet instructions.
5.5.3 Status type
Status Type Value Status type State value
0x01 ACC ignition Device Time (4 bytes, UTC seconds)
0x02 ACC off flame Device Time (4 bytes, UTC seconds)
5.5.4 The server responds to the message content
format information
(No content)
Byte (byte) 0
5.5.5 Remarks
Terminal should pay attention to synchronous terminal time and satellite
time.

5.6 SMS commands uploading data packets (0x06)

information
format
SMS
D Bas Posit tele
lat long sp co instr
a e ionin phon
itu itud ee ur uctio
t sta g e
de e d se ns
e tio statu numb

12
GOOME AICHEAN

a n s er
n
d
t
i
m
e
Length (byte)
twen
4 4 1 2 9 1 N.
4 ty
one

5.6.1 When the terminal receives the SMS to meet the rules (rules refer to 5.6.5),
the SMS will be uploaded to the server.
5.6.2 Date and time, latitude, longitude, speed, heading, the base station,
the reference 5.2 GPS positioning state packet related interpretation.
5.6.3 telephone number
Send text messages to mobile phone number, not a right make up 21 bytes
of 0x0 0. (In ASCII code)
5.6.4 SMS command
Mobile SMS commands sent to the device (using UTF-8 encoding).
5.6.5 SMS instructions to upload rules
(1) SMS commands defined as STATUS # these messages do not need to be
uploaded to the server, the terminal directly processed.
But the position # 123 and get the address of the instruction needs to be uploaded
to the server for processing.
(2) no Chinese characters, characters and length greater than 2 is less
than 30 characters need to upload the message to the server.
5.6.6 response
format information
cellphone number Response content
Byte (byte) twenty one N.
Response information are UTF-8 encoding, the terminal after receiving the
response, the response SMS sent contents of the phone number in the packet. If
the response content is empty (0 bytes), then the need to send a message to the mobile
phone.

5.7 Issued instruction / interactive message data packet


(0x80)

format information
Information logo Server flag Send the content

13
GOOME AICHEAN

Length (b yte) 1 4 N.
5.7.1 effect
The server terminal to the unsolicited instruction / message interaction.
5.7.2 Information logo
Information identifying value Downlink message type
0x01 instruction
0x02 Interactive message
5.7.3 Server identification bit
Leaving the server identification, the terminal will receive the
binary data is returned as the return package.
5.7.4 Send the content
I.e., an instruction to be issued / message interaction, using UTF-8
encoding. Refer issued "common instruction format standard 6"
5.7.5 Terminal response
format information
Information Server identification Response
identification bit content
Length (b 1 4 N.
yte)
In response to the terminal portion of the encoded content are encoded in
UTF-8.

5.8 Retransmission data packet (0x81) message normal

format information
Information logo Send the content
Length (b yte) 1 N.
5.8.1 effect
Internet message to a terminal, a terminal display to a display screen
according to the message type or message forwarding and the like.
5.8.2 Information identification
Used to identify the type of message, different types do different message
processing, specifically refer to the following table.
Information Message type effect
identification value
0x01 Forward the Forward the message to the
message specified phone number
5.8.2.1 Forwarding message (0x01) issued the content format
format cellphone number news
Length (b yte) twenty one N.
Forward the message to the specified phone number.
Note: If the phone number is all 0x00, then they would send
information to the center number terminal equipment / SOS numbers.

14
GOOME AICHEAN

5.9 Software upgrades (to be determined)

5.9.1 Description
Software upgrades using the initiative to push the platform upgrade
instructions Upgrade (0x80 protocol). Upgrade instructions refer to
"GOOME Technology Equipment Directive lists .doc" (instruction list which have
not yet upgraded software instructions to be supplemented)
5.9.2 Download the upgrade package
Upgrade package downloaded using TFTP.

5.10 LBS data packet (0x91)

information
format
Da T M M The The The
Numb Bas Bas
te A C N bas bas bas
er of e e Positi
an C C e e e
base sta sta oning
d sta sta sta
stat tio tio status
ti tio tio tio
ions n 2 n 4
me n 1 n 3 n 5
Length (byte)
4 1 6 6 6 6 6 1
1 2 1

5.2.1 Date and time


4-bit unsigned integer, based on UTC time value, pay attention to the use of
the network byte order.

5.2.2 TA (Timing advance)


This value can only be obtained at the time a call or SMS, the range of 0-63, in
other cases the value is not valid 255; 550 multiplied by (m) can be estimated from
the terminal to the host cell.

5.2.3 MCC
Mobile users Country Code Mobile Country Code (MCC), China's mobile country code
460 (decimal)
Here ranges: 0x0000 ~ 0x03E7.
China's mobile country code is: 0x01 0xCC (decimal 460 converted to hexadecimal).

5.2.4 MNC
Mobile network numbers Mobile Network Code (MNC), for example, China Mobile is
0x00.

15
GOOME AICHEAN

5.2.5 Number of base stations


A maximum of 5, the value is much, on the back with a number of base station data.
If the number of acquired base station apparatus is greater than 5, the device should
be five strongest signal strength reported by the base station, The base station
according to the strength of the back from the primary base station is the first
one.
Considering the ease of handling the terminal, without using variable-length
packets herein, if there are three base station information, the total data packet
contains information on the base station 5, but only the first three base stations
have information content, the data of two base stations filled 0.

5.2.6 Base station

LAC CI RSSI
2 3 1

5.2.6.1 LAC
Location Area Code Location Area Code (LAC) is included in the LAI, consisting
of two bytes, in hexadecimal coding
code. Available range of 0x0001 - 0xFFFE, 0x0000 and 0xFFFF code group can not
be used (see GSM specification 03.03,
04.08 and 11.11). A location area may contain one or more cells.

5.2.6.2 CI
CI primary cell, a cell identification code, values range 0x000000 ~ 0xFFFFFF.
See Glossary - CI.

5.2.6.3 RSSI
Primary cell signal strength values range 0x00 ~ 0xFF, actual signal strength is
negative, its absolute value uploading.
See Glossary - RSSI.

5.2.7 Positioning status


1 byte, used to indicate the state of the terminal positioning device. 1 byte
as 8, the least significant bit is 0, the most significant bit is 7, the first transfer
high, and then send low. The specific meaning of the delegates is as follows:
High
Low
position
7 6 5 4 3 2 1 0

0: GPS positioning is not


Bit 0
1: GPS positioning has been
0: Automatic transmission by device
1st place
1: triggered by SMS

16
GOOME AICHEAN

Second place Reserved


No. 3 Reserved
No. 4 Reserved
5th Reserved
No. 6 Reserved
7th Reserved

5.2.8 response
The protocol does not need to respond
5.2.9 Remarks
LBS Location complement GPS positioning, GPS is not normally used for
positioning, or has not yet found a GPS satellite, the device GPRS
positioning signal transmission of information to the internet.
Since LBS positioning accuracy of 100 to 10 meters, while sending messages
to the device, the device requires positioning device TA data should be
collected to assist positioning. Further the positioning state of the first
bit to fill the correct instruction value.
Further, since the LBS positioning accuracy is not high, and thus no need
to upload the time base information every ten seconds only when a change
occurs, the base station transmits only a need to upload information from
more than 20 seconds, and the base station has the strongest signal first
three Base station information.

5.11 Extended heartbeat packets (0x07)

format information
status GSM signal Voltage level
Length (byte) 2 1 1

5.11.1 Used to confirm the connection between the terminal and the server is
normal, send the packet at a fixed frequency.
5.11.2 status
It takes 2 bytes, is used to represent the various states of the terminal
apparatus information. 1 byte as 8, the least significant bit is 0, the most
significant bit is 7, the first transfer high, and then send low. The specific
meaning of the delegates is as follows:
High
Low
position
15 14 ... .... ... ... 1 0

17
GOOME AICHEAN

0: GPS positioning is not


Bit 0
1: GPS positioning has been
10: ACC OFF
Bit 1 and 2 11: ACC ON
00: No such status
10: disarmed
No. 3,4 position 11: fortification
00: No such status
10: oil and electricity off
Bits 5 and 6 11: oil and electricity connected
00: No such status
10: The charger is not inserted
7th and 8th place 11: Charger is inserted
00: No such status
9th Reserved
... ...
14th Reserved
15th Reserved
Example: If 0x00BB is 1011 1011, GPS is positioned, ACC OFF, arming, oil break,
charger not inserted

5.11.3 GSM signal level


Occupies 1 byte, divided into 5 levels
0x00: no signal;
0x01: signal is very weak
0x02: signal is weak
0x03: Signal is good
0x04: Strong signal
Such as: 0x03 GSM signal good
5.11.4 Voltage level
Occupies 1 byte, the range is 0-100, that the current
power percentage, expressed in hexadecimal.
Such as 0x005D, corresponding to the decimal 93, that
is, the current power of 93%
5.11.5 Server response
E.g:
Heartbeat packets are sent to the terminal server as follows
0x67 0x67 0x03 0x00 0x0 4 0x00 0x 1A 0x00 0x01
Head of Agreement Packet Information serial status
information number length number

The server response data packet to the terminal (the same number and response
protocol packet sent from the terminal of the packet protocol number)
0x67 0x67 0x03 0x00 0x02 0x00 0x 1A

18
GOOME AICHEAN

Head of information Agreement number Packet length Information serial number

5.12 Calibration Time Protocol (0x08)

The time calibration protocol information is empty.

Server response
format information
U tc time
Length (byte) 4
utc time of 4 bytes, i.e., the satellite time UTC seconds
E.g:
Calibration time packet sent by the terminal to the server as follows
0x67 0x67 0x08 0x00 0x0 2 0x00 0x 1A
Head of information Agreement number Packet length Information serial number

The server response data packet to the terminal (the same number and response
protocol packet sent from the terminal of the packet protocol number)
0x67 0x67 0x08 0x00 0x06 0x00 0x 1A 0x 57 0x 30 0x 06
0x 90
Head of Agreement Packet Information serial UTC time
information number length number

19

Vous aimerez peut-être aussi