Upload
others
View
4
Download
0
Embed Size (px)
Citation preview
1
ISO 9001
VT-08 ProtocolVersion 1.01
(For internal use - Confidential !!!)
1. Control Base VT-08 - Commands
NOTE:
With GPRS communication enabled, the VT-08 is designed to keep TCP connection to the Control Base
over GPRS at all times. If GPRS is disconnected for any reason, the VT-08 will try to reengage the
connection according to device configurations. This allows the Tracking System server to send commands
over GPRS and receive responses at all times. If no connection is detected at the server side, the Control
Base shall use SMS to send commands.
With GPRS communication disabled, the VT-08 will use SMS for all command responses.
1.1. Device Initialization: Device communication, Control Base and Contact
configurations
Command Description$INI=CCNO,ID,EN,APN,USERID,PASSWORD,CCIP1,CCPort1,CCIP2,CCPort2,CCIP3,CC,CCPort3
By SMS from Control Base:
Basic configuration package to initialize Control Base/ Center andGPRS communication
- CCNO -------------- GSM No. of Control Base assignedfor main communication with fullauthorization (max 15 pos)
- ID ------------------ Device ID (8 digits required)- EN ----------------- Enables (1) or disables (0) GPRS
use of the device- APN -------------- GPRS Access Point Nodes (max. 32)- USERID --------- SIM User ID for GPRS access (i.a.)
(max. 15 positions)- PASSWORD ---- SIM Password for GPRS access (i.a.)
(max. 15 positions)- CCIP1 ------------ IP host for GPRS data exchange at
Control Base (max. 15 pos)- CCPort1 ------------ Port number assigned at IP host
(max. 5 pos)- CCIP2 -------------- alternate IP host- CCPort2 ------------ port for alternate IP host- CCIP3 -------------- alternate IP host
2
- CCPort3 ------------ port for alternate IP host
When entering the $INI, leave unassigned parameters empty, butalways include the comma (,).
e.g.:$INI=+886955123456,00000001,1,voicescream.com,,,220.226.136,84, 220.226.137,86, 167.51.225,84,0
- CCNO -------------- +886955123456- ID ------------------ 00000001- EN ----------------- GPRS enabled (1)- APN ---------------- voicescream.com- USERID --------- n.a. (empty)- PASSWORD ---- n.a. (empty)- CCIP1 ------------ IP host 1: 220.226.136- CCPort1 ------------ Host 1 port: 84- CCIP2 -------------- IP host 2: 220.226.137- CCPort2 ------------ Host 2 port: 86- CCIP3 -------------- IP host 3: 167.51.225- CCPort3 ------------ Host 3 port: 84
$INO=Contact1,Contact2,Contact3
By GPRS/ SMS from Control Base only:
Command to configure 3 contact numbers, authorized to receiveSMS alarms and send commands for various device settings
Contact1 (2; 3): GSM number of contact person
e.g.:$INO=+8613800138888,,
Additional contact numbers can always be added through$RADDLIST command below
$GINI By GPRS/ SMS from Control Base only:
Command to query $INI and $INO configurations
After receiving the command, the device will respond with
e.g.:CCNO,ID,EN,APN,USERID,PASSWORD ,CCIP1,CCPort1,CCIP,CCPort2,CCIP3,CCPort3,Con1,Con2,Con3
CCNO- Control Center numberID - Device IDEN - Communication over GPRS is enabled/disabled (1/0)APN- APNUserID- GPRS user ID
3
PASSWORD – GPRS passwordCCIP1,CCPort1- Host 1 IP and portCCIP2,CCPort2- Host 2 IP and portCCIP3,CCPort3- Host 3 IP and portCon1- contact number 1Con2- contact number 2Con3- contact number 3
Configuration items that are not assigned still will be separatedthrough “,”.
$GINO Get ini settings
$INO=con#1,con#2,con#3
NOTE (for production units):CCNO and ID issued by the Control Base software cannot be changed after the initial $INIcommand has been implemented.Any future changes in configurations have to be sent using the original Host IP or ControlBase number, including switches to new GSM numbers.
1.2. Device Communication Modes and Acknowledgment Configurations
Command Description$UDP=x By GPRS/ SMS from Control Base or Contact numbers:
Command to change Internet protocol over GPRS network fromTCP to UDP mode.
x=0: (default) Use TCP modex=1: Use UDP mode
$SMSONLY=x When sms only enable ,unit message report will use SMS to CC(GPRS bin mode been stoped)X=1 set sms only enableX=0 disable sms only
1.3.Device Reset Configuration Commands
Command Description
$CLR By RS232 direct connection only:
Command to clear all device configurations and settings to factorystate.
4
$GKEY By GPRS/ SMS
Command to request an 8-digit/letter encrypted combination keyfrom the device in order to reset all device configurations.
e.g.:After receiving the command, the device will respond with:
$GKEY=2A56POL9OK
This key can be used to generate a pass code through authorizeddealers or manufacturer. Only with the correct pass code you will beable to clear all settings and resume communication abilities.
$CSET=Passcode By GPRS/ SMS
Command to reset all device configurations to factory state, basedon the pass code generated from the $GKEY key.
Passcode: 8-digit/letter combination
e.g.:
$CSET=GH345RT2
After receiving the command, the device will respond with:
CSTOK
1.4. Device Communication Maintenance and Additional Controls
Command Description
$RECONNECT By GPRS/ SMS from Control Base:
Command to request the device to reconnect to Host IP : Port
e.g.:
After receiving the command, the device connect and respond with:
OK
$HB=1,Interval By GPRS/ SMS from Control Base:
Command to configure a heartbeat, in order to maintain acontinuous GPRS session between device and server. If no other
5
communication is active between device and server, when enabled,the device will send a heartbeat message to the server in thespecified interval.
Interval: Heartbeat (in Seconds)Value Range: 10 ~ 65535 sec
Example:
$HB=1,60
- Enable Heartbeat message to server- Send Heartbeat message every 60 sec
$HB? By GPRS/ SMS from Control Base:
Command to query current Heartbeat settings.
e.g.:
After receiving the command, the device will reply with:
$HB=1,60OK
$HB=0 By GPRS/ SMS from Control Base:
Command to disable Heartbeat message.
$MSGQ? By GPRS/ SMS from Control Base:
Command to query the number of messages queued for transmissionfrom the device memory.
If data cannot be sent immediately over GPRS for any reason, thedevice will keep a message queue with data to be transmitted thenext time GPRS and server connection can be established.The device memory can hold up to 500 data messages.
e.g.:After receiving the command, the device will reply with:
$MSG=12OK
(12 data messages are currently queued for transmission)
$MSGQCLR By GPRS/ SMS from Control Base:
Command to clear all data in the message queue from the device
6
memory.
$REBOOT By GPRS/ SMS from Control Base only:
Command to reboot and hardware reset the device after 15sec.
1.5. Device Hardware Settings and Input/ Output Configurations
Command Description$ENG=x By SMS from Control Center or Contact number:
Command to disable and enable the engine
(NOTE: the wireless engine immobilizer relay is to be installed to performthis command)
Engine Immobilizerx=0 --- disable enginex=1 ---- enable engine
$START Enable the engine$STOP Disable the engine
NOTE:If sent by SMS, the device will only accept $ configuration commands from server andauthorized Contact numbers. Commands sent from any other GSM number will be recognizedas text messages and ignored by the unit.
1.6. Tracking – Send Positions, Collect and Configure Position Update Schedules
Command Description2-RING Call(4-10 sec)
From Contact Number :
This feature is only available when contact numbers have beendefined with $RADDLIST command
Hanging up after 2 rings during a call placed from one of theContact Numbers:
- lets the Device send last available GPS position and numberof the inquiring Contact to Control Base
- The Control Base sends text message with location details
7
and security status to the inquiring Contact number.
This feature allows users to inquire for location details simplythrough 2-RING call.
LBS function When GPS not fix ,will send the lat/lon by LBS from GSM loction$GOOGLE By SMS from Contact Number:
When GPS fix will send the GPS lat/lon
Command to get location by sms from unit in GOOLE url format
Such ashttp://maps.google.com/maps?q=25.006937,121.485818
when GPS not fix.
Will send the LBS loction.
ell location :22.591633,113.869286,tolerance:0.000000 metershttp://maps.google.com/maps?q=22.591633,113.869286OK
$GL By SMS from Contact Number:
Command to retrieve the current GPS position and location detailsfrom server.
- lets the Device send last available GPS position and numberof the inquiring Contact to Control Base
- The Control Base sends text message with location detailsand security status to the inquiring Contact number.
$GETPDS By GPRS/SMS from Control Base:
Command to retrieve the current GPS position from the device
After receiving the command, the device will respond with:
$MSG=0001,<GPS_Hour>,<GPS_Minute>,<GPS_Second>,<GPS_Year>,<GPS_Month>,<GPS_Day>,<Latitude>,<Longitude>,<Altitude>,<Speed>,<Direction>,<Odometer>,<HDOP>,<Satellites>,<(Reserved)>,<Vehicle Status>OK
$PDS=1,Interval,MinDistanc,.head
By GPRS/SMS from Control Base:
Command to configure a tracking schedule and parameters in order
8
to report GPS position data to the server.
Interval: Time (in Seconds) to elapse between collecting GPSpositions and send to server.Value range: 0 ~ 65535 sec
MinDistance: Minimum distance (in Meter) necessary to justify anext GPS position update to be reported.Value range: 0 ~ 65535 m
Head : when unit head change over head degreeAfter receiving the command, the device will respond with:OK
Example:
$PDS=1,30,100,5
- Position data schedule shall be activated- Device shall send data every 30 seconds- Device shall only send data, if a minimum of 100m distance
has been travelled
$PDS? By GPRS/SMS from Control Base:
Command to query the current tracking schedule and parameters
e.g.:After receiving the command, the device will respond with:
$PDS=1,30,100OK
$PDS=0 By GPRS/SMS from Control Base:
Command to disable and delete current tracking schedule andparameters.
$RMC Command to get the GPS raw data GPRMC sentence
e.g.After receiving the command, the device will respond with(example):
$GPRMC,040302.663,A,3939.7,N,10506.6,W,0.27,358.86,200804,,*1A
$GGA $GPGGA sentence
9
1.7.GPS – Based Device Configurations and Alarm Settings
Command Description$ODO=Value By GPRS/SMS from Control Base:
Command to manually reset Odometer to a desired value.
x = Odometer start value (in meters)
To clear odometer count, send $ODO=0
$ODO? By GPRS/SMS from Control Base:
Command to query current Odometer value (in meters)
Reply (Example for 34.556km):
$ODO=34556,,
$SALERT=1,speed By GPRS/SMS from Control Base:
Speed ( KM/H)
If over will report$SALERT? By GPRS/SMS from Control Base:
Command to query high speed alert configuration and parameters
e.g.:After receiving the command, the device will respond with:
$SALERT=1,70OK
$SALERT=0 By GPRS/SMS from Control Base:
Command to disable speed alert and delete configuration andparameters
$GFENCE=1,Index,Y1,X1,Y2,X2,Delay,Mode
By GPRS/SMS from Control Base:
Command to setup and enable a new Geo-fence and load itscoordinates to the device (max. 4 areas).A Geo-fence consists of a rectangular area, defined by 2 long/latpoints, X1;Y1 (Left/Up) and X2;Y2 (Right/Down).
Index: Geo-Fence ID ( 1 ~ 4)Y1: Latitude coordinate Left/Up (in Decimal Degrees)
10
X1: Longitude coordinate Left/Up (in Decimal Degrees)Y2: Latitude coordinate Right/Down (in Decimal Degrees)X2: Longitude coordinate Right/ Down (in Decimal Deg.)Delay: Delay time (in Seconds) to elapse before sending a Geo-
fence alarmMode: 0 --- send alarm when entering and exiting Geo-fence area
1 --- send alarm when entering Geo-fence area2 --- send alarm when exiting Geo-fence area
After receiving the command, the device will respond with:OK
Example:
$GFENCE=1,1,22.525911,113.91129851,22.5181149,113.92109628,30,2
- Enable a new Geo-fence area- The Geo-fence ID is ‘1’- The upper left corner latitude is 22.525911 dec deg (22deg
31.5547min)- The upper left corner longitude is 113.91129851 dec deg
(113deg 54.6779min)- The lower right corner latitude is 22.5181149 dec deg (22deg
31.0869min)- The lower right corner longitude is 113.92109628 dec deg
(113deg 55.2658min)- The Delay time to elapse in order to qualify the Geo-fence as
true shall be 30sec- Geo-fence alarms are triggered when long/lat readings are
out of Geo-fence boundaries
$GFENCEQ=Index By GPRS/SMS from Control Base
Command to query Geo-fence settings for individual Geo-fences
Index: Geo-Fence ID ( 1 ~ 4)
Example:
$GFENCEQ=1
ACK:$GFENCE=1,1,22.525911,113.91129851,22.5181149,113.92109628,30,1OK
$GFENCEDEL=Index By GPRS/SMS from Control Base:
Command to delete Geo-fence areas from the list of Geo-fences
11
Index = Geo-fence ID (1 ~4)
To delete complete Geo-fence list, send$GFENCEDEL=A
Example:
$GFENCEDEL=4
- Delete Geo-fence ID #4
1.7. Photo Camera Configurations (optional)
Command Description
$FTP=IP,FolderName,Login,Password
By GPRS/SMS from Control Base
Command to configure the FTP output folder for jpeg images
IP: IP addressFolderName: name of the FTP folder on the FTP siteLogin: login name to access FTP folderPassword: password to access FTP folder
$FTP? Get the FTP Settings
$SNAP By GPRS/SMS from Control Base
Command to trigger one photo shot and send jpeg to dedicated FTPfolder
$PIC=en,t By GPRS/SMS from Control Base
En=0 disableEn=1 enable
T= interval send image (minutes)
Command to configure the camera to shoot one picture every T minto the dedicated FTP folder
1.8.Device Diagnostic and Firmware Upgrade
12
Command Description
$ATI By GPRS/SMS from Control Base or Contact numbers:
Command to query GSM and GPS status and hardware information:FW VERSIONGSM module version- GSM module IMEI- AT command CREG- AT command CSQ- AT command CGATT- GPS GPRMC sentence- GPS Availability
e.g.:
After receiving the command, the device will respond with(example):VT08Revision:1008B15SIM300M32_SST34HF3284IMEI:355689017514051+CREG: 0,2+CSQ: 22,0+CGATT: 0$GPRMC,023307.00,V,,,,,,,050109,,,N*75Not FixedOK
$VER? By GPRS/ SMS from Control Base or Contact numbers:
Command to query the device model and version:
e.g.:
After receiving the command, the device will respond with:
"Device Model Number""Device Hardware Revision""Device Firmware Built Revision"OK
$QALL By GPRS from Control Base or RS232 mode
Command to query all device settings.All relevant $[*]? responds to will be listed one by one
$AD? By GPRS/ SMS from Control Base or Contact numbers:
return
Vbat=415,Vin=1210,AD=1733
13
$C_AT=xx By GPRS/ SMS/ RS232 from Control Base:
GSM module direct diagnostic by transforming AT commands
e.g.:
$C_AT=AT
Device Response:OK
$UPDATE=IP,Port Lets the Device access server and download firmware upgrade file fromspecified host IP and Port.
2. Data Transactions between Control Base and Device
2.1 Data Transactions over GPRS (Binary Mode)
Data received at the TCP or UDP socket on the control base is received as Byte Array in binary
mode.
Each transaction between device and control base requires hand shake protocol, realized through
acknowledgments for commands and data received. Each acknowledgement must include the
proper Transaction ID issued by the sender (Control Base or Device).
If the device does not receive acknowledgement from Control Base after data packet has been
submitted, it will retry sending the same packet 3 times. If unsuccessful, it will assume
connection to host has been lost and try to reconnect to host IP : port.
GPRS data transaction format:
< Transaction ID (2Bytes HHLL>+<Message Encoding type (1Byte)>+<Message Type
(1Byte)>+<Checksum(1Byte)>+<Message Body (nBytes)>
14
2.1.1. GPRS Command Format and Transaction
Command Issued by Control Base (Control Base Device):
<TransactionID>+0x01+0x00>+<Checksum>+<Command String (ASCII)>
Command Acknowledgement by Device (Device Control Base):
<TransactionID>+0x01+0x01+<Checksum>+<Command Ack>
EXAMPLE
Host sends command $GPRSEN=1 (enable GPRS only mode) to device:
Control Base Device
< Transaction ID > 2 bytes the transaction ID is used for “shakehand”,
both Control Base and device mustrespond with corresponding data packetsusing the same transaction ID
Transaction IDs issued by the device willstart with 00 00 (Device Online Reportafter power up) and continue counting foreach new data packet.
<MessageEncoding> 1 byte 0x01 -- this data packet contains acommand string (in ASCII)
0x00 – this data packet contains a binarymessage body (in BIN)
<Message Type> 1 byte 0x00 --- host sends a command to device0x01 --- device replies to a command
from host0x02 --- device reports with a message to
host0x03 --- host replies to the device0x04 --- Batch data upload
<Checksum> 1byte Byte count of following message or databody
<Message Body> n bytes Message or data content
15
6B5C01000E2453414C4552543D312C37300D0A
0x6B5C ID
0x01 command
0x00 host to device
0x0E length of command content
24 53 41 4C 45 52 54 3D 31 2C 37 30 0D 0A:
$ S A L E R T = 1 , 7 0 \r \n
Device Control Base
6B5C0101044F4B0D0A
0x6B5C ID
0x01 command
0x01 unit to host
0x04 length of command reply content from unit to host
4F 4B 0D 0A :
O K \r \n
2.1.2. GPRS Data Packet Format and Transaction
Data packet sent from the device (Device Control Base):
<TransactionID>+0x00+0x02+<Checksum>+ <Message Body>
Acknowledgment from Control Base: (Control Base Device):
<TransactionID>+0x00+0x03+0x02+<Message Ack>
Message Body content included in reports sent by the device:
Each message body contains the following information:
1. Device ID in ASCII (8Bytes)
2. Message ID – see Asynchronous Binary Message Table below
3. Message content (i.a. GPS content, device status, RTC time) – see Asynchronous Binary
Message Table below
Asynchronous Binary Message Table
MessageID Description Message Body (Binary)
16
(BIN)
,<GPS_Hour>,<GPS_Minute>,<GPS_Second>,<GPS_Year>,<GPS_Month>,<GPS_Day>,<Latitude>,<Longitude>,<Altitude>,<Speed>,<Direction>,<Odometer>,<HDOP>,<Satellites>, ,<Reserve_Status>,<Vehicle_Status>,<RTC_Hour>,<RTC_Minute>,<RTC_Seconds>,<RTC_Year>,<RTC_Month>, <RTC_Day>,<Battery Voltage>,<Fuel Voltage>
0x000b Main PowerFailure
0x000c Battery Low
0x0001 Position andDevice statusAlert
,<GPS_Hour>,<GPS_Minute>,<GPS_Second>,<GPS_Year>,<GPS_Month>,<GPS_Day>,<Latitude>,<Longitude>,<Altitude>,<Speed>,<Direction>,<Odometer>,<HDOP>,<Satellites>,<Vehicle Status>,<Fuel Voltage>
0x0012 Position requestthrough 2-RING call
,<GPS_Hour>,<GPS_Minute>,<GPS_Second>,<GPS_Year>,<GPS_Month>,<GPS_Day>,<Latitude>,<Longitude>,<Altitude>,<Speed>,<Direction>,<Odometer>,<HDOP>,<Satellites>,<Vehicle Status>,<CallerID>,<FuelVoltage>
0x0002 Ignition statusalert
,<GPS_Hour>,<GPS_Minute>,<GPS_Second>,<GPS_Year>,<GPS_Month>,<GPS_Day>,<Latitude>,<Longitude>,<Altitude>,<Speed>,<Direction>,<Odometer>,<HDOP>,<Satellites>,<Reserve_Status>,<Vehicle_Status>,<RTC_Hour>,<RTC_Minute>,<RTC_Seconds>,<RTC_Year>,<RTC_Month>,<RTC_Day>,<Fuel Voltage>
0x0005 (SOS) ,<GPS_Hour>,<GPS_Minute>,<GPS_Second>,<GPS_Year>,<GPS_Month>,<GPS_Day>,<Latitude>,<Longitude>,<Altitude>,<Speed>,<Direction>,<Odometer>,<HDOP>,<Satellites> ,<Reserve_Status><Vehicle_Status>,<RTC_Hour>,<RTC_Minute>,<RTC_Seconds>,<RTC_Year>,<RTC_Month>, <RTC_Day>
0x0006 High SpeedAlert
,<GPS_Hour>,<GPS_Minute>,<GPS_Second>,<GPS_Year>,<GPS_Month>,<GPS_Day>,<Latitude>,<Longitude>,<Altitude>,<Speed>,<Direction>,<Odometer>,<HDOP>,<Satellites>,<Reserve_Status>,<Vehicle_Status>,<Fuel Voltage>
0x0008 Geo-fence enteralert
,<GPS_Hour>,<GPS_Minute>,<GPS_Second>,<GPS_Year>,<GPS_Month>,<GPS_Day>,<Latitude>,<Longitude>,<Altitude>,<Speed>,<Direction>,<Odometer>,<HDOP>,<Satellites>,<Reserve_Status>,<Vehicle_Status>,<GeoFence_Index>,<Fuel Voltage>
0x0009 Geo-fence exitalert
,<GPS_Hour>,<GPS_Minute>,<GPS_Second>,<GPS_Year>,<GPS_Month>,<GPS_Day>,<Latitude>,<Longitude>,<Altitude>,<Speed>,<Direction>,<Odometer>,<HDOP>,<Satellites>, ,<Reserve_Status>,<Vehicle_Status>,<GeoFence_Index>,<Fuel Voltage>
Message Body Format (Binary Data) Table
MessageID 2bytes unsigned short
17
GPS Hour 1byte 00-23 (BCD 0x00-0x23)
GPS Min 1byte 00-59
GPS Sec 1byte 00-59
GPS Year 1byte 00-99
GPS Month 1byte 01-12
GPS Day 1byte 01-31
Latitude 4bytes signed int 0.00001 degree unit
Longitude 4bytes signed int 0.00001 degree unit
Altitude 3bytes singed int Meters
Speed 2bytes unsigned short , 0.1 knot per hour unit
Direction 2bytes unsigned short , 0.1 degree units
Odometer 4bytes unsigned int Meters
HDOP 1byte 0.1 unit
Satellites 1byte unsigned char ,number of Satelite
(Reserved) Status 1 byte Not assigned
Vehicle Status 1byte same as SMS vehicle status definitions
RTC Hour 1byte 00-23 (BCD 0x00-0x23)
RTC Minute 1byte 00-59
RTC Seconds 1byte 00-59
RTC Year 1byte 00-99
RTC Month 1byte 01-12
RTC Day 1byte 01-31
GeoFence Index 1byte 1-4
Maximum Speed 2byte unsigned short,0.1 meters per second units
Battery Voltage 2byte unsigned short , mV
Caller ID 16bytes 16Byte caller ID (ASCII)
Fuel Voltage 2bytes Unsigned short ,mV
Message Ack content replied by the Control Base:
18
Each message received from the device must be replied with an acknowledgement by the Control
Base, including Transaction ID (corresponding to Transaction ID issued by device):
0x0000 = Message received successfully (‘OK’)
0x0001 = Message not received properly (‘ERROR’)
EXAMPLE for Device Online Report (HEX format)
A Device Online Report is issued each time the device is powered up and connects to Host IP :
Port
Device Control Base
00 00 00 02 10 30 30 30 30 30 32 35 31 00 0F 03 02 09 09 05 13
00 00: Transaction ID =0
00 : the content of the data packet is binary data
02 : message type: device sends message to host
10 : Checksum 0x10= 16 Byte
30 30 30 30 30 32 35 31 00 0F 03 02 09 09 05 13 : Message body (length=16)
Message Body:
30 30 30 30 30 32 35 31 : Device ID in ASCII = 00000251
00 0F : Message ID is 0x000f (Device Online report)
03 03 09 : RTC time in hhmmss
09 05 13 : RTC date in yymmhh
Host acknowledgment to above Online Report:
Control Base Device
00 00 00 03 02 00 00
00 00: Transaction ID =0, corresponding to Online Report ID sent by device
00 : the content of the data packet is binary data
03 : host reply to the device
02 : Checksum =2
00 00: Message Ack (00 00 means: “OK”; 00 01 means: “ERROR”)
EXAMPLE for Ignition On/Off Report:
Device Control Base
19
00 01 00 02 2f 30 30 30 30 30 32 35 31 00 02 03 36 56 09 05 13 00 22 5D 2D 00 AD D3
EE 00 00 84 00 00 04 45 00 00 00 00 25 05 55 47 03 36 58 09 05 13 1234
00 01: transaction id = 0x0001 (the second packet)
00 : shows the content of the data packet is bin data
02 : device reports to host
2f : Checksum 0x2f=47
30 30 30 30 30 32 35 31 00 02 03 36 56 09 05 13 00 22 5D 2D 00 AD D3 EE 00 00 84
00 00 04 45 00 00 00 00 25 05 55 47 03 36 58 09 05 13 1234 : Message body (length =
45 Bytes)
30 30 30 30 30 32 35 31 : Device ID (ASCII =00000251)
00 02 : message ID (ignition report)
03 36 56 : GPS time hhmmss
09 05 13 : GPS date yymmdd
00 22 5d 2d : latitude 0x00225d2d =2252077-->
2252077/100000=22.52077
00 AD D3 EE : longitude 0x00add3ee =11391982
-->11391982/100000=113.91982
00 00 84 : altitude = 0x000084 = 132 m
00 00 : speed = 0x0000 = 0.0 knot
04 45 : direction =0x0445 = 1093 ->1093/10=109.3 deg
00 00 00 00 : odometer count = 0x00000000 =0 m
25 : HDOP = 0x25=37-->37/10=3.7
05 : satellite count= 0x05 = 5 satellites
0x55 : (reserved, not in use)
0x47 : device status 0x47 = 01000111
bit0=1/0 external power off/on
bit1=1/0 device been moved/not moved
bit2=1/0 ignition on/off
bit3=1/0 sos pushed on/off
bit6=1/0 gps fix/not fix
03 36 58 : RTC time in hhmmss
09 05 13 : RTC date in yymmdd
1234 ad value (mv)4660mv
Host acknowledgement to ignition report(hex):
Control Base Device
00 01 00 03 02 00 00
20
00 01 : transaction ID =1 corresponding to Ignition report ID sent by device
00 : the content of the data packet is binary data
03 : host reply to the device
02 : Checksum =2
00 00: Message Ack (00 00 means: “OK”; 00 01 means: “ERROR”)
2.1.3. Batch Data Upload – Message Type 0x04
The device will store data not able to be sent over GPRS in a message queue of up to 500
messages, and upload this data to Control Base the next time a connection can be established.
If large amounts of data (e.g.: message queue) are uploaded from the device memory to the
server, data packets will be sent continuously in batches, in order to reduce upload time. Each
data packet is identified through Message ID and Message Type 0x04.
If a Control Base acknowledgement is not received for a data batch, the device will retry sending
the same packet for 3 times, then abort and return to normal operation.
For message queues < = 100:
Device Control Base
<Packet #0>; <Packet #1>; <Packet #3>; … ; <Packet #x>; <Packet Header>
Control Base Device
<TransactionID of last received Packet Header>+0x00+0x03+0x02+<Message Ack>
For message queues > 100:
Device Control Base - Data Batch 1:
<Packet #0>; <Packet #1>; <Packet #3>; … ; <Packet #99>; <Packet Header>
Control Base Device
<TransactionID of last received Packet Header>+0x00+0x03+0x02+<Message Ack>
Device Control Base – Data Batch 2:
<Packet #100>; <Packet #101>; <Packet #103>; … ; <Packet #199>; <Packet Header>
Control Base Device
<TransactionID of last received Packet Header>+0x00+0x03+0x02+<Message Ack>
Device Control Base – Data Batch 3:
<Packet #200>; <Packet #201>; <Packet #203>; … ; <Packet #299>; <Packet Header>
21
Control Base Device
<TransactionID of last received Packet Header>+0x00+0x03+0x02+<Message Ack>
Device Control Base – Data Batch 4:
<Packet #300>; <Packet #301>; <Packet #303>; … ; <Packet #399>; <Packet Header>
Control Base Device
<TransactionID of last received Packet Header>+0x00+0x03+0x02+<Message Ack>
Device Control Base – Data Batch 5:
<Packet #400>; <Packet #401>; <Packet #403>; … ; <Packet #499>; <Packet Header>
Control Base Device
<TransactionID of last received Packet Header>+0x00+0x03+0x02+<Message Ack>
Mass Data Upload Process:
a) Data packets in Message Queue < / = 100
Device Control Base
Device Online Report:
0x00+0x00+0x02+<Checksum>+ <Message Body>
Control Base Device
0x00+0x00+0x03+0x02+<Message Ack>
Device Control Base
Batch Data Upload:
0x00+0x00+0x04+<Checksum>+<MessageBody>+0x01+0x00+0x04+<Checksum>+<
Message Body>+0x02+0x00+0x04+<Checksum>+<Message Body>+ …
+0x99+0x00+0x04+<Checksum>+<Message Body>+<Transaction ID>+0x00+0x04
Control Base Device
<TransactionID of last received packet header>+0x00+0x03+0x02+<Message Ack>
b) Data packets in Message Queue > 100
Device Control Base
Device Online Report:
0x00+0x00+0x02+<Checksum>+ <Message Body>
22
Control Base Device
Acknowledgement:
0x00+0x00+0x03+0x02+<Message Ack>
Device Control Base
Batch Data Upload:
Data Batch 1:
0x00+0x00+0x04+<Checksum>+<MessageBody>+0x01+0x00+0x04+<Checksum>+<
Message Body>+0x02+0x00+0x04+<Checksum>+<Message Body>+ … +<Transaction
ID>+0x00+0x04+<Checksum>+<Message Body>+<Transaction
ID>+0x00+0x04
Control Base Device
<TransactionID of last received packet header>+0x00+0x03+0x02+<Message Ack>
Device Control Base
… continues with next data batch
EXAMPLE:
1.1. Online Report:
Device Control Base:
00 00 00 02 10 30 30 30 30 30 32 35 31 00 0F 02 11 18 09 06 16
Control Base Device:
00 00 00 03 02 00 00
1.2. Batch Data Upload:
Device Control Base:
00 00 00 04 40 30 30 30 30 30 32 35 31 00 01 01 54 23 09 06 16 00 22 5C F6 00 AD D3 D1
00 00 34 00 00 00 00
00 00 00 00 2D 03 55 43 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00
00 01 00 04 40 30 30 30 30 30 32 35 31 00 01 01 54 48 09 06 16 00 22 5C F6 00 AD D3 D1
00 00 34 00 00 00 00
00 00 00 00 2D 03 55 43 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00
00 02 00 04 40 30 30 30 30 30 32 35 31 00 01 01 55 13 09 06 16 00 22 5C F6 00 AD D3 D1
00 00 34 00 00 00 00
00 00 00 00 2D 03 55 43 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00
00 03 00 04 40 30 30 30 30 30 32 35 31 00 01 01 55 55 09 06 16 00 22 5C F6 00 AD D3 D1
00 00 34 00 00 00 00
23
00 00 00 00 4A 04 55 43 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00
00 04 00 04 40 30 30 30 30 30 32 35 31 00 01 01 56 23 09 06 16 00 22 5C F6 00 AD D3 D1
00 00 34 00 00 00 00
00 00 00 00 49 05 55 43 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00
...
...
...
00 32 00 04 40 30 30 30 30 30 32 35 31 00 01 02 21 34 09 06 16 00 22 5C F6 00 AD D3 D1
00 00 34 00 00 00 00
00 00 00 00 2E 06 55 43 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00
00 33 00 04 40 30 30 30 30 30 32 35 31 00 01 02 22 01 09 06 16 00 22 5C F6 00 AD D3 D1
00 00 34 00 00 00 00
00 00 00 00 2D 06 55 43 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00
00 34 00 04 00
Key:
Packet #0:
00 00 00 04 40 30 30 30 30 30 32 35 31 00 01 01 54 23 09 06 16 00 22 5C F6 00 AD D3 D1
00 00 34 00 00 00 00
00 00 00 00 2D 03 55 43 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00
Transaction ID :00 00
Message Encoding:00
Message Type:04
Checksum:0x40=64
Message Body: 30 30 30 30 30 32 35 31 00 01 01 54 23 09 06 16 00 22 5C F6 00 AD D3 D1
00 00 34 00 00 00 00
00 00 00 00 2D 03 55 43 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00
Packet #1
Packet #2
...
Packet#51(0x33):
24
00 33 00 04 40 30 30 30 30 30 32 35 31 00 01 02 22 01 09 06 16 00 22 5C F6 00 AD D3 D1
00 00 34 00 00 00 00
00 00 00 00 2D 06 55 43 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00
Packet Header: 00 34 00 04 00
If Control Base replies with correct Message ID in acknowledgement , the device will delete
the successfully uploaded data batch from device memory, and return to normal program.
If no acknowledgement is received, the device will retry thrice to get acknowledgement:
00 34 00 04 00
00 34 00 04 00
00 34 00 04 00
If there is still no acknowledgement from Control Base received, the device will abort the data
upload and return to normal program, without deletion of data batch.
2.2. Data Transactions over SMS (SMS only Mode)
Commands sent and data is received as text SMS. Reports and alerts can be configured according
to user preferences.
SMS command format:
<Command>
SMS message format:
$MSG=<MessageID>,<MessageBody(ASCII)>
2.3.1. SMS Command Format and Transaction
All commands are sent as text SMS to the device (see command list in chapter 1 for details):
Control Base Device:
<Command>
Device Control Base:
“OK” - for successfully received and executed configuration commands
“ERROR” - for erroneous or defect commands
<Status> - for diagnostic and status queries
25
<Command String>+0x0d+0x0a"OK"+0x0d+0x0a - for initial command queries
EXAMPLE for SMS command transaction:
Speed Alert Settings:
Control Base Device:
$SALERT=1,60<0x0d0x0a>
Device Control Base:
OK<0x0d0x0a>
2.3.2. SMS Report Format
When User Set $SMSONLY=1 ,device will send message with txt to CC number
And the GPRS (bin mode stoped)
Message Report Structure:
$MSG=<MessageID>,MessageBody(ASCII)
List of SMS Message IDs and Message Body Contents
MessageID Description Message Body (ASCII)
000b Main PowerFailure
,<GPS_Hour>,<GPS_Minute>,<GPS_Second>,<GPS_Year>,<GPS_Month>,<GPS_Day>,<Latitude>,<Longitude>,<Altitude>,<Speed>,<Direction>,<Odometer>,<HDOP>,<Satellites>, ,<Reserve_Status>,<Vehicle_Status>,<RTC_Hour>,<RTC_Minute>,<RTC_Seconds>,<RTC_Year>,<RTC_Month>, <RTC_Day>,<Battery Voltage>,<Fuel Voltage>
000c Battery Low
0001 Position andDevicestatus Alert
,<GPS_Hour>,<GPS_Minute>,<GPS_Second>,<GPS_Year>,<GPS_Month>,<GPS_Day>,<Latitude>,<Longitude>,<Altitude>,<Speed>,<Direction>,<Odometer>,<HDOP>,<Satellites>,<Vehicle Status>,<Fuel Voltage>
0012 Positionrequestthrough$GLcommand
,<GPS_Hour>,<GPS_Minute>,<GPS_Second>,<GPS_Year>,<GPS_Month>,<GPS_Day>,<Latitude>,<Longitude>,<Altitude>,<Speed>,<Direction>,<Odometer>,<HDOP>,<Satellites>,<Vehicle Status>,<CallerID>,<Fuel Voltage>
0002 Ignitionstatus alert
,<GPS_Hour>,<GPS_Minute>,<GPS_Second>,<GPS_Year>,<GPS_Month>,<GPS_Day>,<Latitude>,<Longitude>,<Altitude>,<Speed>,<Direction>,<Odometer>,<HDOP>,<Satellites>,<Reserve_Status>,<Vehicle_Status>,<RTC_Hour>,<RTC_Minute>,<RTC_Seconds>,<RTC_Year>,<RTC_Month>,<RTC_Day>,<Fuel Voltage>
26
0005 ACC2 Alert(SOS)
,<GPS_Hour>,<GPS_Minute>,<GPS_Second>,<GPS_Year>,<GPS_Month>,<GPS_Day>,<Latitude>,<Longitude>,<Altitude>,<Speed>,<Direction>,<Odometer>,<HDOP>,<Satellites> ,<Reserve_Status><Vehicle_Status>,<RTC_Hour>,<RTC_Minute>,<RTC_Seconds>,<RTC_Year>,<RTC_Month>, <RTC_Day>,<Fuel Voltage>
0006 High SpeedAlert
,<GPS_Hour>,<GPS_Minute>,<GPS_Second>,<GPS_Year>,<GPS_Month>,<GPS_Day>,<Latitude>,<Longitude>,<Altitude>,<Speed>,<Direction>,<Odometer>,<HDOP>,<Satellites>,<Reserve_Status>, <Vehicle_Status>,<Fuel Voltage>
0008 Geo-fenceenter alert
,<GPS_Hour>,<GPS_Minute>,<GPS_Second>,<GPS_Year>,<GPS_Month>,<GPS_Day>,<Latitude>,<Longitude>,<Altitude>,<Speed>,<Direction>,<Odometer>,<HDOP>,<Satellites>,<Reserve_Status>,<Vehicle_Status>,<GeoFence_Index>,<Fuel Voltage>
0009 Geo-fenceexit alert
,<GPS_Hour>,<GPS_Minute>,<GPS_Second>,<GPS_Year>,<GPS_Month>,<GPS_Day>,<Latitude>,<Longitude>,<Altitude>,<Speed>,<Direction>,<Odometer>,<HDOP>,<Satellites>, ,<Reserve_Status>,<Vehicle_Status>,<GeoFence_Index>,<Fuel Voltage>
Message Body Format (ASCII) Table
<GPS_Hour> 00-23 (BCD 0x00-0x23)
<GPS_Minute> 00-59
,<GPS_Second>, 00-59
<GPS_Year>, 08-15
<GPS_Month> 01-12
,<GPS_Day> 01-31
<RTC_Hour>, 00-23
<RTC_Minute>, 00-59
<RTC_Seconds> 00-59
<RTC_Year>, 08-15
<RTC_Month>, 01-12
<RTC_Day> 01-31
<Latitude> ±##.#### latitude in decimal degree
<Longitude> ±##.#### longitude in decimal degree
<Altitude> ##### Altitude in meters
27
<Speed>, ###.# Speed (knot/h)
<Direction>, ###.# Direction in decimal degrees
<Odometer> ####### Odometer in meters
<HDOP> ##.# HDOP in decimal units
<Satellites> ## Number of Satellites
<Reserve_Status> ## for vehicle status reserve
<Vehicle_Status> ## hex value of Vehicle StatusBit0: 1(external power off)/0 (external power on)Bit1: 1(move on)/0 (not move)Bit2: 1(acc on)/0(acc off)Bit3:Bit4:Bit5:Bit6: 1(gps fix) /0(no fix)Bit7:
<Fuel Voltage> #### 0-2048 (mV)
callerid 16byte ascii caller phone number
EXAMPLE:
DeviceControl Base
$MSG=0002,14,45,23,08,09,10,11.2222,22.3333,67,10.0,111.2,12544,3.5,6,55,03,01,02,03,08,0
9,11,356<0x0d0x0a>
$MSG=------------- SMS message header flag
0002---------------- Message ID
14------------------- GPS hours (BCD 0x01)
45------------------- GPS minutes
23------------------- GPS seconds GMT Time: 14:45:23
08------------------- GPS year
09------------------- GPS Month
10------------------- GPS Day Date: 2008-09-10
111.2222------------ Latitude 111 deg 13.3320 min
22.3333------------ Longitude 22 deg 19.9980 min
28
67-------------- Altitude (in meters)
10.0---------------- Speed 36 km/h
111.2-------------- Direction
12544------------- Odometer value
3.5 --------------- HDOP
6-----------------Satellite Numbers
55----------------(Reserved) status 0x55
3-----------------Vehicle status 0x03=B00000011 : external power is on, shock (movement) is
detected
01----------------RTC hours(BCD 0x01)
02----------------RTC Min
03----------------RTC sec
08----------------RTC Year 2008
09----------------RTC Month
11----------------RTC Day
356--------------Fuel voltage
0x0d0x0a-------Message end flag
3. Firmware Upgrade
3.1. UPDATE Command
$UPDATE=IP,Port
IP------upgrade server host ip
Port----upgrade server host port
1.2. Standard Package from device to indicate online status
This package is used to inform the control base that the device is online and includes task indicators
Format:
<Header><UIDLEN><UID><PUID><Checksum><Tail>
<Header> ---- Use “%” as package header
<UIDLEN> ----Unit ID Length; Max is “10”(in HEX, f.e. If UIDLEN is 16 digits,then UIDLEN = 10)
<UID> ----- Unit ID: 16 digitals (in HEX)
e.g if Unit Id=”12345678” then <UID>=”303132333435363738”
<PUID> ---- Packet ID
------- 2c: device(updatesim908vt07.hex) requests firmware upgrade
-------- 0F: device will go offline
<Check Sum> --- the total checksum summery including header
29
1.3. Firmware Upgrade Data Exchange
The following packages are passed between device and Control Base during GPRS session and include
new firmware data components and acknowledgments.
3.3.1. Device Control Base: acknowledge and request for new package
Format:
<Header><UPSTATUS><UPINDEX><CheckSum><Tail>
<Header> -------- Device uses “$” as header
<UPSTATUS> ------- Firmware upgrade status (01, 02, 03)
01: request upgrade package index
02: firmware upgrade completed
03: firmware upgrade failed
Note: If the GPRS session gets disconnected before completion of firmware upgrade,
the 02/ 03 upgrade status may not be sent.
<UPINDEX> --------Request upgrade data package index in HEX (such as 000F)
<CheckSUM>--------Checksum of chars except <Tail>
<Tail> --------- -------0x0D0x0A
3.3.2. Control Base Device: send new firmware data package
Format:
<Header><Line ID><Data Len><UPDATA><CHECKSUM>
<Header> ------ $FFFF , upgrade package data from Control Base to device
<Line ID> ------ 4 hex character digits; index of firmware data package according to
UPINDEX
<Data Len> ----- 2 hex character digits, the length of each data package.
We have found that 192 bytes per upgrade data package gives the fastest results
<UPDATA> ---- firmware upgrade data body (192 Bytes)
Note: upgrade data does not use text characters, but hex characters.
<CHECKSUM> --- 2 hex characters
The last upgrade package shall end with a full package line of UPDATA including no less than 32 0xFF.
This indicates that transfer of upgrade packages has been completed.
The device shall go offline and reprogram firmware.
Firmware Upgrade .HEX file (extract):
:10000000A8161AB92F947929692899B9195F692905
:10001000792899B96B11C5BBC6BBA9DA01A9D87287
:10002000B971E2B91A015F4445A9818ADBB7B45486
:10003000CBBAB5B252CB49B13B5499B96E352BB95B
30
:1000400034A987772BB96FA9E513184B2BB94DBF6A
:100050004BA9E6ED40C1B9C223A98435C1CEC2E6BF
:10006000A9AC17DB89A9ADEDA9A0F0CBB8B9A8C333
:10007000C6B3C4BFC5BBA96A28A9E088A9E78D189D
:100080005B44682FB3FBBDC5B3C4B33BBB54A9E4EF
:1000900021A97216B9BA19C1CEC2D8A9AC17DB946A
:1000A000A9E12DA9E44AC6BFC7BBA97115C044C171
:1000B000C8C241A9E1CFC1CEC2E6A9E7A9A9E12D33
:1000C0002BB82CA98777A9E0E6A9D0ADB9B94DC11B
:1000D000CEC2D2A9AC5ECBB8B9BA1EA9ADEDA9A0F5…………:10D900004DA34D998BACB8A9791099DACFB6BBF4D5
:02D91000F0BBCA
:00000001FF
10: the first two chars referring to one line data len=0x10(16) bytes
0000 : The next 4 characters are referring to data store Address in Device
00: the next 2 chars not used
A8161AB92F947929692899B9195F6929 : One line of 32 characters/ 16 Bytes firmware data.
Since every line includes16 Bytes, we can send altogether 12 lines per data package to obtain 192 Bytes
of data.
05 : the last 2 characters is the checksum
:00000001FF : the end address and line shall be ignored for OTA firmware upgrades.
To complete 197 Bytes of data, 0xFF shall be added to the end of firmware data until all 6 lines are filled.
If the full data package does not include at least 32 Bytes 0xFF, a new package has to be sent, consisting
of 197 Bytes 0xFF
3.4. Example for Firmware Upgrade:
3.4.1. To start the upgrade, the server shall send SMS or GPRS command to device, using authorized CC
number, in order to let the device go online through GPRS.
String:
$UPDATE=IP,PORT
31
3.4.2. After connection has been established, the device shall start the session by sending one standard
package
Format:
<Header><UIDLEN><UID><PUID><CHECKSUM><Tail>
<Header> -- %
<UIDLEN>-- 10 16
<UID>--3030303030333631 “00000251”
<PUID>--2c 0x2c means vt07 sim908
< CHECKSUM >-- 0x1d
<Tail> -- 0x0D0x0A
String:
%1030303030303336312C1D(0x0d0x0a)
3.4.3. The device shall now request the first package from server:
<Header><UPSTATUS><UPINDEX><Tail>
<Header>--$
<UPSTATUS> --01
<UPINDEX>--0000
<CheckSUM>--45
<Tail>--0x0D0x0A
String:
$01000045(0x0d0x0a)
3.4.4. As a response, the Control base will send the first 192 bytes of upgrade data to the device.
<Header><Line ID><Data Len><UPDATA><CHECKSUM>
<Header> ------ $FFFF
<Line ID> ------ 0001 means the first index of package
<Data Len> ----- C0 = 192 means this package has 192 bytes
<UPDATA> ----- [XXXXXXXXXXXXXXXXXX……XXXXXXXXX]
( [XXXX] shall stand for 192 Bytes of data in hex )
<CHECKSUM> --- AA,2 hex character digit
String:
$FFFF0000C0[0xA80x160x1A0xB90x2F0x940x790x290x690x280x990xB90x190x5F0x690x290x05
32
…………………………………………..
0xC80xC20x410xA90xE10xCF0xC10xCE0xC20xE60xA90xE70xA90xA90xE10x2D0x33] AA
3.4.5. If the package has been received successfully, the device shall respond and request next package:
$01000146(0x0d0x0a)
3.4.6. Now, the server shall continue sending:
String:
$FFFF0001C0[0x B20x 5B0x 0F0x 8B0x BE0x 790x A20x A90x C10x 220x 8B0x 1D0x B80x B90x B50x 9B0x
B90x B60x 590x A90x 880x AB0x DB0x B80x B90x B50x 9B0x 180x 5B0x DF0x FF0x DB
………………………………………………]BB
Until the complete firmware has been sent ……
3.4.7. The last package sent by the server shall end with at least 32 0xFF. Every data package can contain
a maximum of 6 lines. At least one line shall be added with 32 0xFF at the end of the last package.
String:
$FFFF000nC0[0x ……………….0x A90x C10x B80x B90x CC0x AE0x C30x C40x 5F0x 4D0x 630x 460x CE0x
3A0x C20x B90x AC0x 4B0x C40x B60x A90x C30x 6C0x C40x B10x B90x C30x 6C0x 440x
070xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xF
F0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF]nn
If there is not enough space left to complete one full line with 32 0xFF, another package shall be sent with
192 Bytes 0xFF:
String:
$FFFF000nC0[0xFF0xFF0xFF0xFF…0xFF0xFF0xFF]nn
The Device will recognize that the last data package has been sent and go offline.
Send the string to control Base
String:
$0286(0x0d0x0a)