GOOME AICHEAN
(Ver 1. 3)
1
GOOME AICHEAN
GOOME Technology GOOME Technology GOOME Technology
1.0
First edition
2012-4-11 1.1 2013-1-24 2015-5-3
1.3
Add language pack terminal landing open and short circuit alarms Add the LBS protocol
2
GOOME AICHEAN
Table of Contents
Communication protocol ............................................................................ 4 Terminology definition ............................................................................... 4 Basic rules r ules ................................ ................. ................................ ................................. ................................. ................................ ................. .. 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) (0x91) ........................................................................................ 15
5.11
Extended heartbeat packets (0x07)........................................................... 17
5.12
Calibration Time Protocol (0x08)............................................................. 19
3
GOOME AICHEAN
Communication protocol 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.
This protocol compatible
Terminology definition
Terminology, abbreviation
English meaning
Mobile Peer to Peer
Chinese meaning China
Mobile
CMPP
China
GPS
Global Positioning System
GSM
Global System for Mobile Communication
Global mobile communication system
GPRS
General Packet Radio Service
General wireless packet service
TCP
Transport Control Protocol
Transmission protocol
LBS
Location Based Services
Auxiliary service
IMEI
International Mobile Equipment Identity
International Mobile Equipment Identifier
MCC
Mobile Country Code
The country code of the 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
Point-to-Point Agreement Global
satellite
positioning system
control location
the
distress
4
GOOME AICHEAN
signal CRC
Cyclic Redundancy Check
Cyclic Redundancy Check
NITZ
Network Identity and and Time Zone,
Time zone
GIS
Geographic Information System
Geographic System
2.
2.1
Information
General definition
Byte order Protocol field that involves multiple byte data, endian byte order for the
network, i.e., Big Endian
Mentioned information content, values are time field containing UTC seconds. See also: http://en.wikipedia.org/wiki/UTC
2.2
A maximum packet size can not exceed 1024 bytes. 2.4 Domain name usage rule below) are unable DNS ip local cache, if this ip 3 times (tentative, to connect, only to re-name resolution request. The purpose is: Ip can quickly determine local cache server (DNS resolution to avoid ① 2.3
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. confirm.
The device starts by sending a login packet by default, waiting for the server to The server returns a response response packet acknowledgment. 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
information Length
2
Agreement number 1
Package length 2
Information serial number 2
information N.
(B yte)
The total sum of the packet length 7 + N byte Up and down packets are used in this packet structure 1.
2 bytes, is fixed at 0x67 0x67
2.
Occupies 1 byte, agreements with the packet number, see the table below
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 interaction
Yes
0x81
Ordinary message
no
0x07
Extended heartbeat packets
Yes
0x08
Time calibration package
Yes
3.
2 bytes.
6
GOOME AICHEAN
Calculated packet length ranges "serial number information" To "Information content" (including "Content") "Serial number information" with 4.
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.
5.1
Log Packet (0x01)
format Length (byte)
information Terminal ID
Terminal language
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 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 ?
19:40:00> 5.1.3 E.g:
Server response
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 B
Head
of
information
0x45
Information Agreement
Packet
number
length
0x0 0
Terminal id
Terminal
serial number
language (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 e and tim
latitu de
longitu de
spe ed
cour se
Base stati on
4
4
1
2
9
Position ing status
e Length (byte)
4
1
Date and time 4 bytes UTC in seconds, that the satellite time 5.2.2 latitude 5.2.1
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
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.3
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
Length (byte)
2
2
2
CI 3
Such as a base station in China 0x01 0xCC
0x00 0x01
0x27 0x49
0 x00 0x 0C 0xEE
MCC
MNC
LAC
CI
Positioning status 1 byte, used to indicate the state of the terminal positioning device.
5.2.7
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
4
3
2
1
0
0: GPS positioning is not
Bit 0
5.2.8
5
1: GPS positioning has been
1st place
Reserved
Second place
Reserved
No. 3
Reserved
No. 4
Reserved
5th
Reserved
No. 6
Reserved
7th
Reserved
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
Head information
of
0x03
0x00 0x0 4
0x00 0x 1A
Agreement
Packet
Information
number
length
0x00 0x01
serial
status
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 te an d ti
latit ude
longit ude
spe ed
cour se
Base stati on
4
4
1
2
9
Position ing status
Ala rm typ e
1
1
me Length (byte)
4
5.4.1 5.4.2
Upload the packet terminal when an alarm occurs. 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
5.4.4
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
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 te an
latit
longi
spe
cou
d ti me
ude
tude
ed
rse
4
4
4
1
2
Length (byte) 5.5.1 5.5.2
Base stat
Positio ning status
ion
9
1
Sta tus typ
Sta tus val
e
ue
1
N.
When the terminal needs to upload the state change acquired the packet. 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) 5.5.5
0
Remarks Terminal should pay attention to synchronous terminal time and satellite time.
5.6
SMS commands uploading data packets (0x06) information
format D a t e
lat itu de
long itud e
sp ee d
co ur se
Bas e sta tio
Posit ionin g statu
tele phon e numb
SMS instr uctio ns
12
GOOME AICHEAN
a n
n
s
er
9
1
twen ty
d t i m e Length (byte) 4
4
4
1
2
N.
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)
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 5.6.4
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 Byte (byte)
information cellphone number
Response content
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) 5.7.1 5.7.2
1
4
N.
effect The server terminal to the unsolicited instruction / message interaction. Information logo 0x01
instruction
0x02
Interactive message
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 5.7.3
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 identification
Length
(b
Server identification Response bit content
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
1
N.
Length (b yte) 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.
0x01 5.8.2.1
Forward message
the
Forward the message specified phone number
to
the
Forwarding message (0x01) issued the content format 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 5.9.1
Software upgrades (to be determined) 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 te an d
T A
M C C
M N C
stat ions
ti me Length (byte)
4
Numb er of base
1
2
5.2.1
Date and time
5.2.2
TA (Timing advance)
1
1
The bas e sta tio n 1 6
Bas e sta tio n 2 6
The bas e sta tio n 3 6
Bas e sta tio n 4 6
The bas e sta tio n 5 6
Positi oning status
1
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
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 5.2.5
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. Base station
5.2.6
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. Positioning status 1 byte, used to indicate the state of the terminal positioning device.
5.2.7
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
Bit 0
1st place
6
5
4
3
2
1
0
0: GPS positioning is not 1: GPS positioning has been 0: Automatic transmission by device 1: triggered by SMS
16
GOOME AICHEAN
Second place
Reserved
No. 3
Reserved
No. 4
Reserved
5th
Reserved
No. 6
Reserved
7th
Reserved
response
5.2.8
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
Length (byte)
status
GSM signal
Voltage level
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
Head information
of
0x03
0x00 0x0 4
0x00 0x 1A
Agreement
Packet
Information
number
length
0x00 0x01
serial
status
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
5.12
Agreement number
Packet length
Information serial number
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 information
of
Agreement number
Packet length
Information
serial
UTC time
number
19