0% found this document useful (0 votes)
35 views

C11 C13 Protocol

Uploaded by

ussielc
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views

C11 C13 Protocol

Uploaded by

ussielc
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

1.

Login package (uplink protocol number: AP00, response:


BP00) —— All
Example:
TRVAP00353456789012345#
TRV:Identifier
AP00:Command word
353456789012345:Device IMEI number, fixed 15 digits

#:Terminator

response: Platform reply TRVBP0020150608140830#

Description: Every time the device disconnects from the server, it needs to
re-send the login package
20150608140830 Server UTC0 time

2. Location data package, GPS+LBS+ status merge to achieve


positioning (uplink protocol number: YP03, response:
ZP03)
Message field Field value Types Length Description
(bytes)
Start identifier TRV CHAR 3
Command word YP03 C_STRING 4
Message body C_STRING 75
Message GPS,LBS,Status data
content

End identifier # CHAR 1

Example:
TRVYP03080524A2232.9806N11404.9355E000.1061830323.8706000908000102000,460,0,9520
,3671#
Detailed :TRV Identifier

YP03: Command word

080524: May 24, 2008

A: "A" means the data is valid, "V" is invalid, if it is V, then take LBS data
2232.9806N11404.9355E000.1: , If the latitude and longitude are invalid, it can be all 0 by
default, such as 0000.0000N00000.0000E
北纬 22 度 32.9806 分,东经 114 度 04.9355 分,速度为 000.1 km/h

22 degrees 32.9806 minutes north latitude, 114 degrees 04.9355 minutes east longitude, speed

000.1 km/h
061830: 06:18:30 GMT
323.87: Direction angle 323.87°

06000908000102000:060--GSM signal, 009--Number of satellites involved in

positioning,080--battery power,0--ACC status,1--open,2--turn off,0---No ACC, 01--Fortified

state:00--None or not set,01--defended,02--Undefended;02--The current working status of the

equipment:00--None or not set,01--Continuous positioning state (TCP long connection mode),

02--Power saving working status (TCP short connection mode) ; 0--The state of the car's oil

switch:0--No item,1--Oil is on,2--Oil closed;0--The state of the car's electric switch:0--No

item,1--Electricity is on,2--Power off;0--Disassembled state:0--This feature does not exist,

1--Disassembled,2--No disassembly;

460,0,9520,3671 : LBS Base station data,MCC Country code,460--China,0:MNC,0--China

mobile,9520:LAC,Decimal,3671,CID,Decimal

If the status in the GPS data packet is V, or the latitude and longitude is

"0000.0000N00000.0000E", then take LBS data

response: Platform response ZP03

TRVZP03#

Description: 1. The location package server can save some traffic without

responding, and the integration can confirm with the server whether

to respond to the package;

2. The location packet is parsed by length, and the length of the data

packet and the content of the data bits must be consistent with the

protocol, otherwise it will cause the packet parsing abnormal;

3. This message applies to all terminals.


3.Device alarm, reply position (uplink protocol number:
YP05, response: ZP05)

Message field Field value Types Length Description


(bytes)
Start identifier TRV CHAR 3
Command word YP05 C_STRING 4
Message body C_STRING 87
End identifier # CHAR 1

Example:
TRVYP05080524A2232.9806N11404.9355E000.1061830323.8706000908000102000,460,0,9520
,3671,00,zh-cn,00#
详解:TRV 标识符

YP05: Command word

080524: May 24, 2008

A: "A" means the data is valid, "V" is invalid, if it is V, then take LBS data
2232.9806N11404.9355E000.1: ,If the latitude and longitude are invalid, it can be
all 0 by default, such as 0000.0000N00000.0000E
22 degrees 32.9806 minutes north latitude, 114 degrees 04.9355 minutes east longitude, speed
000.1 km/h
061830: 06:18:30 GMT
323.87: Direction angle 323.87°

06000908000102000:060--GSM signal,009--Number of satellites involved in

positioning,080--battery power,0--ACC status,1--open,2--turn off,0--no ACC, 01--Fortified state:

00--None or not set , 01--defended , 02--Undefended ; 02--The current working status of the

equipment:00--None or not set,01--Continuous positioning state (TCP long connection mode),

02--Power saving working status (TCP short connection mode) ; 0--The state of the car's oil

switch:0--No item,1--Oil is on,2--Oil closed;0--The state of the car's electric switch:0--No

item,1--Electricity is on,2--Power off;0--Disassembled state:0--This feature does not exist,

1--Disassembled,2--No disassembly

460,0,9520,3671 : LBS Base station data,MCC Country code,460 For China,0:MNC,0 For China

Mobile,9520:LAC,Decimal,3671,CID,Decimal

00 为 Alarm status,00 为 No alarm(01:SOS alarm,02:Power failure alarm,03:Vibration


alarm,04:Falling off alarm,05:Into the fence alarm,06:Out of the fence alarm,07:Speeding

alarm,08:Displacement alarm,09:Low battery alarm,10:Power restoration)

zh-cn: Device language

00:The first 0: Do you need to reply to address information, 0: No reply, 1 reply.

The second 0: whether the address information contains a mobile phone hyperlink, 0 does not

contain, 1 contains

response: The platform responds to ZP05.If the content of the reply address is not required,

the content of the address in the reply packet is empty.

TRVZP056df157335e0253575c71533a53576d775927905300310030003700395

3f7002000200068007400740070003a002f002f007700770077002e00670070007

3002e0063006f006d002f006d00610070002e0061007300700078003f006c00610

074003d00320033002e0031003200330026006c006e0067003d00310031003300

2e003100320033#
The content of the platform's response address is HEX's UNICODE code,
not plain text. The above example content is:
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。
Description: 1. The package server must respond;

2. The location packet is parsed by length, and the length of the data packet and

the content of the data bits must be consistent with the protocol, otherwise it

will cause the packet parsing abnormal;

3. This message applies to all terminals.

3. Set upload time interval (downlink protocol number: WP02,


response: XP02)
Message field Field value Types Length Description
(bytes)
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 a serial number and the terminal returns

0020: 20 second interval, the maximum limit is 9999。

response: Terminal reply TRVXP020000080#


000008: The serial number issued by the server, the device returns
0: Command execution status, 0 success, 1 failure
Description: This message applies to all terminals.

4. Device heartbeat packet (uplink protocol number: YP07,


response: ZP07)
Message field Field value Types Length Description
(bytes)
Start identifier TRV CHAR 3
Command word YP07 C_STRING 4
Delimiter C_STRING 1
Message body C_STRING 28 The message body
length and
identification bits are
fixed, please strictly
follow the protocol
order
End identifier # CHAR 1

Example:
TRVYP07, 060009080000200301010100201111#

YP07:Command word

When the device is at rest, the instruction can be used to maintain connection with the

platform and solve static drift

060009080000200301010100201111:060--GSM signal,009--Number of satellites involved in


positioning,080--battery power,0,--ACC status,1:--open,2--turn off,0--No ACC;0--Disassembled

state : 0--This feature does not exist , 1--Disassembled , 2--No disassembly ; 02--The current

working status of the equipment:00--None or not set,01--Continuous positioning state (TCP long

connection mode),02--Power saving working status (TCP short connection mode)

0030 --Time interval of regular reporting unit: 30 seconds

1--Manual defense (vibration alarm) switch (manual defense) 1 is on, 2 is off

010 --Vibration sensor sensitivity 1-100

1--Automatic defense switch 1 is on, 2 is off

0020 --Automatic defense timing time Unit second: 20 seconds

1 --Oil state, 1 is open (recovering oil state, oil is on state), 2 is off (oil state is off, oil is off state)

1 --Power status, 1 is on (power is restored, power is on), 2 is off (power is off, power is off)

1--External power supply status, 1. Means external power supply is connected, 2. Means no

external power supply is connected (external power supply is disconnected and considered to be

removed), 0 means no external power supply

1:-- Equipment motion status 1 means the equipment is in motion 2 means the equipment is in a

static state 0 means the state is invalid

response: TRVZP07#

Description: The upload frequency of heartbeat packets should not exceed 5 minutes,

and 3 minutes is recommended. Too long will easily cause the operator to

disconnect from the middle

5. Remotely fortify and disarm (downlink protocol number:


BP02, response: AP02)
Message field Field value Types Length Description
(bytes)
Start identifier TRV CHAR 3
Command word BP02 C_STRING 4
serial number C_STRING 6
Armed and C_STRING 1 0 means defense, 1
disarmed state means disarm
End identifier # CHAR 1
Example:
TRVBP020000010#
BP02: Command word

000001: The server issues a serial number and the terminal returns

0: 0 means defense, 1 means disarm

response: Terminal reply TRVAP020000010#


000001: The serial number issued by the server, the device returns
0: Command execution status, 0 success, 1 failure
Description: The terminal device must reply

6. Remotely cut off oil and power (downlink protocol number:


BP03, response: AP03)
Message field Field value Types Length Description
(bytes)
Start identifier TRV CHAR 3
Command word BP03 C_STRING 4
serial number C_STRING 6
Oil and power C_STRING 1 0 means oil cut, 1
off state means power cut
End identifier # CHAR 1

Example:
TRVBP030000020#
BP03: Command word

000002: The server issues a serial number and the terminal returns

0: 0 means oil cut, 1 means power cut

response: Terminal reply TRVAP030000020#


000002: The serial number issued by the server, the device returns
0: Command execution status, 0 success, 1 failure
Description: The terminal must reply with a response status

7. Remote recovery of oil circuit and circuit (downlink


protocol number: BP04, response: AP04)
Message field Field value Types Length Description
(bytes)
Start identifier TRV CHAR 3
Command word BP04 C_STRING 4
serial number C_STRING 6
Restore the C_STRING 1 0 is recovery oil, 1 is
state of the oil recovery power
circuit
End identifier # CHAR 1

Example:
TRVBP040000030#
BP04: Command word

000003: The server issues a serial number and the terminal returns

0: 0 is recovery oil, 1 is recovery power

response: Terminal reply TRVAP040000030#


000003: The serial number issued by the server, the device returns
0: Command execution status, 0 success, 1 failure
Description: Terminal must reply

8. AGPS (uplink protocol number: AP14, response: BP14)


Message field Field value Types Length Description
(bytes)
Start identifier TRV CHAR 3
Command word BP14 C_STRING 4
Delimiter , C_STRING 1
Base station N Decimal representation
information
End identifier # CHAR 1

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 China

Mobile,9520:LAC, Decimal,3671,CID, Decimal

response: Platform reply TRVBP14,23.113,113.123#


23.113,113.123: latitude longtitude
Description: 1. The platform must respond to the reply

2. It is recommended to keep only 5 digits after the decimal point of the


latitude and longitude of the reply. If it is too long, please consult the

equipment party if it is affected;

3. This message applies to all terminals.

9. Set overspeed (delivery: BP74, reply: AP74)


Message field Field value Types Length Description
(bytes)
Start identifier TRV CHAR 3
Command word BP74 C_STRING 4
serial number 000001 C_STRING 6
duration C_STRING N Unit: second
Overspeed C_STRING N Unit: KM/H
End identifier # CHAR 1

Example:
TRVBP74000001,600,120#
TRV: identifier
BP73: Command word
000001: The server sends a serial number and the terminal returns
600: Indicates the duration, limit input 0-999
120: means overspeed, limit input 0-999
#: terminator
response: Terminal reply TRVAP740000010#

000001: The serial number issued by the server, the device returns

0: command execution status, 0 succeeds, 1 fails

Description: The terminal must reply with a response.

10.Set the interval of heartbeat packets (delivery: DP03, reply:


CP03)
Message field Field value Types Length Description
(bytes)
Start identifier TRV CHAR 3
Command word DP03 C_STRING 4
serial number 000001 C_STRING 6
Message body C_STRING N
End identifier # CHAR 1

示例:
TRVDP03000001,180#
TRV: identifier
DP03: Command word
000001: The server sends a serial number and the terminal returns
180: Indicates the time interval for uploading heartbeat packets. Unit: second, limit input 120-300
#: terminator
response: Terminal reply TRVCP030000010#
000001: The serial number issued by the server, the device returns
0: Command execution status, 0 success, 1 failure

Description: The terminal must reply with a response

11.Device restart (downstream: BP61)


Example:TRVBP61#
Parameter Description:
BP61 script
# End of instruction
response: TRVAP61#
The device receives the instruction and uploads the AP61 instruction code in
response to the issue week, and then starts the restart function
Description: The device does not have to reply

12.Restore the factory settings of the device (downstream:


BP62)
Example:
TRVBP62#
Parameter Description:
BP62 script
# End of instruction
response: When the device receives the instruction, it will start the factory reset function,
without the need for uplink response
Description: This message applies to all terminals.

13.Upload the IMSI number and ICCID number of the device


to the platform (device upstream: YP02, platform response:
ZP02)
Message field Field value Types Length (bytes) Description
Start identifier TRV CHAR 3
Command word YP02 C_STRING 4
Delimiter , C_STRING 1
Message body (IMSI C_STRING N
number)
Delimiter , C_STRING 1
Message body (ICCID C_STRING N
number)
End identifier # CHAR 1
Example:
TRVYP02,460023136470163,898602B1191550255484#
TRV: Identifier
YP02: Command word
,: separator
460023136470163: The IMSI number of the device (460 is China's MCC, 02 is China Mobile MNC,
3136470163 is the mobile subscriber identification number MSIN)
898602B1191550255484: ICCID number of the device
#: terminator
response: Platform response TRVZP02#

Description: 1. The platform must respond.


2. The time point of using this protocol: After the login packet
AP00 is sent and the response from the platform BP00 is
obtained, YP02 is sent immediately.

14.Synchronization status protocol (uplink: AP57, downlink:


BP57)
Message field Field value Types Length (bytes) Description
Start identifier TRV CHAR 3
Command word AP57 C_STRING 4
Delimiter C_STRING 1
Message body C_STRING N
End identifier # CHAR 1

Example:
TRVAP57,868016804152425,1,00,60,13410937109|13310937109|13501837108#
AP57: Command word
868016804152425:Device IMEI number
1 :Armed and disarmed state 1 means arming, 0 means disarming
0 :The oil state of the car, 0 means no such state, 1 means the oil is on, 2 means the oil is off
0 :The electric state of the car, 0 means no such state, 1 means power is on, 2 means power is off
60 : Indicates that the upload frequency interval is in seconds, and 60 means that the packet
interval (frequency) is 60 seconds
13410937109|13310937109|13501837108 : The length and number of SOS numbers are not
limited, and the numbers are separated by "|"
response: TRVBP57,OK#

Description: 1. The server must respond

2. If the device does not receive a reply from the platform within 2 minutes of

reporting status data, the device will consider continuing to report status

information according to the situation

3. When the item that contains this agreement in the device changes, it will report

this status, and the platform can keep in sync with the device after receiving it.

15.Change IP or domain name (uplink AP64, downlink BP64)


Example:
TRVBP64, 120440, www.321gps.com,8011#
TRV: identifier
BP64: Command word
120440 serial number,
127.0.0.1: When it means IP, the secondary field is the IP address, if it is a domain name, the field
is the domain name
8011: Port for uploading data
#: terminator
response: TRVAP64,120440,www.321gps.com,8011#
Parameter Description:
AP64 script
120440 When the device responds, it needs to upload the corresponding
serial number as it is for the platform's corresponding instructions
www.gpscar.cn: the domain name bound to the device, ASCII code
8011 port
# End of instruction
Description: This message applies to all terminals.

16.Change the displacement alarm threshold (uplink: AP98;


downlink: BP98)
Example:
TRVBP98100001000300#
TRV: Identifier
BP98: Command word

100001 serial number

000300, Speed threshold is 300

#: Terminator

response: Platform reply TRVAP981000010#


100001:The serial number issued by the server, the device returns
0: Command execution status, 0 success, 1 failure
Description:

17.Set vibration alarm switch (uplink: AP97; downlink: BP97)


Example:
TRVBP971000011#
TRV:Identifier
BP98: Command word

100001: serial number

1:1, Turn on vibration alarm; 0, turn off vibration alarm

#: Terminator

response: Platform reply TRVAP971000010#


100001: The serial number issued by the server, the device returns
0: command execution status, 0 succeeds, 1 fails
Description:

You might also like