Académique Documents
Professionnel Documents
Culture Documents
1
GOOME AICHEAN
2
GOOME AICHEAN
Table of Contents
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
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.
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
Packet format
1. Head of information
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
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
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>
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
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.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.).
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
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
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.
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.
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.
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.
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.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.
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.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
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.
16
GOOME AICHEAN
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.
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
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
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