Вы находитесь на странице: 1из 14

Viczone

23

WWW.VIC-ZONE.COM Tel: 86-755-8294-9136 Fax:86-755-8373-62

Communication Protocol for Vic-Zone GPS-Tracker (T300C)

Designer and Manufacturer of Tracking System Solutions, Home Medical Devices, Home Digital Products.

Viczone
23

WWW.VIC-ZONE.COM Tel: 86-755-8294-9136 Fax:86-755-8373-62

1 Overview
This document specifies the communication protocol between the vehicle-mounted terminal and the communication gateway of Shenzhen Vic-Zone Intelligent Transportation System (ITS) Co., Ltd. The protocol sets the messages from the monitoring center to the terminal to be downlink instructions, and the messages from the terminal to the monitoring center to be uplink instructions. By default, the terminal works in the GPRS mode, and transfers the messages between the terminal and the monitoring center through TCP/IP protocol. When getting out of the GPRS signal coverage area, the terminal hands over to the SMS text mode automatically; when entering the GPRS signal coverage area again, the terminal is re-connected to the monitoring center in the GPRS mode automatically. In the two transfer modes, the message format is the same as message contents, but the data frame format is different.

1.1 Version Update Description

2 Message Description
2.1 Definition of Data Type
Data type CHAR C_STRING Single ASCII code character ASCII string. In case the string has a fixed length and the bits are not enough to make the length, the binary space will be added to the right side to make up the length (0x20H). Exception exists if otherwise specified. N_STRING Digital string that contains 0..9. In case the string has a fixed length and the bits are not enough to make the length, the ASCII code 0 will be added to the left side to make up the length (0x30H). Exception exists if otherwise specified. H_STRING Digital string that contains 0..F. In case the string has a fixed length and the bits are not enough to make the length, the ASCII code 0 will be added to the left side to make up the length (0x30H). Exception exists if otherwise specified. Hexadecimal string, e.g., 1 is expressed by 31. In case the string has a fixed length and the bits are not enough to make the length, the ASCII code 0 will be added to the left side to make up the
Designer and Manufacturer of Tracking System Solutions, Home Medical Devices, Home Digital Products.

Description

HEX_STRING

Viczone
23

WWW.VIC-ZONE.COM Tel: 86-755-8294-9136 Fax:86-755-8373-62

Data type

Description length (0x30H). Exception exists if otherwise specified.

BIN BYTE

Binary data 8-digit integer that contains no symbol, 0..255

2.2 Message Format


The messages between the vehicle and the gateway are transferred through data frames. A complete data frame structure in the GPRS mode is defined in the following figure:
Packet header flag
1 byte

Message SN/time Command word


12 bytes 4 bytes

Message body
N byte (N is not greater than 2K)

Packet trailer flag


1 byte

2.3 Definition of Message Field


2.3.1 Packet Header/Packet Trailer Flag Bit

A flag bit indicates the start or the end of a message frame. 0X2AH (i.e., character *) serves as a start indicator, and 0X5EH (i.e., character ^) serves as an end indicator. When transferring binary data, in order to ensure accuracy of data transfer, it is necessary to perform escape processing on the indicators that appear in the form of bytes in the message except packet header, packet trailer and command word. In the current protocol, the escape rules are not enabled, and the terminal program ignores the circumstance that special characters are contained in the message contents. The monitoring center shall avoid special characters 0x2A (*), 0x5E (^), and 0x5C (\) in the message contents. The definition is as follows: 2AH7DH + 03H 5EH7DH + 02H 7DH7DH + 01H

Designer and Manufacturer of Tracking System Solutions, Home Medical Devices, Home Digital Products.

Viczone
23

WWW.VIC-ZONE.COM Tel: 86-755-8294-9136 Fax:86-755-8373-62

2.3.2

Command Word

Length: 4 bytes, C_STRING character Function: Define the type of payload information transferred by the data frame, which indicates the function of the data. The message is defined in the following table:

2.3.3
Length: Function:

Terminal ID
Fixed 15 bytes, C_STRINGType. This field is optional, and occurs only in the SMS data packet.

2.3.4

Message SN/Time

Length: Fixed 12 bytes, C_STRINGType. When the monitoring center sends a message that requires response, these 12 bytes represent the serial number (SN) of the message. This SN shall be identical to the SN of the response message from the terminal. In other circumstances, all these 12 bytes constitute the time chop field.

2.3.5
Length:

Message Body
Variable, 1024 bytes, possibly null.

3 Command Information
3.1 Downlink Information
3.1.1 Primary Roll call Message

Designer and Manufacturer of Tracking System Solutions, Home Medical Devices, Home Digital Products.

Viczone
23

WWW.VIC-ZONE.COM Tel: 86-755-8294-9136 Fax:86-755-8373-62

Message Field Start Identifier SN/Time Command Word Terminal ID Message Body Message Contents *

Field Value

Type CHAR C_STRING 1

Length (in bytes)

Description

12 4 15 3

DB00 Terminal ID Message Contents LOG

C_STRING C_STRING C_STRING

End Identifier Example:

CHAR

*040331141830DB00LOG ^ This message means: The message is sent at 14:18:30 on 2004-3-31, the message type is downlink message, and the message is a downlink primary rollcall message.. Response The terminal responds with UB04. Example: *040331141830+UB04+terminal ID +4+GPRMCdata +10000000L000000^ *080913(date)+161212(local time) +UB04(command) +INSPECT00000001(Terminal ID) +211601(GPS time) +A0805.2719S07907.2311W025.3(Position) +080913(GPS date) +000.0010000000L000000^(speedetc) Sending Mode Description GPRS This message is applicable to all terminals.

3.1.2

Message of Reading Parameter Configuration of Terminal


Field Value * Type CHAR C_STRING DB03 Terminal ID Message Contents C_STRING C_STRING C_STRING 1 12 4 15 0 Length (in bytes) Description

Message Field Start Identifier SN/Time Command Word Terminal ID Message Body Message Contents Check Word End Identifier ^

HEX_STRING CHAR

2 1

Designer and Manufacturer of Tracking System Solutions, Home Medical Devices, Home Digital Products.

Viczone
23

WWW.VIC-ZONE.COM Tel: 86-755-8294-9136 Fax:86-755-8373-62

Example: *040331141830DB03 ^ Response The terminal responds with UB02. Example: *040331141830+UB02+terminal ID_IP:port_0000_0000_0_0_1_0_0_28_0000_0000_0000_0000_0000_0000_ 0000_0000^ Sending Mode Description GPRS This message is applicable to all terminals.

3.1.3

Message of Reading Operation State of Terminal


Field Value * Type CHAR C_STRING DB04 Terminal ID Message Contents C_STRING C_STRING C_STRING 1 12 4 15 0 Length (in bytes) Description

Message Field Start Identifier SN/Time Command Word Terminal ID Message Body Message Contents Check Word End Identifier Example: *040331141830DB04^ Response ^

HEX_STRING CHAR

2 1

The terminal responds with UB03. Example: *040331141830+UB03+Termianl ID_IP:port_2008-04-20_2008-06-06_200806-06_xx-xx_00_00:00_LL_00_00^

Sending Mode Description Sending Mode Description

GPRS This message is applicable to all terminals. SMS, GPRS This message is applicable to all terminals.

Designer and Manufacturer of Tracking System Solutions, Home Medical Devices, Home Digital Products.

Viczone
23

WWW.VIC-ZONE.COM Tel: 86-755-8294-9136 Fax:86-755-8373-62

3.1.4

Set the Static Back-transmission Interval of Vehicle


Field Value * Type CHAR C_STRING DB14 Terminal ID Message Contents DB14XXXX DB14: Fixed keyword XXXX: Time interval (s), H_STRING 4-byte fixed length, max. 65535s C_STRING C_STRING C_STRING 1 12 4 15 4 Length (in bytes) Description

Message Field Start Identifier SN/Time Command Word Terminal ID Message Body Message Contents

Check Word End Identifier Example: *040331141830 DB1401F4^ ^

HEX_STRING CHAR

2 1

This message means: The message is sent at 14:18:30 on 2004-3-31; message type: The downlink vehicle zero point back-transmission interval is 500s. Response The terminal responds with UE10. Example: *040331141830UE1001F4^ Sending Mode Description GPRS This message is applicable to all terminals.

3.1.5

Equal-time Continuous Back-transmission Setting


Field Value * Type CHAR C_STRING DD00 Terminal ID C_STRING C_STRING C_STRING DD00XXXXYYZZ DD00: Fixed keyword 1 12 4 15 8 Length (in bytes) Description

Message Field Start Identifier SN/Time Command Word Terminal ID Message Body Message Contents

Designer and Manufacturer of Tracking System Solutions, Home Medical Devices, Home Digital Products.

Viczone
23

WWW.VIC-ZONE.COM Tel: 86-755-8294-9136 Fax:86-755-8373-62

Message Field

Field Value

Type

Length (in bytes)

Description

XXXX: Time interval of continuous back-transmitted messages. Unit: Second, total 4 bytes, H_STRING, max. 65535s. In case XXXX = 0, continuous back transmission is stopped. YYZZ: Total time of equi-time back-transmission, unit: YY: hour, ZZ: minute. Total 4 bytes, H_STRING, max. FFFF, i.e., 255 hours and 255 minutes. In case YYZZ = 0, the message is transmitted back continuously at the time interval. When neither XXXX nor YYZZ is 0, the message is transmitted back continuously at the time interval until the total duration is reached. Check Word End Identifier Example: *040331141830DD0000050014^ This message means: 040331141830: The message is sent at 14:18:30 on 2004-3-31. DD00: the message type is downlink, command is regular continuous back-transmission setting. 0005: (hex) the GPS data is transmitted back every 5 seconds. 0014: (hex) the total duration of backtransmission is 20 minutes (after 20 minutes stop transmitting). Response Sending Mode The terminal responds with UE08. SMS,GPRS Example: *040331141830UE0800050014^ Description This message is applicable to cost-effective terminals and navigation-type terminals. When the data is transmitted back continuously in the SMS mode, if the set time interval is less than the minimum time interval (set by the terminal manufacturer through the configuration message), the data will be transmitted back continuously at the minimum time interval. ^ HEX_STRING CHAR 2 1

3.1.6

Circuit Control Signal (I01)


Field Value * Type CHAR C_STRING DH00 Terminal ID XYZ DH00YY C_STRING C_STRING C_STRING 1 12 4 15 3 Length (in bytes) Description

Message Field Start Identifier SN/Time Command Word Terminal ID Message Body Message Contents

Designer and Manufacturer of Tracking System Solutions, Home Medical Devices, Home Digital Products.

Viczone
23

WWW.VIC-ZONE.COM Tel: 86-755-8294-9136 Fax:86-755-8373-62

DH00: Fixed keyword YY: 00: 01: Check Word End Identifier Example: *040331141830DH0000^ *040331141830DH0001^ 00:off 01:on This message means: The message is sent at 14:18:30 on 2004-3-31, and the message type is downlink circuit control signal. Response The terminal responds with UH00. Example: *040331141830UH0001^ *040331141830UH0100^ Sending Mode Description GPRS This message is applicable to all terminals. ^ Message SN, which is of a fixed length of 2 bytes. Off On HEX_STRING CHAR 2 1

3.1.7

Fuel Route Control Signal (I02)


Field Value * Type CHAR C_STRING DH01 Terminal ID XYZ DH01YY DH01: Fixed keyword YY: 00: 01: Message SN, which is of a fixed length of 2 bytes. Off On HEX_STRING ^ CHAR 2 1 C_STRING C_STRING C_STRING 1 12 4 15 3 Length (in bytes) Description

Message Field Start Identifier SN/Time Command Word Terminal ID Message Body Message Contents

Check Word End Identifier

Designer and Manufacturer of Tracking System Solutions, Home Medical Devices, Home Digital Products.

Viczone
23

WWW.VIC-ZONE.COM Tel: 86-755-8294-9136 Fax:86-755-8373-62

Example: *040331141830DH0100^ *040331141830DH0101^ 00:off 01:on This message means: The message is sent at 14:18:30 on 2004-3-31, and the message type is downlink fuel route control signal. Response The terminal responds with UH01. Example: *040331141830UH0001^ *040331141830UH0100^ Sending Mode Description GPRS This message is applicable to all terminals.

3.2 Uplink Information


3.2.1 Handshake Signal Message
Field Value * Type CHAR C_STRING UB00 Terminal ID C_STRING C_STRING C_STRING HSO HEX_STRING ^ CHAR 2 1 1 12 4 15 3 Length (in bytes) Description

Message Field Start Identifier SN/Time Command Word Terminal ID Message Body Message Contents Check Word End Identifier Example:

*040331141830UB00HSO^ This message means: The message is sent at 14:18:30 on 2004-3-31, the message type is uplink data handshake message. Response The center responds with DB01.

Designer and Manufacturer of Tracking System Solutions, Home Medical Devices, Home Digital Products.

Viczone
23

WWW.VIC-ZONE.COM Tel: 86-755-8294-9136 Fax:86-755-8373-62

Example: *040331141830DB01^ Sending Mode Description GPRS This message is applicable to all terminals.

3.2.2

Terminal Registration Message


Field Value * Type CHAR C_STRING UB05 Terminal ID C_STRING C_STRING C_STRING UB05XXYYZZLM...M+GPS data 15-digit Terminal ID HEX_STRING ^ CHAR 2 1 1 12 4 15 Variable length Length (in bytes) Description

Message Field Start Identifier SN/Time Command Word Terminal ID Message Body Message Contents Check Word End Identifier Example:

*040331141830+UB05+Terminal ID+4+GPRMCdata+10000000L000000^ GPRMCdata example:141830A2214.5914N11432.5614E000.0040331000.00 141830:time A:fixed 2214.5914N11432.5614E:latitude and longitude 000.0:speed 040331:date 000.00: azimuth *040331141830UB05VICZONE000000014141830A2214.5914N11432.5614E000.0040331000. 0010000000L000000^ Response Example: *040331141830DX061^ means effective *040331141830DX010^ means failure. Sending Mode Description GPRS This message is applicable to all terminals.

Designer and Manufacturer of Tracking System Solutions, Home Medical Devices, Home Digital Products.

Viczone
23

WWW.VIC-ZONE.COM Tel: 86-755-8294-9136 Fax:86-755-8373-62

3.2.3

Equal-time Continuous Back-Transmission Message


Field Value * Type CHAR C_STRING UD00 Terminal ID C_STRING C_STRING C_STRING UD00+GPS data HEX_STRING ^ CHAR 2 1 1 12 4 15 Variable length Length (in bytes) Description

Message Field Start Identifier SN/Time Command Word Terminal ID Message Body Message Contents Check Word End Identifier Example:

*040331141830+UD00+ID+4+GPRMCdata+10000000L000000^ *040331141830UD00VICZONE000000014141830A2214.5914N11432.5614E000.0040331000. 0010000000L000000^ Response Sending Mode Description No response is required. GPRS This message is applicable to cost-effective terminals and navigation-type terminals. After the total continuous back-transmission time is reached, the back-transmission will stop automatically, and the continuous backtransmission end message will be sent to the center.

3.2.4

SOS Message
Field Value * Type CHAR C_STRING UA01 Terminal ID C_STRING C_STRING C_STRING UD00+GPS data HEX_STRING 2 1 12 4 15 Variable length Length (in bytes) Description

Message Field Start Identifier SN/Time Command Word Terminal ID Message Body Message Contents Check Word

Designer and Manufacturer of Tracking System Solutions, Home Medical Devices, Home Digital Products.

Viczone
23

WWW.VIC-ZONE.COM Tel: 86-755-8294-9136 Fax:86-755-8373-62

End Identifier Example:

CHAR

*040331141830+UA012+0XB3 +0XB5+0XC1+0XBE+0XBD+0XD9+0XBE+0XAF+GPRMCdata+^ *040331141830UA0120XB3 0XB5 0XC1 0XBE 0XBD 0XD9 0XBE 0XAF 141830A2214.5914N11432.5614E000.0040331000.00^ Response Center responses: Example: *040331141830DE002^ means sending SOS alarm each 3seconds, totally 8times *040331141830DE012^ means SOS alram stops. Sending Mode Description GPRS This message is applicable to cost-effective terminals and navigation-type terminals. After the total continuous back-transmission time is reached, the back-transmission will stop automatically, and the continuous backtransmission end message will be sent to the center.

4 Appendix
Definition of GPS Location Information Format
Message Field Time GPS positioning is valid Latitude Field Value YYMMDD Type N_STRING CHAR Length (in bytes) 6 1 Description Year, month and day occupy 2 bytes respectively. A or V. A means the GPS data is valid, and V means the GPS data is invalid. The unit of the former 2 bytes is degree, and the value ranges from 0 to 90; the unit of the latter 7 bytes is minute. N means north latitude, and S means south latitude

N_STRING

Latitude flag

N or S.

CHAR

Designer and Manufacturer of Tracking System Solutions, Home Medical Devices, Home Digital Products.

Viczone
23

WWW.VIC-ZONE.COM Tel: 86-755-8294-9136 Fax:86-755-8373-62

Longitude

N_STRING

10

The unit of the former 3 bytes is degree, and the value ranges from 0 to 180; the unit of the latter 7 bytes is minute. E means east longitude, and W means west longitude

Longitude flag Speed Time Direction IO state Mileage flag Mileage data

E or W

CHAR N_STRING

1 5 6 6 8 1 6

HHmmSS

N_STRING N_STRING C_STRING CHAR

Hour, minute and second occupy 2 bytes respectively.

8-digit IO L indicates provision of mileage Mileage data, measured in meters

Designer and Manufacturer of Tracking System Solutions, Home Medical Devices, Home Digital Products.

Вам также может понравиться