Jump to content

OTA (Over-The-Air) Packet: Difference between revisions

From Transight Wiki
No edit summary
No edit summary
Line 1: Line 1:
{| class="wikitable"
{| class="wikitable"
! style="background-color:#800020; color:white;" | Field
! style="background-color:#800020; color:white;" | Size (bits)
! style="background-color:#800020; color:white;" | Bit Range
! style="background-color:#800020; color:white;" | Description
! style="background-color:#800020; color:white;" | Breakdown
|-
|-
! colspan="5" style="background:#D3D3D3;" | Header
! colspan="5" style="background:#D3D3D3;" | Header
|-
! Field !! Size (bits) !! Bit Range !! Description !! Breakdown
|-
|-
| Start byte || 8 || 0–7 || Starting character $ (ASCII value 36) || $
| Start byte || 8 || 0–7 || Starting character $ (ASCII value 36) || $

Revision as of 11:10, 17 June 2025

Field Size (bits) Bit Range Description Breakdown
Header
Start byte 8 0–7 Starting character $ (ASCII value 36) $
Data length 12 8–18 2-byte length of the data following the header
Num of data packets 5 19–23 Number of packets (0–32) 0 - 32
IMEI 50 24–74 Unique device identifier Integer type: e.g., 887744556677882
Packet Type 5 75–79 Type of packet

00 - Device info 01 - Alert packet 02 - OTA pkt 03 - ErrorPacket 04 - Device configuration packet 05 - IP configuration packet

Data
OTA Source 5 Source of OTA

00 - OTA_SRC_SERIAL 01 - OTA_SRC_SMS 02 - OTA_SRC_IP_TRANSIGHT 03 - OTA_SRC_IP_CUSTOMER

Error status 8 Non-zero value indicates an error NO ERROR = 0, ERROR = Non-zero value
Cell Number 51

First bit (MSB) with value 1 = number includes country code. If MSB = 0, number is without country code. Remaining 50 bits represent mobile number in integer format. || Example: 400D6276ACF52 (+919784312658)

Date & Time 32 UTC Timestamp UTC time in seconds
Timezone 8

Timezone in quarter-hours (e.g., 22 = +5:30) Quarter-hour increment = 15 minutes per unit Range: -48 to 56 (2’s complement for negative) || Example: 22 = 22 × 15 = 330 mins 330 ÷ 60 = 5.5 hrs = +5 hours 30 mins ahead of UTC

Command Length 8 Length of command string
Command max 600 bits (75 bytes) Input command with arguments, char array, terminated with null character

Example: SET CUIOCFG:IO1-DI-IGN*IO2_AN_GEN*IO3-DI-PBN*IO4-DO-IMB*

Response Length 8 Length of response string
Response max 512 bits (64 bytes) Response for particular command

Example: IOCFG:IO1-DI-IGN*IO2-AN_GEN*IO3-DI-PBN*IO4-DO-IMB*

Tail
End Character 8 0–7 Starting character * (ASCII value 42) *
CRC 8 Aug-15

8-bit XOR CRC of data starting from $ to * (excluding $ and *) ||

Sample Packet

 {"HEX:240340e1cabd09208ca210000000000000006824646f160947455420545355524c1c55524c3a5443503a3134312e3134372e3132382e3135303a383738382aa2",
  "cell_no": 0,
  "command": "GET TSURL",
  "command_length": 9,
  "dateTime": 1747215471,
  "dateTime_tz": "2025-05-14 15:07:51.000",
  "error_status": 0,
  "imei": 860187062240357,
  "insert_time": "Wed, 14 May 2025 09:38:03 GMT",
  "ota_source": 2,
  "packetType": 2,
  "response": "URL:TCP:141.147.128.150:8788",
  "response_length": 28,
  "send_time": "2025-05-14 15:07:51",
  "timezone": 22}