FMB920 Protocols V0.10
FMB920 Protocols V0.10
V0.10
Contents
1. FMB920 DATA PROTOCOL......................................................................................................................3
1.1 AVL DATA PACKET.........................................................................................................................................................3
1.2 AVL DATA........................................................................................................................................................................ 3
1.3 PRIORITY............................................................................................................................................................................ 3
1.4 GPS ELEMENT.................................................................................................................................................................. 3
1.5 IO ELEMENT...................................................................................................................................................................... 4
1.6 EXAMPLE..........................................................................................................................................................................13
2 / 22
1. FMB920 DATA PROTOCOL
1.3 Priority
0 Low
1 High
2 Panic
3 / 22
X Longitude1
Y Latitude1
Altitude In meters above sea level1
Angle In degrees, 0 is north, increasing clock-wise 1
Satellites Number of visible satellites1
Speed 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.
d Degrees
m Minutes
s Seconds
ms Milliseconds
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.
Example:
Received value: 20 9c ca 80
Converted to BIN: 00100000 10011100 11001010 10000000 first bit is 0, which means coordinate is positive
Convered to DEC: 547146368
For more information see two‘s compliment arithmetics.
1.5 IO element
N1 of One Byte IO
N8 of Eight Bytes
N4 of Four Bytes
N2 of Two Bytes
N1’th IO Value
N2’th IO Value
N4’th IO Value
N8’th IO Value
N of Total IO
1’st IO Value
1’st IO Value
1’st IO Value
1’st IO Value
N1’th IO ID
N2’th IO ID
N4’th IO ID
N8’th IO ID
Event IO ID
1’st IO ID
1’st IO ID
1’st IO ID
1’st IO ID
IO
IO
IO
…
…
2 Bytes
2 Bytes
4 Bytes
4 Bytes
8 Bytes
8 Bytes
1 Byte
1 Byte
1 Byte
1 Byte
1 Byte
1 Byte
1 Byte
1 Byte
1 Byte
1 Byte
1 Byte
1 Byte
1 Byte
1 Byte
1 Byte
1 Byte
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.
1
If record is without valid coordinates – (there were no GPS fix in the moment of data acquisition) – Longitude, Latitude and Altitude
values are last valid fix, and Angle, Satellites and Speed are 0.
4 / 22
N total number of properties coming with record (N=N1+N2+N4+N8)
N1 number of properties, which length is 1 byte
N2 number of properties, which length is 2 bytes
N4 number of properties, which length is 4 bytes
N8 number of properties, which length is 8 bytes
Permanent I/O elements
(are always sent (with every record) to server if enabled)
Property ID
in AVL Property Name Bytes Description
packet
Logic: 0 / 1
239 Ignition 1
* Depends on Ignition source
Logic: 0 / 1
240 Movement 1
* Depends on Movement source
Value in scale 0 – 5
0 – Home On Stop
1 – Home On Moving
80 Data Mode 1 2 – Roaming On Stop
3 – Roaming On Moving
4- Unknown On Stop
5 – Unknown On Moving
21 GSM Signal 1 Value in scale 1 – 5
200 Sleep Mode 1 0 – No Sleep; 1 – GPS Sleep; 2 – Deep Sleep; 3- Online Sleep
0 - OFF
1 - ON with fix
69 GNSS Status 1
2 - ON without fix
3 - In sleep state
181 GNSS PDOP 2 Probability * 10; 0-500
182 GNSS HDOP 2 Probability * 10; 0-500
66 External Voltage 2 Voltage: mV, 0 – 30 V
24 Speed 2 Value in km/h, 0 – xxx km/h
205 GSM Cell ID 2 GSM base station ID
206 GSM Area Code 2 Location Area code (LAC), it depends on GSM operator. It
provides unique number which assigned to a set of base GSM
stations. Max value: 65536
67 Battery Voltage 2 Voltage: mV
68 Battery Current 2 Current: mA
241 Active GSM Operator 4 Currently used GSM Operator code
199 Trip Odometer 4 Trip Odometer Value in meters
16 Total Odometer 4 Total Odometer Value in meters
1 Digital Input 1 1 Logic: 0 / 1
9 Analog input 1 2 Voltage: mV, 0 – 30 V
179 Digital Output 1 1 Logic: 0 / 1
12 Fuel Used GPS 4 Fuel Used in mili Liters
13 Fuel Rate GPS 2 Average Fuel use in (Litersx100) /100km
17 Axis X 2 X axis: value mG range [-8000; 8000]
18 Axis Y 2 Y axis: value mG range [-8000; 8000]
19 Axis Z 2 Z axis: value mG range [-8000; 8000]
Value of SIM ICCID, MSB
*11 ICCID1 8
(Example Below)
Value of SIM ICCID, LSB
*14 ICCID2 8
(Example Below)
5 / 22
Permanent I/O elements
(are always sent (with every record) to server if enabled)
Property ID
in AVL Property Name Bytes Description
packet
10 SD Status 1 0 – not present, 1 – present
Average amount of events on some distance. Min – 0, Max –
15 Eco Score 2
65536. Multiplier – 0.01
MAC address of NMEA receiver device connected via
238 User ID 8
Bluetooth
Multiplier – 0.1. Degrees ( °C ), -40 - +125; Error codes:
4000 - abnormal sensor state
25 BLE Temperature #1 2
3000 - sensor not found
2000 - failed sensor data parsing
Multiplier – 0.1. Degrees ( °C ), -40 - +125; Error codes:
4000 - abnormal sensor state
26 BLE Temperature #2 2
3000 - sensor not found
2000 - failed sensor data parsing
Multiplier – 0.1. Degrees ( °C ), -40 - +125; Error codes:
4000 - abnormal sensor state
27 BLE Temperature #3 2
3000 - sensor not found
2000 - failed sensor data parsing
Multiplier – 0.1. Degrees ( °C ), -40 - +125; Error codes:
4000 - abnormal sensor state
28 BLE Temperature #4 2
3000 - sensor not found
2000 - failed sensor data parsing
29 BLE Battery voltage #1 1 Battery voltage in % of sensor #1
20 BLE Battery voltage #2 1 Battery voltage in % of sensor #2
22 BLE Battery voltage #3 1 Battery voltage in % of sensor #3
23 BLE Battery voltage #4 1 Battery voltage in % of sensor #4
86 BLE Humidity #1 2 Multiplier 0.1. %RH
104 BLE Humidity #2 2 Multiplier 0.1. %RH
106 BLE Humidity #3 2 Multiplier 0.1. %RH
108 BLE Humidity #4 2 Multiplier 0.1. %RH
There are 8 IO elements of 1 byte size.
Also 13 IO elements of 2 byte size.
Also 4 IO elements of 4 byte size.
And 0 IO elements of 8 byte size.
6 / 22
ID:11 Len as ID:14 Len as
Full Value Full Value Len
string string
7 / 22
Eventual I/O elements
(Send if corresponding event had happen)
Property ID
in AVL Property Name Bytes Description
packet
2 – over speeding end
3 – over speeding start
0 – target left zone
1 – target entered zone
65 Geofence zone 10 1
2 – over speeding end
3 – over speeding start
0 – target left zone
1 – target entered zone
70 Geofence zone 11 1
2 – over speeding end
3 – over speeding start
0 – target left zone
1 – target entered zone
88 Geofence zone 12 1
2 – over speeding end
3 – over speeding start
0 – target left zone
1 – target entered zone
91 Geofence zone 13 1
2 – over speeding end
3 – over speeding start
0 – target left zone
1 – target entered zone
92 Geofence zone 14 1
2 – over speeding end
3 – over speeding start
0 – target left zone
1 – target entered zone
93 Geofence zone 15 1
2 – over speeding end
3 – over speeding start
0 – target left zone
1 – target entered zone
94 Geofence zone 16 1
2 – over speeding end
3 – over speeding start
0 – target left zone
1 – target entered zone
95 Geofence zone 17 1
2 – over speeding end
3 – over speeding start
0 – target left zone
1 – target entered zone
96 Geofence zone 18 1
2 – over speeding end
3 – over speeding start
0 – target left zone
1 – target entered zone
97 Geofence zone 19 1
2 – over speeding end
3 – over speeding start
0 – target left zone
1 – target entered zone
98 Geofence zone 20 1
2 – over speeding end
3 – over speeding start
0 – target left zone
99 Geofence zone 21 1 1 – target entered zone
2 – over speeding end
8 / 22
Eventual I/O elements
(Send if corresponding event had happen)
Property ID
in AVL Property Name Bytes Description
packet
3 – over speeding start
0 – target left zone
1 – target entered zone
153 Geofence zone 22 1
2 – over speeding end
3 – over speeding start
0 – target left zone
1 – target entered zone
154 Geofence zone 23 1
2 – over speeding end
3 – over speeding start
0 – target left zone
1 – target entered zone
190 Geofence zone 24 1
2 – over speeding end
3 – over speeding start
0 – target left zone
1 – target entered zone
191 Geofence zone 25 1
2 – over speeding end
3 – over speeding start
0 – target left zone
1 – target entered zone
192 Geofence zone 26 1
2 – over speeding end
3 – over speeding start
0 – target left zone
1 – target entered zone
193 Geofence zone 27 1
2 – over speeding end
3 – over speeding start
0 – target left zone
1 – target entered zone
194 Geofence zone 28 1
2 – over speeding end
3 – over speeding start
0 – target left zone
1 – target entered zone
195 Geofence zone 29 1
2 – over speeding end
3 – over speeding start
0 – target left zone
1 – target entered zone
196 Geofence zone 30 1
2 – over speeding end
3 – over speeding start
0 – target left zone
1 – target entered zone
197 Geofence zone 31 1
2 – over speeding end
3 – over speeding start
0 – target left zone
1 – target entered zone
198 Geofence zone 32 1
2 – over speeding end
3 – over speeding start
0 – target left zone
1 – target entered zone
208 Geofence zone 33 1
2 – over speeding end
3 – over speeding start
9 / 22
Eventual I/O elements
(Send if corresponding event had happen)
Property ID
in AVL Property Name Bytes Description
packet
0 – target left zone
1 – target entered zone
209 Geofence zone 34 1
2 – over speeding end
3 – over speeding start
0 – target left zone
1 – target entered zone
216 Geofence zone 35 1
2 – over speeding end
3 – over speeding start
0 – target left zone
1 – target entered zone
217 Geofence zone 36 1
2 – over speeding end
3 – over speeding start
0 – target left zone
1 – target entered zone
218 Geofence zone 37 1
2 – over speeding end
3 – over speeding start
0 – target left zone
1 – target entered zone
219 Geofence zone 38 1
2 – over speeding end
3 – over speeding start
0 – target left zone
1 – target entered zone
220 Geofence zone 39 1
2 – over speeding end
3 – over speeding start
0 – target left zone
1 – target entered zone
221 Geofence zone 40 1
2 – over speeding end
3 – over speeding start
0 – target left zone
1 – target entered zone
222 Geofence zone 41 1
2 – over speeding end
3 – over speeding start
0 – target left zone
1 – target entered zone
223 Geofence zone 42 1
2 – over speeding end
3 – over speeding start
0 – target left zone
1 – target entered zone
224 Geofence zone 43 1
2 – over speeding end
3 – over speeding start
0 – target left zone
1 – target entered zone
225 Geofence zone 44 1
2 – over speeding end
3 – over speeding start
0 – target left zone
1 – target entered zone
226 Geofence zone 45 1
2 – over speeding end
3 – over speeding start
227 Geofence zone 46 1 0 – target left zone
10 / 22
Eventual I/O elements
(Send if corresponding event had happen)
Property ID
in AVL Property Name Bytes Description
packet
1 – target entered zone
2 – over speeding end
3 – over speeding start
0 – target left zone
1 – target entered zone
228 Geofence zone 47 1
2 – over speeding end
3 – over speeding start
0 – target left zone
1 – target entered zone
229 Geofence zone 48 1
2 – over speeding end
3 – over speeding start
0 – target left zone
1 – target entered zone
230 Geofence zone 49 1
2 – over speeding end
3 – over speeding start
0 – target left zone
1 – target entered zone
231 Geofence zone 50 1
2 – over speeding end
3 – over speeding start
Logic: 0 / 1
175 Auto Geofence 1
0 – Exit Event; 1 – Enter Event;
Logic: 0 / 1
250 Trip 1
0 – Trip Ended; 1 – Trip Started;
255 Over speeding 1 Value km/h that generated event
251 Idling 1 Logic: 0 / 1
0- Idling ended event; 1 – Idling started event;
253 Green Driving Type 1 Possible Values: [1/2/3]
1 – Acceleration
2 – Braking
3 – Cornering
254 Green Driving Value 1 Depending on eco driving type: if harsh acceleration, braking
and cornering – g*10
246 Towing 1 1 – Send Towing detected
11 / 22
Permanent I/O elements
(Send if ask to get with OBDII dongle)
Property ID
in AVL Property Name Bytes Description
packet
30 „Number of DTC“ 1
„Calculated engine load 1 %
31
value“
„Engine coolant 1 C
32
temperature“
33 „Short term fuel trim 1“ 1 %
34 „Fuel pressure“ 2 kPa
„Intake manifold 1 kPa
35
absolute pressure“
36 „Engine RPM“ 2 rpm
37 „Vehicle speed“ 1 km/h
38 „Timing advance“ 1 O
39 „Intake air temperature“ 1 C
40 „MAF air flow rate“ 2 g/sec, *0.01
41 „Throttle position“ 1 %
„Run time since engine 2 s
42
start“
„Distance traveled MIL 2 Km
43
on“
„Relative fuel rail 2 kPa, *0.1
44
pressure“
„Direct fuel rail 2 kPa, *0.1
45
pressure“
46 „Commanded EGR“ 1 %
47 „EGR error“ 1 %
48 „Fuel level“ 1 %
„Distance traveled since 2 Km
49
codes cleared“
50 „Barometric pressure“ 1 kPa
„Control module 2 mV
51
voltage“
52 „Absolute load value“ 2 %
„Ambient air 1 C
53
temperature“
54 Time run with MIL on 2 Min
„Time since trouble 2 Min
55
codes cleared“
„Absolute fuel rail 2 kPa, *10
56
pressure“
„Hybrid battery pack 1 %
57
remaining life“
„Engine oil 1 C
58
temperature“
59 „Fuel injection timing“ 2 O, *0.01
60 „Engine fuel rate“ 2 L/h, *100
12 / 22
To receive CAN data, send if ask to get with OBDII dongle. FMB9 module CAN data is not
reading.
1.6 Example
Received data:
000000000000008c08010000013feb55ff74000f0ea850209a690000940000120000001e0
9010002000300040016014703f0001504c8000c0900730a00460b00501300464306d74400
00b5000bb60007422e9f180000cd0386ce000107c700000000f10000601a4600000134480
0000bb84900000bb84a00000bb84c00000000024e0000000000000000cf00000000000000
000100003fca
In total 152 Bytes.
GPS Element
IO Element
13 / 22
0 – IO element’s value = 1
47 – IO element ID = 71 (dec)
03 – IO element’s value = 3
F0 – IO element ID = 240 (dec)
0 – IO element’s value = 0
15 – IO element ID = 21 (dec)
04 – IO element’s value = 0
C8 – IO element ID = 200 (dec)
0 – IO element’s value = 0
14 / 22
00000bb8 – IO element’s value
4c – IO element ID = 76 (dec)
0 – IO element’s value
15 / 22
02 – 2 IO elements, which value length is 8 Bytes
4e – IO element ID = 78 (dec)
0 – IO element’s value
cf – IO element ID = 207 (dec)
0 – IO element’s value
Example:
Module connects to server and sends IMEI:
000f333536333037303432343431303133
Server accepts the module:
01
Module sends data packet:
AVL data packet header AVL data array CRC
Four zero bytes, CodecId – 08, CRC of ‘AVL data array’
‘AVL data array’ length – 254 NumberOfData – 2.
(Encoded using continuous bit
stream. Last byte padded to align
to byte boundary)
00000000000000FE 0802...(data elements)...02 00008612
Server acknowledges data reception (2 data elements):
00000002
16 / 22
3. SENDING DATA OVER UDP/IP
UDP channel is a transport layer protocol above UDP/IP to add reliability to plain UDP/IP using
acknowledgment packets. The packet structure is as follows:
UDP datagram
UDP Packet length 2 bytes Packet length (excluding this field) in big
channel endian byte order
packet x N
Packet Id 2 bytes Packet id unique for this channel
Packet Type
0 Data packet requiring acknowledgment
1 Data packet NOT requiring acknowledgment
2 Acknowledgment packet
Acknowledgment packet should have the same packet id as acknowledged data packet and empty data payload.
Acknowledgement should be sent in binary format.
Acknowledgment packet
Packet length 2 bytes 0x0003
Packet id 2 bytes same as in acknowledged packet
Packet type 1 byte 0x02
AVL data are sent encapsulated in UDP channel packets (Data payload field).
17 / 22
AVL data array – array of encoded AVL data
Scenario:
Module sends UDP channel packet with encapsulated AVL data packet (Packet type=1 or 0). If packet type is
0, server should respond with valid UDP channel acknowledgment packet. Since server should respond to the
AVL data packet, UDP channel acknowledgment is not necessary in this scenario, so Packet type=1 is
recommended.
Server sends UDP channel packet with encapsulated response (Packet type=1 – this packet should not require
acknowledgment)
Module validates AVL packet id and Number of accepted AVL elements. If server response with valid AVL packet
id is not received within configured timeout, module can retry sending.
Example:
Module sends the data:
18 / 22
Another example, with all IO id’s enabled
Server received data:
00a1cafe011b000f33353633303730343234343130313308010000013febdd19c8000f0e9
ff0209a718000690000120000001e09010002000300040016014703f0001504c8000c0900
910a00440b004d130044431555440000b5000bb60005422e9b180000cd0386ce000107c70
0000000f10000601a460000013c4800000bb84900000bb84a00000bb84c00000000024e00
00000000000000cf000000000000000001
Data length: 00a1 or 161 Bytes (not counting the first 2 data length
bytes)
Packet identification: 0xCAFE 2 bytes
Packet type: 01
Packet id: 1b
Imei length: 000f
Actual imei: 333536333037303432343431303133
Codec id: 08
Number of data: 01
Timestamp: 0000013febdd19c8
Priority: 00
GPS data: 0f0e9ff0209a718000690000120000
UDP protocol is the same as TCP except message header is 7 bytes, which consist of: data length, packet
identification, packet type and packet id.
Then goes imei length and imei itself.
And after that goes AVL data.
And at the very end number of data byte. There is no CRC in UDP.
19 / 22
4. SENDING DATA USING SMS
AVL data or events can be sent encapsulated in binary SMS. TP-DCS field of these SMS should indicate that
message contains 8-bit data (for example: TP-DCS can be 0x04).
SM data (TP-UD)
AVL data array IMEI: 8 bytes
20 / 22
5. SMS EVENTS
When Configured to generate SMS event user will get this SMS upon event
Example:
2016/04/11 12:00:00 Lon:51.12258 Lat: 25.7461 Q:0.6 Digital Input 1 Val:1
21 / 22
6. CHANGE LOG
New
Nr. Date version Comments
number
1 2016.10.02 0.0.1 First release
2 2016.11.15 0.0.3 Minor changes
3 2017.01.24 0.0.4 OBD AVL ID
4 2017.03.30 0.0.5 Added ICCID and SD status.
5 2017.04.24 0.0.6 GPS AVG Fuel Use in 100km. Multiplier (x100)
info added
CCID ID is put to two IO elements (AVL ID:11
and AVL ID:14), parsing instructios added
6 2017.06.16 0.0.7 Updated IO GNSS status values
7 2017.07.03 0.0.8 Description added: ICCID Full Value Calculation
8 2017.07.25 0.0.9 Updated OBD fuel rate param.
9 2018.02.21 0.0.10 Added new I\O elements
22 / 22