Jump to content

Device Info Packet: Difference between revisions

From Transight Wiki
No edit summary
No edit summary
Line 269: Line 269:
   };
   };


  const fields = [
def get_precise_device_info_packet_fields():
     ["Start Character", 0, 8],
     return [
    ["Length", 8, 18],
        ("Start Character", 0, 8),
    ["No of Packets", 19, 23],
        ("Length", 8, 20),
    ["IMEI", 24, 74],
        ("No of Packets", 20, 25),
    ["Packet Type", 75, 79],
        ("IMEI", 25, 75),
    ["Time", 80, 111],
        ("Packet Type", 75, 80),
    ["Time Zone", 112, 119],
        ("Time", 80, 112),
    ["ICCID", 120, 279],
        ("Time Zone", 112, 119),
    ["VID", 280, 311],
        ("ICCID", 120, 279),   # 20 bytes = 160 bits
    ["CELLULAR_MODULE_FV NAME", 312, 351],
        ("VID", 280, 311),     # 4 bytes = 32 bits
    ["CELLULAR_MODULE_FV VERSION", 352, 431],
        ("CELLULAR_MODULE_FV NAME", 312, 351),   # 5 bytes = 40 bits
    ["CELLULAR_MODULE_FV BUILD NO", 432, 471],
        ("CELLULAR_MODULE_FV VERSION", 352, 431), # 10 bytes = 80 bits
    ["MCU_APP_MODULE_FV NAME", 472, 511],
        ("CELLULAR_MODULE_FV BUILD NO", 432, 471),# 5 bytes = 40 bits
    ["MCU_APP_MODULE_FV VERSION", 512, 591],
        ("MCU_APP_MODULE_FV NAME", 472, 511),     # 5 bytes = 40 bits
    ["MCU_APP_MODULE_FV BUILD NO", 592, 631],
        ("MCU_APP_MODULE_FV VERSION", 512, 591), # 10 bytes = 80 bits
    ["MCU_BTL_MODULE_FV NAME", 632, 671],
        ("MCU_APP_MODULE_FV BUILD NO", 592, 631), # 5 bytes = 40 bits
    ["MCU_BTL_MODULE_FV VERSION", 672, 751],
        ("MCU_BTL_MODULE_FV NAME", 632, 671),     # 5 bytes = 40 bits
    ["MCU_BTL_MODULE_FV BUILD NO", 752, 791],
        ("MCU_BTL_MODULE_FV VERSION", 672, 751), # 10 bytes = 80 bits
    ["VN", 792, 878],
        ("MCU_BTL_MODULE_FV BUILD NO", 752, 791), # 5 bytes = 40 bits
    ["HWINFO", 879, 958],
        ("VN", 792, 871),                         # 11 bytes = 88 bits
    ["End Character", 959, 967],
        ("HWINFO", 872, 959),                     # 10 bytes = 80 bits
    ["CRC", 968, 976]
        ("End Character", 0, 7),
  ];
        ("CRC", 8, 15)
 
    ];
   for (const [label, start, end] of fields) {
   for (const [label, start, end] of fields) {
     const val = bits.slice(start, end);
     const val = bits.slice(start, end);

Revision as of 11:09, 16 July 2025

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
Number of data packets 5 20–24 Number of packets (0–32) 0–32
IMEI 50 25–74 Unique device identifier
Packet type 5 75–79 Type of packet 00 - Device Info
Data
Time 32 UTC Timestamp UTC time in seconds
Time Zone 8 Timezone in quarter-hours (e.g., 22 = +5:30), quarter-hour increment means each unit represents 15 minutes. The value 22 represents 22 quarter hours. Ranges from -48 to 56, negative timezone to 2's complement representation eg: 22 (+5:30) → 22×15=330 minutes → 330÷60=5.5 hours → 5 hours and 30 minutes
ICCID 160 20 Bytes, Character string 8991000903297069053F
VID 32 4 Bytes, Character string TRAN
CELLULAR_MODULE_FV NAME 40 5 Bytes, Character string TSPJT
CELLULAR_MODULE_FV VERSION 80 10 Bytes, Character string XX.YY.ZZZZ
CELLULAR_MODULE_FV BUILD NO 40 5 Bytes, Character string YYDDD
MCU_APP_MODULE_FV NAME 40 5 Bytes, Character string TSPJT
MCU_APP_MODULE_FV VERSION 80 10 Bytes, Character string XX.YY.ZZZZ
MCU_APP_MODULE_FV BUILD NO 40 5 Bytes, Character string YYDDD
MCU_BTL_MODULE_FV NAME 40 5 Bytes, Character string TSPJT
MCU_BTL_MODULE_FV VERSION 80 10 Bytes, Character string XX.YY.ZZZZ
MCU_BTL_MODULE_FV BUILD NO 40 5 Bytes, Character string YYDDD
VN 80 10 Bytes, Character string KL07CP8490
HWINFO 88 11 Bytes, Character string PCB-0220-AB
Tail(2 Bytes)
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":                                                                                                "2406e0e1cabd09208ca06822dac31638393931393530393132393633373932393630000000000545344324720322e20302e202020312020202030545344324e20312e20312e202020313235303935545344324220302e20302e2020203020202020305e0100005e0100005e015043422d303232302d41422a1c",
 "cmfv_build": "0",
 "cmfv_name": "TSD2G",
 "cmfv_version": "2. 0. 1",
 "dateTime": 1747114691,
 "dateTime_tz": "2025-05-13 11:08:11.000",
 "hwinfo_build": "PCB-0220-AB",
 "iccid": "8991950912963792962\u0000",
 "imei": 860187062240357,
 "insert_time": "Tue, 13 May 2025 05:38:15 GMT",
 "mcua_build": "25095",
 "mcua_name": "TSD2N",
 "mcua_version": "1. 1.1",
 "mcub_build": "0",
 "mcub_name": "TSD2B",
 "mcub_version": "0.0.0",
 "packetType": 0,
 "send_time": "2025-05-13 11:08:11",
 "timezone": 22,
 "vid": "\u0000\u0000\u0000\u0000",
 "vn": "^\u0001\u0000\u0000^\u0001\u0000\u0000^\u0001"

Device Info Packet Parser

Device Info Packet Parser


Parsed Output:

FieldValue