Jump to content

Device Info Packet: Difference between revisions

From Transight Wiki
No edit summary
No edit summary
Line 182: Line 182:
   <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 20px;
       padding: 10px 20px;
Line 196: Line 198:
       background-color: #4c0019;
       background-color: #4c0019;
     }
     }
     table { width: 100%; border-collapse: collapse; margin-top: 20px; }
     table {
     th, td { border: 1px solid #ccc; padding: 8px; text-align: left; }
      width: 100%;
     th { background-color: #680022; color: white; }
      border-collapse: collapse;
      margin-top: 20px;
    }
     th, td {
      border: 1px solid #ccc;
      padding: 8px;
      text-align: left;
    }
     th {
      background-color: #680022;
      color: white;
    }
   </style>
   </style>
</head>
</head>
Line 248: Line 261:
   };
   };


def get_structured_device_info_fields():
  const fields = [
     return [
     ["Start Character", 0, 8],
        ("Start Character", 0, 8),
    ["Length", 8, 20],
        ("Length", 8, 20),
    ["No of Packets", 20, 25],
        ("No of Packets", 20, 25),
    ["IMEI", 25, 75],
        ("IMEI", 25, 75),
    ["Packet Type", 75, 80],
        ("Packet Type", 75, 80),
    ["Time", 80, 112],
        ("Time", 80, 112),
    ["Time Zone", 112, 119],
        ("Time Zone", 112, 119),
    ["ICCID", 120, 279],
        ("ICCID", 120, 279),
    ["VID", 280, 311],
        ("VID", 280, 311),
    ["CELLULAR_MODULE_FV NAME", 312, 351],
        ("CELLULAR_MODULE_FV NAME", 312, 351),
    ["CELLULAR_MODULE_FV VERSION", 352, 431],
        ("CELLULAR_MODULE_FV VERSION", 352, 431),
    ["CELLULAR_MODULE_FV BUILD NO", 432, 471],
        ("CELLULAR_MODULE_FV BUILD NO", 432, 471),
    ["MCU_APP_MODULE_FV NAME", 472, 511],
        ("MCU_APP_MODULE_FV NAME", 472, 511),
    ["MCU_APP_MODULE_FV VERSION", 512, 591],
        ("MCU_APP_MODULE_FV VERSION", 512, 591),
    ["MCU_APP_MODULE_FV BUILD NO", 592, 631],
        ("MCU_APP_MODULE_FV BUILD NO", 592, 631),
    ["MCU_BTL_MODULE_FV NAME", 632, 671],
        ("MCU_BTL_MODULE_FV NAME", 632, 671),
    ["MCU_BTL_MODULE_FV VERSION", 672, 751],
        ("MCU_BTL_MODULE_FV VERSION", 672, 751),
    ["MCU_BTL_MODULE_FV BUILD NO", 752, 791],
        ("MCU_BTL_MODULE_FV BUILD NO", 752, 791),
    ["VN", 792, 871],
        ("VN", 792, 871),
    ["HWINFO", 872, 959],
        ("HWINFO", 872, 959),
    ["End Character", 960, 968],
        ("End Character", 960, 968),
    ["CRC", 968, 976]
        ("CRC", 968, 976)
  ];
    ]
 
   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:59, 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 : "2406e0e21aeb7abfd58068778b681638393931393530393132393633373932393833355452414e545344344720332e20302e202020342020202030545344345220332e20302e202020332020202030545344524220332e20302e202020312020202030585858585858585858585043422d303236312d41412ab9"
{"imei": 862942074896044, 
"packet_type": 0, "no_packets": 1, "dateTime": 1752664936, "timezone": 22, "dateTime_tz": "2025-07-16 16:52:16", "iccid": "89919509129637929835", "vid": "TRAN", "cmfv_name": "TSD4G", "cmfv_version": " 3. 0. 4", "cmfv_build": " 0", "mcua_name": "TSD4R", "mcua_version": " 3. 0. 3", "mcua_build": " 0", "mcub_name": "TSDRB", "mcub_version": " 3. 0. 1", "mcub_build": " 0", "vn": "XXXXXXXXXX", "hwinfo_build": "PCB-0261-AA", "error_code": 0, "raw_data": }

Device Info Packet Parser

Device Info Packet Parser


Parsed Output:

FieldValue