OTA PACKET PARSER: Difference between revisions
No edit summary |
No edit summary |
||
| Line 18: | Line 18: | ||
</head> | </head> | ||
<body> | <body> | ||
<h2>OTA Packet Parser</h2> | <h2>OTA Packet Parser</h2> | ||
<textarea id="hexInput" placeholder="Paste packet here..."></textarea><br> | <textarea id="hexInput" placeholder="Paste OTA packet hex here..."></textarea><br> | ||
<button | <button id="parseBtn">Parse OTA Packet</button> | ||
<h3>Parsed Output:</h3> | <h3>Parsed Output:</h3> | ||
| Line 52: | Line 53: | ||
} | } | ||
function parseIMEIFromHex(hex, bitStart, bitEnd) { | function parseIMEIFromHex(hex, bitStart, bitEnd) { | ||
const byteStart = bitStart / 8; | const byteStart = bitStart / 8; | ||
| Line 85: | Line 85: | ||
}; | }; | ||
// | // ✅ Corrected IMEI bit range: 24–74 | ||
const imei = parseIMEIFromHex(hex, | const imei = parseIMEIFromHex(hex, 24, 74); | ||
output("IMEI", imei); | output("IMEI", imei); | ||
| Line 125: | Line 125: | ||
output("Response", bitsToAscii(respBits)); | output("Response", bitsToAscii(respBits)); | ||
} | } | ||
// ✅ Attach parse function to button click | |||
document.getElementById("parseBtn").addEventListener("click", parseOTAPacket); | |||
</script> | </script> | ||
</body> | </body> | ||
</html> | </html> | ||
Revision as of 09:41, 21 July 2025
OTA Packet Parser
Parsed Output:
| Field | Value |
|---|