GF22 Protocol
GF22 Protocol
目录
1903 protocol instruction.......................................................................................................................... 1
1. Login package (uplink protocol number: AP00, response: BP00)..........................................................2
2. Location data package, WIFI+GPS+LBS+ status combination to achieve positioning (uplink protocol
number: YP14, response: ZP14).................................................................................................................2
3. Device alarm, reply position (uplink protocol number: YP15, response: ZP15)....................................4
4. Device heartbeat packet (uplink protocol number: YP16, response: ZP16)..........................................7
5. AGPS (uplink protocol number: AP14, response: BP14)........................................................................9
6. The device uploads the SOS number (uplink protocol number: AP21, response: after the BP21 user
SMS command is changed, report to the platform).................................................................................. 9
7. Upload the IMSI number and ICCID number of the device to the platform (device upstream: YP02,
platform response: ZP02)........................................................................................................................ 10
8. Voice uplink (uplink protocol No.: ap83, response: bp83).................................................................. 11
9. Set upload interval (downlink protocol No.: wp02, response: xp02).................................................. 12
10. Set heartbeat packet interval (issue: dp03, reply: cp03)...................................................................12
11. Set the SOS number (downlink protocol number: BP11, response: ap11)....................................... 13
12. Delete SOS number (issue bp77 and reply ap77).............................................................................. 14
13. Device restart (downlink: bp61)........................................................................................................ 14
14. Restore the equipment to factory settings (downlink: bp62)........................................................... 15
15. Change IP or domain name (uplink ap64, downlink bp64)............................................................... 15
16. Set vibration alarm switch (up: ap97; down: bp97).......................................................................... 15
17. OTA upgrade (downlink: bp95)..........................................................................................................16
18. Set voice recording switch (up: ap94; down: bp94).......................................................................... 16
19. Set the voice control callback switch (up: ap93; down: BP93)..........................................................17
20. Set LED display switch (up: AP92; down: bp92).................................................................................17
21. Remote shutdown (uplink: ap91; downlink: bp91)........................................................................... 17
22. Set sleep mode (uplink: ap90; downlink: bp90)................................................................................ 18
23. Remote recording (uplink: ap82; downlink: bp82)............................................................................19
24. Set the pickup number (Master number (2) original R01 command to set the master number)
(issue bp78 and reply to ap78)................................................................................................................ 19
25. Set the equipment time zone (issue bp15 and reply ap15)...............................................................19
Uplink protocol
#:Terminator
Description: Every time the device disconnects from the server, it needs to
re-send the login package
20150608140830 server UTC0 time
Example:
TRVYP14080524A2232.9806N11404.9355E000.1061830323.870600090800010200011,460,0,952
0,3671,Home|74-DE-2B-44-88-8C|97&Home1|74-DE-2B-44-88-8C|97&Home2|74-DE-2B-44-88-
8C|97& Home3|74-DE-2B-44-88-8C|97#
Detailed:
TRV Identifier
A:"A" means the data is valid, "V" is invalid, if it is V, then take LBS data
2232.9806N11404.9355E000.1: If the longitude and latitude are invalid, it can be all
0 by default, such as 0000.0000N00000.0000E
22 degrees32.9806N, 114 degrees 04.9355E, speed: 000.1 km / h
(如经纬度无效,可默认全为0,如0000.0000N00000.0000E
北纬 22 度 32.9806 分,东经 114 度 04.9355 分,速度为 000.1 km/h)
061830: 06:18:30 GMT
323.87:Direction angle 323.87°
06000908000102000:
01 means Defense status: 00 means none or not set, 01 means fortified, 02 means not fortified;
02 means The current working status of the device: 00 means none or not set, 01 means
continuous positioning state (TCP long connection mode),02 means Power saving working status
0 means The state of the car's oil switch: 0 means no item, 1 means the oil is on, 2 means the oil
is off;
0 is the state of the electric switch of the car: 0 is no option, 1 is the electricity is on, 2 is the
electricity is off;
0 means disassembly state: 0 means this function does not exist, 1 means disassembled, 2 means
not disassembled;
1 Convert to binary to 0001; The first digit on the right is app vibration alarm: 0 off, 1 on; The
second SMS vibration alarm on the right: 0 off, 1 on; The third digit on the right is the telephone
alarm: 0 off, 1 on; The first in the sequence is whether there is vibration alarm function: 0 has
vibration alarm function, 1 has no such function (转成 2 进制为 0001;右边第一位为 APP 震动
功能)
1 Voice control recording: 0 means no time function, 1 voice control recording is enabled, 2 voice
control SMS recording is enabled, 3 voice control callback is enabled, 4 is disabled this function
460,0,9520,3671 : LBS base station data, MCC country code, 460 for China, 0: MNC, 0 for mobile,
WiFi information can have multiple groups separated by "&". When the device uploads the WiFi
name, please remove the special characters or replace it with self increasing numbers
TRVZP14#
Description: 1. The location package server can save some traffic without
length and data bit content must be consistent with the protocol,
TRVYP14080524A2232.9806N11404.9355E000.1061830323.87060009
0800010200011,460,0,9520,3671#
response: ZP15)
Example:
TRVYP15080524A2232.9806N11404.9355E000.1061830323.870600090800010200000,460,0,952
0,3671,00,zh-cn,00,HOME|74-DE-2B-44-88-8C|97&HOME1|74-DE-2B-44-88-8C|97&HOME2|74-
DE-2B-44-88-8C|97&HOME3|74-DE-2B-44-88-8C|97#
Detailed:
TRV Identifier
A:"A" means the data is valid, "V" is invalid, if it is V, then take LBS data
22 degrees 32.9806 minutes north latitude, 114 degrees 04.9355 minutes east
06000908000102000:
01 is the fortified state: 00 means none or not set, 01 means fortified, 02 means not fortified;
02 is the current working status of the device: 00 stands for none or not set, 01 stands for
continuous positioning state (TCP long connection mode), 02 stands for power saving working
0 is the state of the car's oil switch: 0 is no option, 1 is the oil is on, 2 is the oil is off;
0 is the state of the electric switch of the car: 0 is no option, 1 is the electricity is on, 2 is the
electricity is off;
0 means disassembly state: 0 means this function does not exist, 1 means disassembled, 2 means
not disassembled;
1 Convert to binary to 0001; The first digit on the right is app vibration alarm: 0 off, 1 on; The
second SMS vibration alarm on the right: 0 off, 1 on; The third digit on the right is the telephone
alarm: 0 off, 1 on; The first in the sequence is whether there is vibration alarm function: 0 has
vibration alarm function, 1 has no such function (转成 2 进制为 0001;右边第一位为 APP 震动
功能)
1 Voice control recording: 0 means no time function, 1 voice control recording is enabled, 2 voice
control SMS recording is enabled, 3 voice control callback is enabled, 4 is disabled this function
460,0,9520,3671 : LBS base station data, MCC country code, 460 for China, 0: MNC, 0 for mobile,
00 It is the alarm state, 00 is no alarm (01: SOS alarm, 02: power failure alarm, 03 vibration
alarm, 04 falling off alarm, 05 entering the fence alarm, 06 leaving the fence alarm, 07 overspeed
alarm, 08 displacement alarm, 09 low power alarm, 10 power supply recovery) (为报警状态,00
为无任何报警(01:SOS 报警,02:断电报警,03 振动报警,04 脱落报警,05 进围栏报警,06 出围栏报
00: The first 0: Do you need to reply to the address information, 0: No reply, 1 reply.
The second 0: Does the address information contain a mobile phone hyperlink, 0 does not
contain, 1 contains
MAC address, 97 is signal strength, and variables are separated by "|" WiFi information can have
multiple groups separated by "&". When the device uploads the WiFi name, please remove the
r The platform responds to ZP15, if there is no need to reply to the address content, the
s TRVZP156df157335e0253575c71533a53576d7759279053003100300037003953f700200020
p 0068007400740070003a002f002f007700770077002e006700700073002e0063006f006d002f
o 006d00610070002e0061007300700078003f006c00610074003d00320033002e00310032003
n 30026006c006e0067003d003100310033002e003100320033#
s The content of the platform's response address is HEX's UNICODE code, not plain text. The
above example content is:
e 1079 Nanhai Avenue, Nanshan District, Shenzhen
: http://www.gps.com/map.aspx?lat=23.123&lng=113.123
The content language is automatically judged according to the language in the YP05 data
package, and whether to reply to the hyperlink is also judged according to the YP05 status
UNICODE code uses BIG-ENDIAN (BE) instead of BOM。
D 1. The package server must respond;
e 2. The positioning packet is parsed according to the length. The packet length and data bit
s content must be consistent with the protocol, otherwise the packet parsing exception will be
c caused;
i TRVYP15080524A2232.9806N11404.9355E000.1061830323.870600090800010200000,460,0
p ,9520,3671,00,zh-cn,00#
ZP16)
Message field Field value Type Length (bytes) Description
Start identifier TRV CHAR 3
Command word YP16 C_STRING 4
Delimiter C_STRING 1
Message body C_STRING The message body
length and
identification bit are
fixed. Please sort
strictly according to
the protocol
End identifier # CHAR 1
Example:
TRVYP16, 06000908000020030110101111101201#
When the device is at rest, the instruction can be used to maintain connection with the
positioning,080 为 the battery level,0,为 ACC state,, 1: is on, 2 is off, 0 means no ACC;0 means
disassembly state: 0 means this function does not exist, 1 means disassembled, 2 means not
disassembled;02 is the current working status of the equipment:00 means none or not set, 01
means continuous positioning state (TCP long connection mode), 02 means power saving
second SMS vibration alarm on the right: 0 off, 1 on; The third digit on the right is the telephone
alarm: 0 off, 1 on; The first in the sequence is whether there is vibration alarm function: 0 has
vibration alarm function, 1 has no such function (转成 2 进制为 0001;右边第一位为 APP 震动
功能)
1 Voice recording: 0 means no such function, 1 means voice recording is enabled, 2 means Voice
SMS recording is enabled, 3 means voice callback is enabled, and 4 means this function is
disabled
1 Indicates that the automatic fortification switch 1 is on, 2 is off, and 0 has no such function
1 Indicates that oil status 1 is on (oil status is restored and oil is on), and 2 is off (oil status is
1 Indicates that the electrical state 1 is on (restore the electrical state, the electrical state is on),
and 2 is off (disconnect the electrical state, the electrical state is off)
1 Indicates the external power supply status. 1. Indicates that the external power supply is
connected, 2. Indicates that the external power supply is not connected (the external power
supply is disconnected and considered as the removal status), and 0 indicates that there is no
0120 The detected external voltage is 12.0V. When it is 9999, it means that this function is not
available
1: Device motion state 1 indicates that the device is in motion state, 2 indicates that the device is
response: TRVZP16#
Description: The upload frequency of heartbeat package shall not be greater than 5
minutes, and 3 minutes is recommended. Too long time can easily lead
Example:
TRVAP14,460,0,9520,3671#
AP14: Command word
460,0,9520,3671 : LBS base station data, MCC country code, 460 for China, 0: MNC, 0 for mobile,
6. The device uploads the SOS number (uplink protocol number: AP21,
response: after the BP21 user SMS command is changed, report to the
platform)
Message field Field value Type Length (bytes) Description
Start identifier TRV CHAR 3
Command word AP21 C_STRING 4
SOS number C_STRING N
End identifier # CHAR 1
Example:
TRVAP2113412341234#
AP21: Command word
13412341234: SOS number, separated by commas
Example: TRVAP21,,18520079767#, upload the third number, overwrite/add the third number
TRVAP21,18672362665,18520079767#, upload the second and third numbers, the function is the
same as above
above
The number uploaded by the device is 3 at most and 0 at least (0 means 3 numbers are deleted).
7. Upload the IMSI number and ICCID number of the device to the
TRVAP83,20140818064408,6,1,1024,XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX#
explain:
TRV:identifier
AP83 : Command characters
20140818064408 :yyyyMMddHHmmss Format year, day, hour, minute and second, equipment recording
time
6:Total number of voice packets
1: The current number of packets is 1 for the first packet and 2 for the second packet,...... The voice time of
the same voice packet is the same
1024 :Voice packet length
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:For the current audio data, the size of each audio packet is
1024 bytes. If the last packet is less than 1024, the actual number of bytes will be taken
Voice packet upload rules:
Upload according to the package order. If no response package is received from the server after uploading,
continue to upload the voice package.
After receiving the equipment's reply confirming that the data packet has been received successfully,
continue to upload the next data packet in turn......
If the device replies to confirm the packet reception failure status, the previous packet will be sent
repeatedly
Platform response:
TRVBP83,20140818064408,6,1,1#
Downlink protocol
9. Set upload interval (downlink protocol No.: wp02, response: xp02)
Message Field value Type Length (bytes) Description
field
Start identifier TRV CHAR 3
Command word WP02 C_STRING 4
Serial number C_STRING 6
time interval C_STRING 4 Unit: second (decimal)
End identifier # CHAR 1
Example:
TRVWP020000080020#
WP02: Command word
000008:The server issues the serial number and the terminal returns it
Example:
TRVDP03000001,180#
TRV: identifier
DP03: Command word
000001: The server issues the serial number and the terminal returns it
180: Indicates the upload time interval of heartbeat packet. Unit: seconds. The limit is 120-300
#: Terminator
Response: Terminal reply TRVCP030000010#
000001: The serial number issued by the server and returned by the
device
0: Command execution status, 0 successful, 1 failed
11. Set the SOS number (downlink protocol number: BP11, response:
ap11)
Message Field value Type Length (bytes) Description
field
Start identifier TRV CHAR 3
Command word BP11 C_STRING 4
Serial number C_STRING 6
SOS number C_STRING N
End identifier # CHAR 1
Example:
TRVBP1100000413412341234#
BP11: Command word
000004: The server issues the serial number and the terminal returns it
13412341234: SOS number, multiple groups can be set, and multiple groups are separated by
commas
TRVBP1100000418672362665,18672362665,18520079767#,Set 3 numbers
Note: the platform does not support the user to send three numbers that are empty, that is,
There are at most 3 numbers and at least 1 number distributed by the platform.
Example:
TRVBP77000001,1,0,1#
TRV: identifier
BP77: Command word
000001: The server issues the serial number and the terminal returns it
1: Indicates whether the first number is deleted. 1 indicates deletion. 0 indicates no deletion
0: indicates whether to delete the second number. 1 indicates to delete. 0 indicates not to delete
1: Indicates whether the third number is deleted. 1 indicates deletion. 0 indicates no deletion
#: Terminator
Response: Terminal reply TRVAP770000010#
000001: The serial number issued by the server and returned by the
device
0: Command execution status, 0 successful, 1 failed
#: Terminator
#: Instruction Terminator
#: Instruction Terminator
#:Instruction Terminator
1:1. Start and close position data upload; 0: close position data upload (valid when the following
data is 1)
#: Instruction Terminator
#: Instruction Terminator
24. Set the pickup number (Master number (2) original R01 command
25. Set the equipment time zone (issue bp15 and reply ap15)
示例:
TRVBP15000001,8.5# indicates 8:30 east time zone
TRVBP15000001,8# indicates East 8 time zone
TRVBP15000001,-8# indicates West 8 time zone
See table for details.