Changes

395 bytes added ,  12:59, 27 November 2018
no edit summary
Line 45: Line 45:  
Number of data 1 should always be equal to number of data 2 byte.
 
Number of data 1 should always be equal to number of data 2 byte.
 
CRC-16 is 4 bytes, but first two are zeroes and last two are CRC-16 calculated for [codec id, number of data 2]
 
CRC-16 is 4 bytes, but first two are zeroes and last two are CRC-16 calculated for [codec id, number of data 2]
Minimum AVL packet size is 45 bytes (all IO elements disabled).
+
Minimum AVL packet size is 45 bytes (all IO elements disabled).
 
Maximum AVL packet size for one record is 783 bytes.
 
Maximum AVL packet size for one record is 783 bytes.
   Line 84: Line 84:  
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
! style="background: black; color: white;"| Longtitude
+
! style="background: black; color: white;"| Longitude
 
! style="background: black; color: white;"| Latitude  
 
! style="background: black; color: white;"| Latitude  
! style="background: black; color: white;"| Alitude
+
! style="background: black; color: white;"| Altitude
 
! style="background: black; color: white;"| Angle  
 
! style="background: black; color: white;"| Angle  
! style="background: black; color: white;"| Stellites
+
! style="background: black; color: white;"| Satellites
 
! style="background: black; color: white;"| Speed
 
! style="background: black; color: white;"| Speed
 
|-
 
|-
Line 94: Line 94:  
|}
 
|}
   −
X Longitude  
+
X   Longitude  
   −
Y Latitude1
+
Y   Latitude1
   −
Altitude In meters above sea level1
+
Altitude   In meters above sea level1
   −
Angle In degrees, 0 is north, increasing clock-wise 1
+
Angle   In degrees, 0 is north, increasing clock-wise 1
   −
Satellites Number of visible satellites1
+
Satellites     Number of visible satellites1
   −
Speed Speed in km/h. 0x0000 if GPS data is invalid1
+
Speed in km/h. 0x0000 if GPS data is invalid1
    
Longitude and latitude are integer values built from degrees, minutes, seconds and milliseconds by formula
 
Longitude and latitude are integer values built from degrees, minutes, seconds and milliseconds by formula
Line 110: Line 110:  
[[Image:197.png]]
 
[[Image:197.png]]
   −
d - Degrees
+
d -   Degrees
   −
m - Minutes
+
m -   Minutes
   −
s - Seconds
+
s -   Seconds
   −
ms - Milliseconds
+
ms -   Milliseconds
   −
p - Precision (10000000)
+
p -   Precision (10000000)
    
If longitude is in west or latitude in south, multiply result by –1. To determine if the coordinate is negative, convert it to binary format and check the very first bit. If it is 0, coordinate is positive, if it is 1, coordinate is negative.  
 
If longitude is in west or latitude in south, multiply result by –1. To determine if the coordinate is negative, convert it to binary format and check the very first bit. If it is 0, coordinate is positive, if it is 1, coordinate is negative.  
Line 126: Line 126:  
Received value: 20 9c ca 80
 
Received value: 20 9c ca 80
 
Converted to BIN: 00100000 10011100 11001010 10000000 first bit is 0, which means coordinate is positive
 
Converted to BIN: 00100000 10011100 11001010 10000000 first bit is 0, which means coordinate is positive
Convered to DEC: 547146368
+
Converted to DEC: 547146368
For more information see two‘s compliment arithmetics.
+
For more information see two‘s complement arithmetics.
      Line 189: Line 189:  
Event IO ID – if data is acquired on event – this field defines which IO property has changed and generated an event. If data cause is not event – the value is 0.
 
Event IO ID – if data is acquired on event – this field defines which IO property has changed and generated an event. If data cause is not event – the value is 0.
   −
N total number of properties coming with record (N=N1+N2+N4+N8)
+
N   total number of properties coming with record (N=N1+N2+N4+N8)
   −
N1 number of properties, which length is 1 byte
+
N1   number of properties, which length is 1 byte
   −
N2 number of properties, which length is 2 bytes
+
N2   number of properties, which length is 2 bytes
   −
N4 number of properties, which length is 4 bytes
+
N4   number of properties, which length is 4 bytes
   −
N8 number of properties, which length is 8 bytes
+
N8   number of properties, which length is 8 bytes
      Line 212: Line 212:  
08 – Codec ID
 
08 – Codec ID
   −
0- Number of Data (1 record)
+
0-   Number of Data (1 record)
    
1’st record data
 
1’st record data
Line 224: Line 224:  
GPS Element  
 
GPS Element  
   −
0f0ea850 – Longitude 252618832 = 25,2618832º N
+
0f0ea850     – Longitude 252618832 = 25,2618832º N
   −
209a6900 – Latitude 546990336 = 54,6990336 º E
+
209a6900     – Latitude 546990336 = 54,6990336 º E
   −
0094 – Altitude 148 meters
+
0094         – Altitude 148 meters
   −
0 – Angle 214º
+
0   – Angle 214º
   −
0 – 12 Visible sattelites
+
0   – 12 Visible satellites
   −
0 – 0 km/h speed
+
0   – 0 km/h speed
    
IO Element
 
IO Element
Line 244: Line 244:  
09 – 9 IO elements, which length is 1 Byte
 
09 – 9 IO elements, which length is 1 Byte
   −
0 – IO element ID = 01
+
0   – IO element ID = 01
   −
0 – IO element’s value = 0
+
0   – IO element’s value = 0
   −
02 – IO element ID = 02
+
02     – IO element ID = 02
   −
0 – IO element’s value = 0
+
0   – IO element’s value = 0
   −
03 – IO element ID = 03
+
03     – IO element ID = 03
   −
0 – IO element’s value = 0
+
0   – IO element’s value = 0
   −
4 – IO element ID = 04
+
4     – IO element ID = 04
   −
0 – IO element’s value = 0
+
0   – IO element’s value = 0
   −
16 – IO element ID = 22 (dec)
+
16     – IO element ID = 22 (dec)
   −
0 – IO element’s value = 1
+
0   – IO element’s value = 1
   −
47 – IO element ID = 71 (dec)
+
47     – IO element ID = 71 (dec)
   −
03 – IO element’s value = 3
+
03     – IO element’s value = 3
   −
F0 – IO element ID = 240 (dec)
+
F0     – IO element ID = 240 (dec)
   −
0 – IO element’s value = 0
+
0   – IO element’s value = 0
   −
15 – IO element ID = 21 (dec)
+
15     – IO element ID = 21 (dec)
   −
04 – IO element’s value = 0
+
04     – IO element’s value = 0
   −
C8 – IO element ID = 200 (dec)
+
C8     – IO element ID = 200 (dec)
   −
0 – IO element’s value = 0
+
0   – IO element’s value = 0
   −
0C – 12 IO elements, which value length is 2 Bytes
+
0C     – 12 IO elements, which value length is 2 Bytes
   −
09 – IO element ID = 9 (dec)
+
09     – IO element ID = 9 (dec)
   −
0073 – IO element’s value
+
0073     – IO element’s value
   −
0a – IO element ID = 10 (dec)
+
0a     – IO element ID = 10 (dec)
   −
0046 – IO element’s value
+
0046     – IO element’s value
   −
0b – IO element ID = 11 (dec)
+
0b     – IO element ID = 11 (dec)
   −
0050 – IO element’s value
+
0050     – IO element’s value
   −
13 – IO element ID = 19 (dec)
+
13     – IO element ID = 19 (dec)
   −
0046 – IO element’s value
+
0046     – IO element’s value
   −
43 – IO element ID = 67 (dec)
+
43     – IO element ID = 67 (dec)
   −
06d7 – IO element’s value
+
06d7     – IO element’s value
   −
1 – IO element ID = 68 (dec)
+
1   – IO element ID = 68 (dec)
   −
0 – IO element’s value
+
0   – IO element’s value
   −
B5 – IO element ID = 181 (dec)
+
B5     – IO element ID = 181 (dec)
   −
000b – IO element’s value
+
000b     – IO element’s value
   −
B6 – IO element ID = 182 (dec)
+
B6     – IO element ID = 182 (dec)
   −
0007 – IO element’s value
+
0007     – IO element’s value
   −
42 – IO element ID = 66 (dec)
+
42     – IO element ID = 66 (dec)
   −
2e9f – IO element’s value
+
2e9f     – IO element’s value
   −
2 – IO element ID = 24 (dec)
+
2   – IO element ID = 24 (dec)
   −
0 – IO element’s value
+
0   – IO element’s value
   −
cd – IO element ID = 205 (dec)
+
cd     – IO element ID = 205 (dec)
   −
3 – IO element’s value
+
3   – IO element’s value
   −
CE – IO element ID = 206 (dec)
+
CE     – IO element ID = 206 (dec)
   −
0 – IO element’s value
+
0   – IO element’s value
    
07 – 7 IO elements, which value length is 4 Bytes
 
07 – 7 IO elements, which value length is 4 Bytes
   −
C7 – IO element ID = 199 (dec)
+
C7         – IO element ID = 199 (dec)
   −
0 – IO element’s value
+
0   – IO element’s value
   −
f1 – IO element ID = 241 (dec)
+
f1         – IO element ID = 241 (dec)
   −
0000601a – IO element’s value
+
0000601a   – IO element’s value
   −
46 – IO element ID = 70 (dec)
+
46         – IO element ID = 70 (dec)
   −
00000134 – IO element’s value
+
00000134   – IO element’s value
   −
48 – IO element ID = 72 (dec)
+
48         – IO element ID = 72 (dec)
   −
00000bb8 – IO element’s value
+
00000bb8   – IO element’s value
   −
4 – IO element ID = 73 (dec)
+
4   – IO element ID = 73 (dec)
   −
00000bb8 – IO element’s value
+
00000bb8   – IO element’s value
   −
4a – IO element ID = 74 (dec)
+
4a         – IO element ID = 74 (dec)
   −
00000bb8 – IO element’s value
+
00000bb8   – IO element’s value
   −
4c – IO element ID = 76 (dec)
+
4c         – IO element ID = 76 (dec)
   −
1 – IO element’s value
+
1   – IO element’s value
    
02 – 2 IO elements, which value length is 8 Bytes
 
02 – 2 IO elements, which value length is 8 Bytes
   −
4e – IO element ID = 78 (dec)
+
4e             – IO element ID = 78 (dec)
   −
0 – IO element’s value
+
0   – IO element’s value
   −
cf – IO element ID = 207 (dec)
+
cf             – IO element ID = 207 (dec)
   −
0 – IO element’s value
+
0   – IO element’s value
   −
0 – Number of Data (1 record)
+
0   – Number of Data (1 record)
   −
00003fca - CRC-16, 4 Bytes (first 2 are always zeros)
+
00003fca   - CRC-16, 4 Bytes (first 2 are always zeros)
    
 
Line 382: Line 382:  
For example IMEI 356307042441013 would be sent as 000f333536333037303432343431303133
 
For example IMEI 356307042441013 would be sent as 000f333536333037303432343431303133
   −
First two bytes denote IMEI length. In this case 000F means, that imei is 15 bytes long.
+
First two bytes denote IMEI length. In this case 000F means, that IMEI is 15 bytes long.
    
After receiving IMEI, server should determine if it would accept data from this module. If yes server will reply to module 01 if not 00. Note that confirmation should be sent as binary packet. I.e. 1 byte 0x01 or 0x00.
 
After receiving IMEI, server should determine if it would accept data from this module. If yes server will reply to module 01 if not 00. Note that confirmation should be sent as binary packet. I.e. 1 byte 0x01 or 0x00.
Line 564: Line 564:  
| AVL Data IO element AVL ID length || 1 Byte || 2 Bytes
 
| AVL Data IO element AVL ID length || 1 Byte || 2 Bytes
 
|-
 
|-
| Variable size IO elements || Does not include || include Includes variable size elements
+
| Variable size IO elements || Does not include || Includes variable size elements
 
|}
 
|}
 
<small>Table 2. Codec 8 and 8 Extended differences
 
<small>Table 2. Codec 8 and 8 Extended differences
 
</small>
 
</small>
   −
Main differences between are shown in above table. AVL data element sizes in codec 8 extended protocol was increased to 2 byte length and new variable type added. For more detailed description look in codec 8
+
Main differences between are shown in above table. AVL data element sizes in codec 8 extended protocol were increased to 2 bytes length and new variable type added. For more detailed description look in codec 8
 
and codec 8 extended chapters.
 
and codec 8 extended chapters.
   Line 793: Line 793:  
0000      – Angle 0º
 
0000      – Angle 0º
   −
06                                    – 6 Visible sattelites
+
06                                    – 6 Visible satellites
    
0000      – 0 km/h speed
 
0000      – 0 km/h speed
Line 1,232: Line 1,232:     
Device response - #VERSION=XXXXXXXX<CR><LF>
 
Device response - #VERSION=XXXXXXXX<CR><LF>
+
   
 
XXXXXXXX – Device Firmware Version (up to 8 characters)
 
XXXXXXXX – Device Firmware Version (up to 8 characters)
   Line 1,243: Line 1,243:     
Device response -  #NETWORK=XXXXXX<CR><LF>
 
Device response -  #NETWORK=XXXXXX<CR><LF>
+
   
 
XXXXXX – GSM Operator Network [0 - 999999]
 
XXXXXX – GSM Operator Network [0 - 999999]
   Line 1,418: Line 1,418:  
*'''Description and example'''
 
*'''Description and example'''
   −
Records to server will be sended as shown in table bellow.
+
Records to server will be sent as shown in table below.
 
The main difference between CODEC8 and CODEC16 is CODEC ID which will be 0x10 instead of 0x08, AVL ID‘s in AVL data is sent in 2  bytes, instead of 1 byte.  
 
The main difference between CODEC8 and CODEC16 is CODEC ID which will be 0x10 instead of 0x08, AVL ID‘s in AVL data is sent in 2  bytes, instead of 1 byte.  
   −
'''Also new parameter – Generation type is adeed.'''  
+
'''Also new parameter – Generation type is added.'''  
    
By receiving 0x10 codec ID server must know that AVL data record will be parsed different.
 
By receiving 0x10 codec ID server must know that AVL data record will be parsed different.
    
Codec16 is supported from firmware – 00.03.xx and newer.  
 
Codec16 is supported from firmware – 00.03.xx and newer.  
ll AVL ID‘s which are higher then 255 will can be used only in CODEC16 protocol.
+
ll AVL ID‘s which are higher than 255 will can be used only in CODEC16 protocol.
      Line 1,448: Line 1,448:  
| 6 || Eventual
 
| 6 || Eventual
 
|-
 
|-
| 7 || Periodcal
+
| 7 || Periodical
 
|}
 
|}
   Line 1,493: Line 1,493:  
GPS Elements  
 
GPS Elements  
   −
0f0ea850 – Longitude 252618832 = 25,2618832º N
+
0f0ea850     – Longitude 252618832 = 25,2618832º N
   −
209a6900 – Latitude 546990336 = 54,6990336 º E
+
209a6900     – Latitude 546990336 = 54,6990336 º E
   −
00AE – Altitude 174 meters
+
00AE         – Altitude 174 meters
   −
00B9 – Angle 185º
+
00B9         – Angle 185º
   −
0B – 11 Visible sattelites
+
0B         – 11 Visible satellites
   −
0000         – 0 km/h speed
+
0000             – 0 km/h speed
    
IO Elements
 
IO Elements
Line 1,515: Line 1,515:  
05 – 5 IO elements, which length is 1 Byte
 
05 – 5 IO elements, which length is 1 Byte
   −
0001 – IO element ID = 01
+
0001     – IO element ID = 01
   −
00 – IO element’s value = 0
+
00     – IO element’s value = 0
   −
0002 – IO element ID = 02
+
0002     – IO element ID = 02
   −
00 – IO element’s value = 0
+
00     – IO element’s value = 0
   −
0003 – IO element ID = 03
+
0003     – IO element ID = 03
   −
00 – IO element’s value = 0
+
00     – IO element’s value = 0
   −
0004 – IO element ID = 04
+
0004     – IO element ID = 04
   −
00 – IO element’s value = 0
+
00     – IO element’s value = 0
   −
0120 – IO element ID = 288 (dec)
+
0120     – IO element ID = 288 (dec)
   −
00 – IO element’s value = 0
+
00     – IO element’s value = 0
   −
02 – 2 IO elements, which value length is 2 Bytes
+
02     – 2 IO elements, which value length is 2 Bytes
   −
0018 – IO element ID = 24 (dec)
+
0018     – IO element ID = 24 (dec)
   −
0000 – IO element’s value
+
0000     – IO element’s value
   −
0046 – IO element ID = 70 (dec)
+
0046     – IO element ID = 70 (dec)
   −
0129 – IO element’s value
+
0129     – IO element’s value
    
02 – 2 IO elements, which value length is 4 Bytes
 
02 – 2 IO elements, which value length is 4 Bytes
   −
00C7 – IO element ID = 199 (dec)
+
00C7         – IO element ID = 199 (dec)
   −
00000000 – IO element’s value
+
00000000   – IO element’s value
   −
0046 – IO element ID = 70 (dec)
+
0046         – IO element ID = 70 (dec)
   −
00000000 – IO element’s value
+
00000000   – IO element’s value
       
01 – 1 IO elements, which value length is 8 Bytes
 
01 – 1 IO elements, which value length is 8 Bytes
   −
003E – IO element ID = 62 (dec)
+
003E             – IO element ID = 62 (dec)
   −
0000000000000000 – IO element’s value
+
0000000000000000   – IO element’s value
    
2’st record data
 
2’st record data
Line 1,581: Line 1,581:  
For example IMEI 123456789012345 would be sent as 000f333536333037303432343431303133
 
For example IMEI 123456789012345 would be sent as 000f333536333037303432343431303133
   −
First two bytes denote IMEI length. In this case 000F means, that imei is 15 bytes long.
+
First two bytes denote IMEI length. In this case 000F means, that IMEI is 15 bytes long.
    
After receiving IMEI, server should determine if it would accept data from this module. If yes server will reply to module 01 if not 00. Note that confirmation should be sent as binary packet. I.e. 1 byte 0x01 or 0x00.
 
After receiving IMEI, server should determine if it would accept data from this module. If yes server will reply to module 01 if not 00. Note that confirmation should be sent as binary packet. I.e. 1 byte 0x01 or 0x00.
Line 1,766: Line 1,766:  
Codec id: 08
 
Codec id: 08
   −
Number of data: 01
+
Number of data:   01
    
Timestamp: 0000013febdd19c8
 
Timestamp: 0000013febdd19c8
Line 1,845: Line 1,845:  
|ElementCount * ||  || GPSDataElement || GPS data elements.  
 
|ElementCount * ||  || GPSDataElement || GPS data elements.  
 
|-
 
|-
| ||  || Byte-aling padding || Padding bits to align to 8-bits boundary
+
| ||  || Byte-align padding || Padding bits to align to 8-bits boundary
    
represented in seconds elapsed from 2000.01.01 00:00 EET.  
 
represented in seconds elapsed from 2000.01.01 00:00 EET.  
Line 1,893: Line 1,893:  
LongDegMult - longitude in degrees multiplied by 107 (integer part)
 
LongDegMult - longitude in degrees multiplied by 107 (integer part)
   −
LatDegMult latitude in degrees multiplied by 107 (integer part)
+
LatDegMult     latitude in degrees multiplied by 107 (integer part)
   −
prevLongitude longitude field value of previous GPSDataElemen
+
prevLongitude     longitude field value of previous GPSDataElemen
   −
prevLatitude latitude field value of previous GPSDataElement
+
prevLatitude     latitude field value of previous GPSDataElement