Telemetry Packet: Difference between revisions
No edit summary |
No edit summary |
||
| (20 intermediate revisions by the same user not shown) | |||
| Line 18: | Line 18: | ||
| packet type || 5 || 75–79 || Integer type: | | packet type || 5 || 75–79 || Integer type: | ||
* 00 - Device Info Packet | * 00 - Device Info Packet | ||
* 01 - | * 01 - Telemetry Packet | ||
* 02 - OTA Packet | * 02 - OTA Packet | ||
* 03 - Error Packet | * 03 - Error Packet | ||
* 04 - Device Configuration Packet | * 04 - Device Configuration Packet | ||
* 05 - IP Configuration Packet | * 05 - IP Configuration Packet | ||
| 01 - Telemetry Packet | |||
|- | |- | ||
! colspan="5" style="background:#D3D3D3;" | Data (= 55 bytes × number of packets) | ! colspan="5" style="background:#D3D3D3;" | Data (= 55 bytes × number of packets) | ||
|- | |- | ||
| Packet Status || 1 || | | Packet Status || 1 || 80 || Type of packet || 0:History, 1:Live | ||
|- | |- | ||
| Frame Number || 16 || | | Frame Number || 16 || 81-96 || Frame number || | ||
|- | |- | ||
| AlertID || | | AlertID || 5 || 97–101 || Alert identifier || | ||
|- | |- | ||
| Operator || 4 || | | Operator || 4 || 102–105 || Network operator || 00-Unknown, 01-BSNL, 02-VI, 03-AIRTEL, 04-JIO | ||
|- | |- | ||
| Signal Strength || 5 || | | Signal Strength || 5 || 106–110|| Signal strength || Integer (0–31) | ||
|- | |- | ||
| MCC || 10 || | | MCC || 10 || 111–120 || Mobile country code || Integer | ||
|- | |- | ||
| MNC || | | MNC || 10 || 121–130 || Mobile network code || Integer | ||
|- | |- | ||
| Cell Id || 16 || | | Cell Id || 16 || 131–146 || Cell tower ID || Integer | ||
|- | |- | ||
| Location Area Code || 16 || | | Location Area Code || 16 ||147–162|| Location area code || Integer | ||
|- | |- | ||
| Fix_status || 1 || | | Fix_status || 1 || 163 || GPS fix status || 0: No fix, 1: Valid Fix | ||
|- | |- | ||
| | | Latitude || 29 || 164–192 || Latitude coordinate || Divide by 1,000,000 for float value | ||
|- | |- | ||
| NS_Indication || 1 || | | NS_Indication || 1 || 193 || N or S || 0: N, 1: S | ||
|- | |- | ||
| Longitude || 29 || | | Longitude || 29 || 194–222 || Longitude coordinate || Divide by 1,000,000 for float value | ||
|- | |- | ||
| EW_Indication || 1 || | | EW_Indication || 1 || 223 || East/West Indication || 0: E, 1: W | ||
|- | |- | ||
| HDOP || 10 || | | HDOP || 10 || 224–233 || Horizontal dilution || Divide by 100 for float value | ||
|- | |- | ||
| PDOP || 10 || | | PDOP || 10 || 234–243 || Position dilution || Divide by 100 for float value | ||
|- | |- | ||
| Speed || | | Speed || 15 || 244–258 || Speed in km/h || Divide by 100 for float value | ||
|- | |- | ||
| Altitude || 15 || | | Altitude || 15 || 259–273 || Altitude in meters || Divide by 100 for float value | ||
|- | |- | ||
| Power Status || 1 || | | Power Status || 1 || 274 || Power connection status || 0: Power disconnected, 1: Power connected | ||
|- | |- | ||
| Ignition Status || 1 || | | Ignition Status || 1 || 275 || Ignition status || 0: OFF, 1: ON | ||
|- | |- | ||
| Immobilizer Status || 1 || | | Immobilizer Status || 1 || 276 || Immobilizer status || 0: OFF, 1: ON | ||
|- | |- | ||
| Tamper || 1 || | | Tamper detection || 1 || 277 || Wire Tamper detection || 0: Tamper alert OFF, 1: Tamper alert ON | ||
|- | |- | ||
| Supply Voltage || | | Supply Voltage || 10 || 278–287 || Supply voltage || Divide by 10 for float value | ||
|- | |- | ||
| Internal Battery Voltage || 6 || | | Internal Battery Voltage || 6 || 288–293 || Internal battery voltage || Divide by 10 for float value | ||
|- | |- | ||
| | |FuelSensorstatus 1 || 1 || 294 || Status of fuel sensor 1 || 1 if connected, 0 if not connected | ||
|- | |- | ||
| Fuel Percentage 1 || | | Fuel Percentage 1 || 10 ||295–304 || Fuel level percentage || Divide by 10 for float value | ||
|- | |- | ||
| Fuel SensorValue | | Fuel SensorValue 1 || 16 || 305–320 || Fuel sensor value || Divide by 10 if float | ||
|- | |- | ||
| | |FuelSensorstatus 2 || 1 || 321|| Status of fuel sensor 2 || 1 if connected, 0 if not connected | ||
|- | |- | ||
| Fuel | | Fuel Percentage 2 || 10 ||322–331 || Fuel level percentage || Divide by 10 for float value | ||
|- | |- | ||
| Fuel | | Fuel SensorValue 2 || 16 || 332–347 || Fuel sensor value || Divide by 10 if float | ||
|- | |- | ||
| | |FuelSensorstatus 3 || 1 || 348|| Status of fuel sensor 3 || 1 if connected, 0 if not connected | ||
|- | |- | ||
| | | Fuel Percentage 3 || 16 || 349–358 || Fuel sensor value || Divide by 10 if float | ||
|- | |- | ||
| | | Fuel SensorValue 3 || 16 || 359–374 || Fuel level percentage || Divide by 10 for float value | ||
|- | |- | ||
| | | Analog Input 1 || 10 || 375–384 || Analog input || Divide by 10 for float value | ||
|- | |- | ||
| | | Analog Input 2 || 10 || 385–394 || Analog input 1 || Divide by 10 for float value | ||
|- | |- | ||
| Digital | | Digital Input 1 || 1 || 395 || Digital input 1 || 0 or 1 | ||
|- | |- | ||
| | | Digital Input 2 || 1 || 396 || Digital input 2 || 0 or 1 | ||
|- | |- | ||
| | | Digital Output 1 || 1 || 397 || Digital output 1 || 0 or 1 | ||
|- | |- | ||
| | | Digital Output 2 || 1 || 398 || Digital output 2 || 0 or 1 | ||
|- | |- | ||
| Temperature | | Temperature sensor status 1 || 1 || 399 || Status of temperature sensor 1 || 1 if connected, 0 if not connected | ||
|- | |- | ||
| Temperature | | Temperature 1 || 12 || 400–411 || Temperature in °C || Signed, divide by 10 for decimal value | ||
|- | |- | ||
| Temperature | | Temperature sensor status 2 || 1 || 412 || Status of temperature sensor 2 || 1 if connected, 0 if not connected | ||
|- | |- | ||
| | | Temperature 2 || 12 || 413–424 || Temperature in °C || Signed, divide by 10 for decimal value | ||
|- | |- | ||
| | | Temperature sensor status 3 || 1 || 425 || Status of temperature sensor 3 || 1 if connected, 0 if not connected | ||
|- | |- | ||
| | | Temperature 3 || 12 || 426–437 || Temperature in °C || Signed, divide by 10 for decimal value | ||
|- | |- | ||
| TimeZone || 8 || | | Humidity || 7 || 438–444 || Humidity percentage || Integer value | ||
Timezone in quarter-hours (e.g., 22 = +5:30). | |- | ||
Each unit = 15 mins. | | Odometer || 35 || 445–479 || Odometer value in meters || | ||
Value 22 = 22 × 15 mins = 330 mins = +5:30 | |- | ||
Range: -48 to 56, 2's complement || | | DateTime UTC || 32 ||480–511|| UTC Timestamp || UTC time in seconds | ||
|- | |||
| TimeZone || 8 || 512–519 || Timezone in quarter-hours (e.g., 22 = +5:30). Each unit = 15 mins. Value 22 = 22 × 15 mins = 330 mins = +5:30 Range: -48 to 56, 2's complement ||Timezone in quarter-hours | |||
|- | |- | ||
! colspan="5" "style="background:#D3D3D3;" | Tail | ! colspan="5" "style="background:#D3D3D3;" | Tail | ||
| Line 132: | Line 134: | ||
==Sample Packet== | ==Sample Packet== | ||
<pre> | <pre> | ||
HEX " | HEX "240370e21aeb7abfd5818011047aca0260081b780000000000000000000000000000307890000000000000000000000000000000000000000000000068a7f192162abf" | ||
JSON | |||
{ | {"imei": 862942074896044, "packet_type": 1, "no_packets": 1, "packet_status": 1, "frame_number": 34, "alert_id": 1, "operator": 1, "signal_strength": 29, "mcc": 404, "mnc": 19, "cell_id": 64, "lac": 56256, "fix_status": 0, "latitude": 0.0, "latitude_dir": 0, "longitude": 0.0, "longitude_dir": 0, "hdop": 0.0, "pdop": 0.0, "speed": 0.0, "altitude": 0.0, "power": 1, "ignition": 1, "immobilizer": 0, "tamper": 0, "supply_volatge": 12.0, "internal_battery_volatge": 3.6, "fuel_sensor_status_1": 0, "fuel_percentage_1": 0.0, "fuel_value_sensor_1": 0, "fuel_sensor_status_2": 0, "fuel_percentage_2": 0.0, "fuel_value_sensor_2": 0, "fuel_sensor_status_3": 0, "fuel_percentage_3": 0.0, "fuel_value_sensor_3": 0, "analog_input1": 0.0, "analog_input2": 0.0, "digital_input1": 0, "digital_input2": 0, "digital_output1": 0, "digital_output2": 0, "temp_sensor_status_1": 0, "temperature_1": 0.0, "temp_sensor_status_2": 0, "temperature_2": 0.0, "temp_sensor_status_3": 0, "temperature_3": 0.0, "humidity": 0, "odometer": 0, "dateTime": 1755836818, "timezone": 22, "dateTime_tz": "2025-08-22 09:56:58", "error_code": 0 | ||
"imei": | |||
"packet_type": 1, | |||
"no_packets": 1, | |||
"packet_status": 1, | |||
"frame_number": | |||
"alert_id": | |||
"operator": | |||
"signal_strength": 29, | |||
"mcc": 404, "mnc": | |||
"cell_id": | |||
"lac": | |||
"fix_status": 0, | |||
"latitude": 0.0, | |||
"latitude_dir": 0, | |||
"longitude": 0.0, | |||
"longitude_dir": 0, | |||
"hdop": 0.0, | |||
"pdop": 0.0, | |||
"speed": 0.0, | |||
"altitude": 0.0, | |||
"power": | |||
"ignition": | |||
"immobilizer": 0, | |||
"tamper": 0, | |||
"supply_volatge": | |||
"internal_battery_volatge": 3. | |||
"fuel_sensor_status_1": 0, | |||
"fuel_percentage_1": 0.0, | |||
"fuel_value_sensor_1": 0, | |||
"fuel_sensor_status_2": 0, | |||
"fuel_percentage_2": 0.0, | |||
"fuel_value_sensor_2": 0, | |||
"fuel_sensor_status_3": 0, | |||
"fuel_percentage_3": 0.0, | |||
"fuel_value_sensor_3": 0, | |||
"analog_input1": 0.0, | |||
"analog_input2": 0.0, | |||
"digital_input1": 0, | |||
"digital_input2": 0, | |||
"digital_output1": 0, | |||
"digital_output2": 0, | |||
"temp_sensor_status_1": 0, | |||
"temperature_1": 0.0, | |||
"temp_sensor_status_2": 0, | |||
"temperature_2": 0.0, | |||
"temp_sensor_status_3": 0, | |||
"temperature_3": 0.0, | |||
"humidity": 0, | |||
"odometer": 0, | |||
"dateTime": | |||
"timezone": 22, | |||
"dateTime_tz": "2025- | |||
"error_code": 0 | |||
} | } | ||
</pre> | </pre> | ||
| Line 197: | Line 146: | ||
<title>Telemetry Packet Parser</title> | <title>Telemetry Packet Parser</title> | ||
<style> | <style> | ||
body { font-family: Arial, sans-serif | body { font-family: Arial, sans-serif; } | ||
textarea { width: 100%; height: 100px; font-family: monospace; } | textarea { width: 100%; height: 100px; font-family: monospace; } | ||
button { | button { | ||
padding: 10px ; | padding: 10px 20px; | ||
border-radius: | border-radius: 50px; | ||
font-weight: bold; | font-weight: bold; | ||
background-color: #680022; | background-color: #680022; | ||
| Line 211: | Line 160: | ||
background-color: #4c0019; | background-color: #4c0019; | ||
} | } | ||
table { width: 100%; border-collapse: collapse; | table { width: 100%; border-collapse: collapse; margin-top: 20px; } | ||
th, td { | th, td { border: 1px solid #ccc; padding: 8px; text-align: left; } | ||
th { background-color: #680022; color: white; } | th { background-color: #680022; color: white; } | ||
</style> | </style> | ||
| Line 219: | Line 168: | ||
<h2>Telemetry Packet Parser</h2> | <h2>Telemetry Packet Parser</h2> | ||
<textarea id="hexInput" placeholder="Paste | <textarea id="hexInput" placeholder="Paste packet here..."></textarea><br> | ||
<button onclick="parseTelemetry()">Parse Packet</button> | <button onclick="parseTelemetry()">Parse Packet</button> | ||
| Line 227: | Line 176: | ||
<tbody></tbody> | <tbody></tbody> | ||
</table> | </table> | ||
<script> | <script> | ||
function hexToBits(hex) { | function hexToBits(hex) { | ||
| Line 254: | Line 202: | ||
if (!hex || !hex.startsWith("24")) { | if (!hex || !hex.startsWith("24")) { | ||
alert("Invalid packet | alert("Invalid packet"); | ||
return; | return; | ||
} | } | ||
| Line 346: | Line 294: | ||
} | } | ||
</script> | </script> | ||
</body> | </body> | ||
</html> | </html> | ||
Latest revision as of 05:06, 4 February 2026
| Field | Size (bits) | Bit Range | Description | Breakdown |
|---|---|---|---|---|
| Header (10 bytes) | ||||
| Start byte | 8 | 0–7 | Starting character $ (ASCII value 36) | $ |
| Data length | 12 | 08–19 | 2-byte length of the data following the header | |
| Num of data packets | 5 | 20–24 | Number of packets (0–32) | 0–32 |
| IMEI | 50 | 25–74 | Unique device identifier | e.g., 887744556677882 |
| packet type | 5 | 75–79 | Integer type:
|
01 - Telemetry Packet |
| Data (= 55 bytes × number of packets) | ||||
| Packet Status | 1 | 80 | Type of packet | 0:History, 1:Live |
| Frame Number | 16 | 81-96 | Frame number | |
| AlertID | 5 | 97–101 | Alert identifier | |
| Operator | 4 | 102–105 | Network operator | 00-Unknown, 01-BSNL, 02-VI, 03-AIRTEL, 04-JIO |
| Signal Strength | 5 | 106–110 | Signal strength | Integer (0–31) |
| MCC | 10 | 111–120 | Mobile country code | Integer |
| MNC | 10 | 121–130 | Mobile network code | Integer |
| Cell Id | 16 | 131–146 | Cell tower ID | Integer |
| Location Area Code | 16 | 147–162 | Location area code | Integer |
| Fix_status | 1 | 163 | GPS fix status | 0: No fix, 1: Valid Fix |
| Latitude | 29 | 164–192 | Latitude coordinate | Divide by 1,000,000 for float value |
| NS_Indication | 1 | 193 | N or S | 0: N, 1: S |
| Longitude | 29 | 194–222 | Longitude coordinate | Divide by 1,000,000 for float value |
| EW_Indication | 1 | 223 | East/West Indication | 0: E, 1: W |
| HDOP | 10 | 224–233 | Horizontal dilution | Divide by 100 for float value |
| PDOP | 10 | 234–243 | Position dilution | Divide by 100 for float value |
| Speed | 15 | 244–258 | Speed in km/h | Divide by 100 for float value |
| Altitude | 15 | 259–273 | Altitude in meters | Divide by 100 for float value |
| Power Status | 1 | 274 | Power connection status | 0: Power disconnected, 1: Power connected |
| Ignition Status | 1 | 275 | Ignition status | 0: OFF, 1: ON |
| Immobilizer Status | 1 | 276 | Immobilizer status | 0: OFF, 1: ON |
| Tamper detection | 1 | 277 | Wire Tamper detection | 0: Tamper alert OFF, 1: Tamper alert ON |
| Supply Voltage | 10 | 278–287 | Supply voltage | Divide by 10 for float value |
| Internal Battery Voltage | 6 | 288–293 | Internal battery voltage | Divide by 10 for float value |
| FuelSensorstatus 1 | 1 | 294 | Status of fuel sensor 1 | 1 if connected, 0 if not connected |
| Fuel Percentage 1 | 10 | 295–304 | Fuel level percentage | Divide by 10 for float value |
| Fuel SensorValue 1 | 16 | 305–320 | Fuel sensor value | Divide by 10 if float |
| FuelSensorstatus 2 | 1 | 321 | Status of fuel sensor 2 | 1 if connected, 0 if not connected |
| Fuel Percentage 2 | 10 | 322–331 | Fuel level percentage | Divide by 10 for float value |
| Fuel SensorValue 2 | 16 | 332–347 | Fuel sensor value | Divide by 10 if float |
| FuelSensorstatus 3 | 1 | 348 | Status of fuel sensor 3 | 1 if connected, 0 if not connected |
| Fuel Percentage 3 | 16 | 349–358 | Fuel sensor value | Divide by 10 if float |
| Fuel SensorValue 3 | 16 | 359–374 | Fuel level percentage | Divide by 10 for float value |
| Analog Input 1 | 10 | 375–384 | Analog input | Divide by 10 for float value |
| Analog Input 2 | 10 | 385–394 | Analog input 1 | Divide by 10 for float value |
| Digital Input 1 | 1 | 395 | Digital input 1 | 0 or 1 |
| Digital Input 2 | 1 | 396 | Digital input 2 | 0 or 1 |
| Digital Output 1 | 1 | 397 | Digital output 1 | 0 or 1 |
| Digital Output 2 | 1 | 398 | Digital output 2 | 0 or 1 |
| Temperature sensor status 1 | 1 | 399 | Status of temperature sensor 1 | 1 if connected, 0 if not connected |
| Temperature 1 | 12 | 400–411 | Temperature in °C | Signed, divide by 10 for decimal value |
| Temperature sensor status 2 | 1 | 412 | Status of temperature sensor 2 | 1 if connected, 0 if not connected |
| Temperature 2 | 12 | 413–424 | Temperature in °C | Signed, divide by 10 for decimal value |
| Temperature sensor status 3 | 1 | 425 | Status of temperature sensor 3 | 1 if connected, 0 if not connected |
| Temperature 3 | 12 | 426–437 | Temperature in °C | Signed, divide by 10 for decimal value |
| Humidity | 7 | 438–444 | Humidity percentage | Integer value |
| Odometer | 35 | 445–479 | Odometer value in meters | |
| DateTime UTC | 32 | 480–511 | UTC Timestamp | UTC time in seconds |
| TimeZone | 8 | 512–519 | Timezone in quarter-hours (e.g., 22 = +5:30). Each unit = 15 mins. Value 22 = 22 × 15 mins = 330 mins = +5:30 Range: -48 to 56, 2's complement | Timezone in quarter-hours |
| Tail | ||||
| End Character | 8 | 0–7 | Starting character * (ASCII value 42) | * |
| CRC | 8 | 8–15 | 8-bit XOR CRC of data starting from $ to * (excluding $ and *) | |
Sample Packet
HEX "240370e21aeb7abfd5818011047aca0260081b780000000000000000000000000000307890000000000000000000000000000000000000000000000068a7f192162abf"
JSON
{"imei": 862942074896044, "packet_type": 1, "no_packets": 1, "packet_status": 1, "frame_number": 34, "alert_id": 1, "operator": 1, "signal_strength": 29, "mcc": 404, "mnc": 19, "cell_id": 64, "lac": 56256, "fix_status": 0, "latitude": 0.0, "latitude_dir": 0, "longitude": 0.0, "longitude_dir": 0, "hdop": 0.0, "pdop": 0.0, "speed": 0.0, "altitude": 0.0, "power": 1, "ignition": 1, "immobilizer": 0, "tamper": 0, "supply_volatge": 12.0, "internal_battery_volatge": 3.6, "fuel_sensor_status_1": 0, "fuel_percentage_1": 0.0, "fuel_value_sensor_1": 0, "fuel_sensor_status_2": 0, "fuel_percentage_2": 0.0, "fuel_value_sensor_2": 0, "fuel_sensor_status_3": 0, "fuel_percentage_3": 0.0, "fuel_value_sensor_3": 0, "analog_input1": 0.0, "analog_input2": 0.0, "digital_input1": 0, "digital_input2": 0, "digital_output1": 0, "digital_output2": 0, "temp_sensor_status_1": 0, "temperature_1": 0.0, "temp_sensor_status_2": 0, "temperature_2": 0.0, "temp_sensor_status_3": 0, "temperature_3": 0.0, "humidity": 0, "odometer": 0, "dateTime": 1755836818, "timezone": 22, "dateTime_tz": "2025-08-22 09:56:58", "error_code": 0
}
Telemetry Packet Parser
Parsed Output:
| Field | Value |
|---|