Concox GK301 Protocol_V1.4 0129
-
Upload
puguhwah123 -
Category
Documents
-
view
105 -
download
8
Transcript of Concox GK301 Protocol_V1.4 0129
-
Shenzhen Concox Information Technology Co., Ltd
GK301 GPS Kids Phone
Communication Protocol
_____________________________________________ Copyright
This document is the confidential source of Cothinking. Without the written consent of Cothinking, the action that anybody or company copy, disclose, or distribute information of this document to any person or company is prohibited.
VersionV1.4
Confidential
-
- 1 -
GS503
CATALOGUE
1. COMMUNICATION RULES......................................................................... 3
1.1 INTRODUCTION ..................................................3 1.2 EMC...................................................................................................... 3
2. TERMS AND DEFINITIONS ........................................................................ 3
3. BASIC RULES............................................................................................. 4
4. DATA-PACKAGE FORMAT......................................................................... 6
4.1. START BIT................................................................................................. 6 4.2. PACKAGE LENGTH ..................................................................................... 6 4.3. PROTOCOL NUMBER .................................................................................. 6 4.4. INFORMATION SERIAL NUMBER.................................................................... 6 4.5. INFORMATION CONTENT............................................................................. 7
4.5.1.Login Package .................................................................................. 7 4.5.2.GPS Package ................................................................................. 8 4.5.3.LBS Package .................................................................................... 9 4.5.4.GPSLBS Combine Package........................................................ 10 4.5.5 Status Package............................................................................... 10 4.5.6 LBS extension package .................................................................. 11 4.5.7 GPSLBSStatus Combined package......................................... 11 4.5.8 LBSTelephone Number Address searching Package.................. 12 4.5.9 LBSTelephone Number Address searching Package.................. 12 4.5.10 GPSTelephone Number Search Address Package ................... 12 4.5.11 Satellite signal noise ratio information........................................... 14 4.5.12 The Instruction from Server to deviceSet Instruction ............. 15 4.5.12.The Instruction from server to deviceQuery Instruction ......... 17 The instruction of the Login Package Switching and Status Package Switching 18
5 ERROR CHECK ......................................................................................... 19
6 STOP BITS ................................................................................................. 19
7 NOTE A CRC-ITU CHECKING TABLE C LANGUAGE CODE FRAGMENT20 8 NOTE B PACKAGE COMPLETE FORMAT............................................... 21
-
- 2 -
GS503
1. Communication Rule 1.1 Instruction
This article defines the instruction of the protocol between GPS car tracker, tracking service platform and application layer interface.
1.2 EMC
The platform version is suitable for GK301 platform version. 2. Term and definition
termA.D. English meaning
CMPP China Mobile Peer to Peer GPS Global Positioning System
GSM Global System for Mobile Communication GPRS General Package Radio ServiceTCP Transport Control Protocol LBS Location Based Services
IMEI International Mobile Equipment Identity MCC Mobile Country Code MNC Mobile Network Code LAC Location Area Code CI Cell ID
RSSI Received Signal Strength Indicator UDP User Datagram Protocol SOS Save Our Ship/Save Our Souls CRC Cyclic Redundancy Check NITZ Network Identity and Time Zone,GIS Geographic Information System
-
- 3 -
GS503
3. Basic rule 1. The equipment starts login package default sending and waits for the confirmation of the server.
2 .After the connections normally establish and GPS information change, the device will regularly send GPS, LBS combined package or separately send GPS package and LBS package to the server, then sever can set the defaulted sending protocol in according with the instruction.
3. In order to protect the validity of connectionsthe device will send status information to server at fixed intervals then the server return responding package switching for confirmation.
-
- 4 -
GS503
GK301 Basic work procedure
Login package
Activate
GPS searching GPRS connecting LBS preparation
GPS locating package
Receive server respondsLogin succeed
GPS chip sleep
LBS extended
package
LBS information
varied
-
- 5 -
GS503
4 Data-package format Communication transmission is in asynchronous mode and takes byte as unit. It
transfers serial data stream of every uncertain length data package between device and server Data package length10+NByte
Format Start Bit Package
Length
Protocol
number
Information
content
Information
serial
number
error
checking Stop Bit
Length(Byte) 2 1 1 N 2 2 2
4.1 Start bit
Fixed valueunified by hexadecimal.0x78 0x78
4.2 Package length Length=Protocol number + Information content + information serial number +error check,5+NByte in total, as the information Content is uncertain length data. 4.3 Protocol number
The different protocol numbers are according to different information content. Type Value
Login package 0x01 GPS package 0x10 LBS package 0x11
GPSLBS combined package 0x12
Status package 0x13 Satellite signal noise ratio
package 0x14
Character string package 0x15 GPSLBSstatus combined
package 0x16
LBStelephone number address searching package 0x17
LBS extension package 0x18 LBS status
combined package 0x19
GPStelephone number address searching package 0x1A
Server send instruction to device packagesetting 0x80 Server send instruction to
device packageSearching 0x81 4.4 Information serial number
-
- 6 -
GS503
After turning on the device, it will send the first item of GPRS data (including heartbeat package and GPS/LBS data package); the serial number of this item is 1. After that, the serial number will be added on by 1 automatically at every sending process (including heartbeat package and GPS/LBS data package). 4.5 Information content Connect to different application. Correspond to the protocol number and confirm the specific content. 4.5.1 Login package
Info content Format Device
ID Type identity code
Length 8 2 Login Information Package is used to confirm whether the connection is normal and submit device ID to server. 4.5.1.1 Information content 4.5.1.1.1 Device ID
Device ID users 15 digits of IMEI number. For example123456789012345 Device ID0x01 0x23 0x45 0x67 0x89 0x01 0x23 0x45
4.5.1.1.2 Type identity code Type identity code occupies 2 bytes. The type of the device can be judged on the
basis of this identity code. For exampleGS503 LBS version Type identity code0x10 0x09 For exampleGS503 GPS version Type identity code0x10 0x06
4.5.1.2 Server response For example Device->Serverhere the device ID is 123456789012345
0x78 0x78 0x0D 0x01
0x01 0x23 0x45 0x67 0x89 0x01 0x23 0x45
0x10 0x04
0x00 0x01
0x8C 0xDD
0x0D 0x0A
Start bit length Protocol number Device ID Identity code
Serial Number
CRC verify End bit
Server-> Device:The protocol number in response package are the same as the one has been sent by device.
0x78 0x78 0x05 0x01 0x00 0x01
0xD9 0xDC
0x0D 0x0A
Start bit Length Protocol number Serial
Number CRC verify End bit
-
- 7 -
GS503
4.5.2 GPS information package Information content GPS information
Format Date and Time
GPS information length and
satellites involved in locating
Latitude Longitude Speed Course
and status
Reserved
extension bit
Length (Byte) 6 1 4 4 1 2 N
4.5.2.1 Date and time
Format Year Month Day Hour Minute Second Length (Byte) 1 1 1 1 1 1
For example3:50:23 a.m. Mar 23rd 2010 The value0x0A 0x03 0x17 0x0F 0x32 0x17 4.5.2.2 GPS information lengththe number of the satellites involved in locating
1 byte converts to binary 8 bit, the first 4 bit means GPS info length, the late 4 bit means number of satellite involved in locating.
Note: The length includes 1 byte occupied by itself. For example: 0x9C means GPS information length is 9 bytes, the number of satellite involved in
locating is 12. 4.5.2.3 Latitude
Occupy 4 bytes, representing the latitude value. Number range is from 0 to 162000000, which represents the range form 0to 90.Unit: 1/500 second
Conversion method: A Convert the latitude (degrees, minutes) data from GPS module into a new form which
represents the value only in minutes; B Multiply the converted value by 30000, and then transform the result to hexadecimal number For example2232.7658,226032.765830000=40582974,then convert it to hexadecimal
number 0x02 0x6B 0x3F 0x3E
4.5.2.4 Longitude Occupy 4 bytes, representing the longitude value of location data. Number ranges
from 0 to 324000000, representing the range form 0to 180.Unit: 1/500 seconds, Conversion method is the same as latitudes.
4.5.2.5 Speed
Occupy 1 bytes, representing the speed of the device; ranges from 0 to 255,Unit: kilometer/hour.
4.5.2.6 Status/Course
Occupy 2 bytes; representing the moving direction of the device; ranges from 0-360;
-
- 8 -
GS503
unit: degree, regards due north as 0 degree; clockwise. One byte is composed of eight binary. In the first byte, the first six binary represents
status. The last two binary and the whole eight binary in the second byte (10 binary in total) represents course
First byte Second byte 8 7 6 5 4 3 2 1 8 7 6 5 4 3 2 1
undefined
undefined
Real tim
e/gap G
PS
GP
S location
fixed or not
East
longitude
west
longitude
South
latitude
north latitude
course
0South latitude 1North latitude 0East longitude 1West longitude 0GPS has not located 1GPS has located 0Real time GPS 1Different GPS
Note: The status information refers to the status in a certain time For example: 0x05 0x4C convert to binary 00001010 1001100, representing GPS
has located real time GPSnorth longitudeeast latitudeCourse 332
4.5.2.7 Reserved bit The reserved bit is 2byte. 4.5.2.8 Server response
No need to respond server. 4.5.3 LBS information Package
Content LBS information Format Date & Time
MCC MNC LAC Cell IDReserved extend byte
Length(Byte) 6 2 1 2 3 N 4.5.3.1 Date& Time
The same as corresponding format in part of GPS information
4.5.3.2 MCC Affiliated country code of mobile user is Mobile Country Code (MCC). MMC of China
is 460(decimal) Value ranges from 0x0000 to 0x03E7 MMC of China is 0x01 0xCC (460 decimal convert to hex)
4.5.3.3 MNC China Mobile Network Code (MNC) is 0x00
4.5.3.4 LAC Location Area Code (LAC) is included in LAI. It is composed of 2 bytes with hex code,
-
- 9 -
GS503
ranges from 0x00010xFFFE(not include 0x0001 and 0xFFFE). One location area can contain one or more areas.
4.5.3.5 Cell ID
Cell Tower ID (Cell ID) ranges from 0x000000 to 0xFFFFFF
4.5.3.6 Reserved bit The reserved bit is 2byte. 4.5.3.7 Server response
No need to response server
4.5.4 GPSLBS combined information Information content
GPS information LBS information
Reserved
extension bit
Format Data
& time GPS
information length
number of satellite
latitude
longitude
speed
Status
course
Reserved
extension bit
MCC
MNC
LAC
CI
Length(Byte)
6 1 4 4 1 2 M 2 1 2 3 N
As for each parameter, please refer to previous explanation 4.5.5 Status package
Content
Format Device information
Voltage degree
GSM signal strength degree
Reserved extent byte
Length(Byte) 1 1 1 N 4.5.5.1 Device information
Occupy 1 byte, representing sundry status information of the device. Regard 1 byte as 8bits, the lowest bit is 0, the highest is 7. In the process of the data transmitting, the high one comes first and the low one follows. Each bit represents the detailed meaning as follows:
-
- 10 -
GS503
High bit
Low bit
7 6 5 4 3 2 1 0
Zero bit Reserved First bit Reserved Second bit Reserved
Third bit/Fourth bit/Fifth bit 011Low-power alarm 100SOS Sixth bit 0GPS has not located1GPS has located Seventh bit Reserved
Note: The status information refers to the status in a certain time 4.5.5.2 Voltage degree
Decimal, range from 0-6 0Lowest power and power off 1No enough power to dial a call or send messages. 2Low power and alarm 3Lower power but can work normally 3~6Work in good condition
4.5.5.3 GSM signal strength degree: 0x00No signal 0x01Weaker signal 0x02Weak signal 0x03Good signal 0x04Strong signal
4.5.6 LBS Extend Information Package Content
LBS Information
Format Date Time
MCC
MNC
LAC
CI
RSSI
NLAC1
NCI1
NRSSI1
NLAC2
NCI2
NRSSI2
NLAC3
NCI3
NRSSI3
NLAC4
NCI4
NRSSI4
NLAC5
NCI5
NRSSI5
NLAC6
NCI6
NRSSI6
Reserved extend
bit
Length(Byte) 6 2 1 2 2 1 2 2 1 2 2 1 2 2 1 2 2 1 2 2 1 2 2 1 N
4.5.6.1 Date & Time The same as the last section 4.5.6.2 MCC The same as the last section
-
- 11 -
GS503
4.5.6.3 MNC The same as the last section 4.5.6.4 LAC The same as the last section 4.5.6.5 MCIMain Cell ID Cell Tower ID(Cell ID)value range is 0x0000 0xFFFF 4.5.6.6 RSSIReceived Signal Strength Indicator Main estate signal strength, value range is 0x000xFF0x00 is the weakest signal0xFF is the strongest signal 4.5.6.7 NLAC16 Neighborhood Base Station code, there are 6 in all. 4.5.6.8 NCI16Neighboring Cell ID Neighborhood Base Station code is corresponding with the 6 NLAC separately. 4.5.6.9 NRSSI16Near Cell ID Signal Strength Neighborhood Base Station signal strength is corresponding with the 6 NLAC separately. 4.5.7 GPSLBSstatus combined package
Content
GPS info LBS info Status info
Format
Data & Time
GPS info length/ Number
of satellites involved
in locating
Latitude
Longitude
Speed
Course/Status
Reserved bit
LBS
length
MCC
MNC
LAC
Cell ID
Reserved bit
Device information content
Voltage degree
GSM signa
l powe
r degre
e Length (Byte) 6 1 4 4 1 2 M 1 2 1 2 3 N 1 1 1
As for each parameter, please refer to previous explanation. It combines GPS info/ LBS info and status info. What need to notice is that LBS info here has been increased length (includes 1 byte occupied by itself.).Server should make a response when receive package of GPS/Status combined info. Server responds blank data package after receiving the data package from device.
-
- 12 -
GS503
Note: The serial number of data package must be the same as the one sent by device response. For example: Server responds package to device is as follows:
0x78 0x78 0x05 0x16 0x00 0x11 0xF9 0x70
0x0D 0x0A
Start bit Length Protocol NO. Serial No. CRC verify End bit 4.5.8 LBSTelephone number address checking package
Content LBS Information Format
MCC MNC LAC Cell ID
Phone Number
Reserved extend byte
Length(Byte) 2 1 2 3 21 N Basically same with the Format in LBS information Content but delete Date/Time and add Phone Number for checking location. 4.5.9 LBSTelephone number address checking package
Content LBS info Status info Format
MCC MNC LAC Cell ID Device info
content Voltage degree
GSM signal strength
Length(Byte) 2 1 2 3 1 1 1
Basically same with the Format in LBS information Content. 4.5.10 GPSTelephone number address checking package
Content
GPS info Phone number Reserved
extension bit
Format Date/Time
GPS info length,
the number of
satellite
latitude
longitude speed
Course, status
Reserved
extension bit
Length (Byte) 6 1 4 4 1 2 M
21 N
Basically same with the Format in GPS information Content, add phone number to check the address. 4.5.10.1 Server response
After server receives the device package, the information content of that package is blank. Note: The protocol number and information serial number of the data-package must
be as same as the device package.
-
- 13 -
GS503
For example: The status package sent from device to server is as below:
0x78 0x78 0x08 0x13 0x4B 0x04 0x03 0x00 0x11 0x06 0x1F 0x0D 0x0A
Start bit length Protocol No. Info content Serial No.
CRC checking End bit
Response package sent from server to device:
0x78 0x78 0x05 0x13 0x00 0x11 0xF9 0x70 0x0D 0x0A
Start bit length Protocol No. Serial No.CRC
checking End bit
4.5.10.2 Reserved bit Reserved bit is 2byte. 4.5.11 Satellite SNR information
This package is sent after the device receiving the command from server Content
Satellite SNR Format Number of satellites involved in locating 1 2 3 n
Reserved extend byte
Length(Byte) 1 n N 4.5.11.1 Number of satellite involved in locating
For example: 12 satellites is 0x0C
4.5.11.2 Satellite SNR Range: 0x00~0x63(means 0~99dBHZ) Every satellite occupies one byte.
4.5.11.3 Reserved bit Reserved bit is 2byte.
-
- 14 -
GS503
4.5.12 Command from server to device (setting command)
Content of information Format Conten
t-length Server flag
bits Information
content Reserved bit
Length(Byte) 1 4 M N Protocol NO.: 0x80 The response command sending from device to server, whose data package format is the same as the format of command sending from server to device , protocol NO. is different, with0x80 or 0x81. 0x80 stands for setting command. 0x81 stands for checking command.. 4.5.12.1 Command length Show with byte, OxOA, means command content occupy 10 bytes 4.5.12.2 Server flag Left to the server for identification, device will receive data from a binary package stood in the back to return 4.5.12.3 Command content Show with ASC character string, command connent is compatible with sms command.
4.5.12.3.1 Activate GPS online
SMS command format: GPSON#
For example: GPSON# Function description: Start GPS locating function Get back:
If Successful, it will return: GPSON =Success! If failed, it will return: GPSON =Fail!
4.5.12.3.2 Set SOS number online
SMS command format: SOS, operation symbol(A), phone number 1,phone number 2phone number 3
phone number 4# For example: SOS,A,13790774051, 13790774051, 13790774051, 13790774051#
-
- 15 -
GS503
Function description: Set SOS number Get back: If Successful, it will return: SOS=Success! If failed, it will return: SOS=Fail!
e.g.: SOS,A,13790774051,13553442881,13556286698,13525449308#add 4 numbers at one time SOS,A,13790774051#add the first SOS number SOS,A, ,13553442881#add the second SOS number SOS, A, , ,13556286698 #add the third SOS number SOS, A, , , ,13525449308#add the forth SOS number SOS,A,13790774051, 13553442881#(add the first and second SOS number) SOS,A,13790774051, 13553442881, 13556286698#(add the first, second and third SOS number) 4.5.12.3.3 Server send checking address information When server receives the LBS+PHB information package of protocol number 0x17, it will reply the address information and phone number to device after searching Chinese address information according to the uploading LBS information.
command content: ADDRESS&&Address details&&phone number## Chinese address details will be sent as Unicode.
-
- 16 -
GS503
4.5.12.4 Command from server to device(checking command)
Content of information Format Conten
t-length Server flag
bits Information
content Reserved bit
Length(Byte) 1 4 M N Protocol NO.: 0x81 4.5.12.4.1 Command length Show with byte, OxOA, means command content occupy 10 bytes 4.5.12.4.2 Server flag Left to the server for identification, device will receive data from a binary package stood in the back to return 4.5.12.4.3 Command content
Show with ASC character string, command connent is compatible with sms command.
4.5.12.4.3.1 Checking SOS number online SMS command format: SEESOS# Function description: Checking SOS number online. Returned Message: If SOS number existed , device would reply SEESOS,13790774051,13553442881,13556286698.15917750508# If none SOS number, device would reply SEESOS:,,,# If only one SOS number has been set at present SEESOS:13790774051,,,# If two SOS numbers have been set at present SEESOS:13790774051,13553442881,,# Checking returned as above. Separated by comma when SOS number is blank.
-
- 17 -
GS503
4.5.12.4.4 Reserved bit Reserved bit is 2byte.
Instruction about login data package and status package 1. If GPRS connection successful, the device will send first login data package to server.
Receiving feedback package in 10 seconds will be considered as normal, it starts sending position data(GPS,LBS information package), 5 minutes later status package follows immediately, to confirm the normal communication timely(in every 5 minutes).
2. If the GPRS connection failed, device can not send login data package. When GPRS connection fails for 3 times, device will activate timed-restarting function Note: The restart process will activate once after 20 minutes. If device connect with server and receiving feedback data package to login data successfully in 20 minutes the timed-restarting function will be disabled automatically.
3. If there is no feedback package sent from server in 10 seconds, after device sends login data or status data package, it will be considered as failure to connect. In this case, device will activate the GPS data backup function, disconnect the current GPRS connection, reconnect to the server and send login data package.
4. If connection is considers as abnormal, reconnect to send login data package or status data package but not receiving feedback data package in 3 times, device will activate timed-restarting function.(Note: The restart process will activate once after 10 minutes. If device connect with server and receiving feedback data package in this 10 minutes, the timed-restarting function will be disabled automatically.)
5. Server will not reply feedback data package to device which has not been registered. 6. If the device has not been inserted by sim card, or the GPRS service of this sim card
has not been activated, the device will restart automatically once after 20 minutes.
-
- 18 -
GS503
5. Error check Device or server can judge the accuracy of data received with identifying code. Sometimes, because of the electronic noise or other interference, data will be changed a little in the transit process. In this case, identifying code can make sure the core or associated core do nothing with such kind of wrong data, which will strengthen the security and efficiency of system. This identifying code adopts CRC-ITU identifying method. The CRC-ITU value is from "Package Length' to "Information Serial Number" in the protocol (including "Package Length" and "Information Serial Number "). If the receiver receives CRC wrong calculating information, then ignore it and discard this data package. 6. End bit Fixed value by hexadecimal 0x0D 0x0A
-
- 19 -
GS503
7. Appendix A: the look-up table method of CRC-ITU and C language code snippets
static const U16 crctab16[] = { 0x0000, 0x1189, 0x2312, 0x329b, 0x4624, 0x57ad, 0x6536, 0x74bf, 0x8c48, 0x9dc1, 0xaf5a, 0xbed3, 0xca6c, 0xdbe5, 0xe97e, 0xf8f7, 0x1081, 0x0108, 0x3393, 0x221a, 0x56a5, 0x472c, 0x75b7, 0x643e, 0x9cc9, 0x8d40, 0xbfdb, 0xae52, 0xdaed, 0xcb64, 0xf9ff, 0xe876, 0x2102, 0x308b, 0x0210, 0x1399, 0x6726, 0x76af, 0x4434, 0x55bd, 0xad4a, 0xbcc3, 0x8e58, 0x9fd1, 0xeb6e, 0xfae7, 0xc87c, 0xd9f5, 0x3183, 0x200a, 0x1291, 0x0318, 0x77a7, 0x662e, 0x54b5, 0x453c, 0xbdcb, 0xac42, 0x9ed9, 0x8f50, 0xfbef, 0xea66, 0xd8fd, 0xc974, 0x4204, 0x538d, 0x6116, 0x709f, 0x0420, 0x15a9, 0x2732, 0x36bb, 0xce4c, 0xdfc5, 0xed5e, 0xfcd7, 0x8868, 0x99e1, 0xab7a, 0xbaf3, 0x5285, 0x430c, 0x7197, 0x601e, 0x14a1, 0x0528, 0x37b3, 0x263a, 0xdecd, 0xcf44, 0xfddf, 0xec56, 0x98e9, 0x8960, 0xbbfb, 0xaa72, 0x6306, 0x728f, 0x4014, 0x519d, 0x2522, 0x34ab, 0x0630, 0x17b9, 0xef4e, 0xfec7, 0xcc5c, 0xddd5, 0xa96a, 0xb8e3, 0x8a78, 0x9bf1, 0x7387, 0x620e, 0x5095, 0x411c, 0x35a3, 0x242a, 0x16b1, 0x0738, 0xffcf, 0xee46, 0xdcdd, 0xcd54, 0xb9eb, 0xa862, 0x9af9, 0x8b70, 0x8408, 0x9581, 0xa71a, 0xb693, 0xc22c, 0xd3a5, 0xe13e, 0xf0b7, 0x0840, 0x19c9, 0x2b52, 0x3adb, 0x4e64, 0x5fed, 0x6d76, 0x7cff, 0x9489, 0x8500, 0xb79b, 0xa612, 0xd2ad, 0xc324, 0xf1bf, 0xe036, 0x18c1, 0x0948, 0x3bd3, 0x2a5a, 0x5ee5, 0x4f6c, 0x7df7, 0x6c7e, 0xa50a, 0xb483, 0x8618, 0x9791, 0xe32e, 0xf2a7, 0xc03c, 0xd1b5, 0x2942, 0x38cb, 0x0a50, 0x1bd9, 0x6f66, 0x7eef, 0x4c74, 0x5dfd, 0xb58b, 0xa402, 0x9699, 0x8710, 0xf3af, 0xe226, 0xd0bd, 0xc134, 0x39c3, 0x284a, 0x1ad1, 0x0b58, 0x7fe7, 0x6e6e, 0x5cf5, 0x4d7c, 0xc60c, 0xd785, 0xe51e, 0xf497, 0x8028, 0x91a1, 0xa33a, 0xb2b3, 0x4a44, 0x5bcd, 0x6956, 0x78df, 0x0c60, 0x1de9, 0x2f72, 0x3efb, 0xd68d, 0xc704, 0xf59f, 0xe416, 0x90a9, 0x8120, 0xb3bb, 0xa232, 0x5ac5, 0x4b4c, 0x79d7, 0x685e, 0x1ce1, 0x0d68, 0x3ff3, 0x2e7a, 0xe70e, 0xf687, 0xc41c, 0xd595, 0xa12a, 0xb0a3, 0x8238, 0x93b1, 0x6b46, 0x7acf, 0x4854, 0x59dd, 0x2d62, 0x3ceb, 0x0e70, 0x1ff9, 0xf78f, 0xe606, 0xd49d, 0xc514, 0xb1ab, 0xa022, 0x92b9, 0x8330, 0x7bc7, 0x6a4e, 0x58d5, 0x495c, 0x3de3, 0x2c6a, 0x1ef1, 0x0f78, }; // calculate 16 bits CRC of the given length data. U16 GetCrc16(const U8* pData, int nLength) { U16 fcs = 0xffff; // Initialize while(nLength>0){
-
- 20 -
GS503
fcs = (fcs >> 8) ^ crctab16[(fcs ^ *pData) & 0xff]; nLength--; pData++; } return ~fcs; // Negate
-
- 21 -
GS503
8. Note B Full format of information packet Data package from device to server
Login data package18 Byte
Info header Content-length Protocol number
Device ID Information serial
number
Identifying bit End bit
2 1 1 8 2 2 2
GPS package(26+N Byte) Information content
GPS information
Info head
er
data bit
length
Protocol
number
Date &tim
e
GPS information
length, Number of Satellites
involved in locating
latitude
Longitude
Speed
Course, status
Reserved bit
Information serial numb
er
Identifying bit
End bit
2 1 1 6 1 4 4 1 2 N 2 2 2
LBS package 23+N Byte Information content
LBS information Info
header
Data bit
length
Protocol
number
Date& time MCC MNC LAC Cell ID
Reserved bit
Informatio
n srial
number
Identifying bit
End bit
2 1 1 6 2 1 2 3 N 2 2 2
LBS Extend information package54+N Byte Information content LBS information
Start bit
Data length
Protocol No.
Date and
time
MCC
MNC
LAC
CI
RSSI
NLAC1
NCI1
NRSSI1
NLAC2
NCI2
NRSSI2
NLAC3
NCI3
NRSSI3
NLAC4
NCI4
NRSSI4
NLAC5
NCI5
NRSSI5
NLAC6
NCI6
NRSSI6
Reserved
extend bit
Informatio
n serial No.
Identifying bit
End bit
2 1 1 6 2 1 2 2 1 2 2 1 2 2 1 2 2 1 2 2 1 2 2 1 2 2 1 N 2 2 2
-
- 22 -
GS503
GPS/LBS Information package34+M+N Byte Information content
GPS information LBS
information
Info header
Data bit length
Protocol number
Date&time
GPS informati
on length,
Number of
Satellites involved
in locating
Latitude
Longitude
Speed
Course,status
Reserved bit
MCC
MNC
LAC
Cell ID
Reserved bit
Information serial number
Identifying bit
End bit
2 1 1 6 1 4 4 1 2 M 2 1 2 3 N 2 2 2
Status package13+N Byte Information content
Info heade
r
Data bit
length
Protocol
number
Device informati
on content
Voltage degree
GSM signal
strength degree
Reserved bit
Information
serial number
Identifying bit End bit
2 1 1 1 1 1 N 2 2 2
Satellite SNR information11+M+N Byte Information content
Satellite SNR Info header
Data bit length
Protocol number Number of Satellites involved in locating 123 n
Reserved bit
Information
serial number
Identifying bit End bit
2 1 1 1 M N 2 2 2
Feedback information from device to server15+M+N Byte Character string content
Info header
Data bit length
Protocol number
Command
length
Server flag
Command
content
Reserved bit
Information serial number
Varifying bit end bit
2 1 1 1 4 M N 2 2 2
-
- 23 -
GS503
GPSLBS status package40+M+N+L Byte Information content
GPS information LBS information Status
information
Info head
er
Data bit
length
Protocol
number
Date& time
GPS informat
ion length
Number of
Satellites
involved in
locating
latitude
Longitude
Speed
Course, status
Reserved bit
LBS length
MCC
MNC
LAC
Cell ID
Reserved bit
Device information content
Voltage
degree
GSM signal strength degree
Reserved bit
Information SerialNO
.
Identifying bit
End bit
2 1 1 6 1 4 4 1 2 M 1 2 1 2 3 N 1 1 1 L 2 2 2 B Data package from server to device
Feedback package sending from server to device after receiving status package10 Byte Info header Data bit length Protocol number
Information serial number Identifying bit End bit
2 1 1 2 2 2
Command package sending from server to terminal15+M+N Byte Information content
Info header
Data bit length
Protocol number Content length
Server flag
Command
content
Reserved bit
Information serial number
Identifying bit End bit
2 1 1 1 4 M N 2 2 2