Python RSSI Modbus Script

Замовник: AI | Опубліковано: 11.02.2026

I’m running an InHand IG502 cellular gateway and need a focused Python add-on that exposes the unit’s current RSSI (raw dBm) as a holding register inside the built-in Modbus server. The immediate aim is simply to monitor signal quality; once the value is available we will pass it through our existing RS-485 link into the DNP3 layer of the external SCADA. Key points you should know while coding: • Device: InHand IG502 (OpenWrt-based, Python 3 available). • Output format: raw signal strength value, no scaling or percentage. • Register must be readable via Modbus-TCP and Modbus-RTU so I can map it downstream. Byte order can be little-endian; just document what you use. • Communication onward to DNP3 happens on my side, so the script only has to populate the Modbus register reliably. Deliverables 1. Clean, well-commented Python script (ideally using pymodbus or native socket calls) that: • polls the gateway for RSSI every N seconds (configurable). • updates a user-defined holding register without blocking other traffic. 2. A short README outlining: • how to deploy the script on the IG502, • any package dependencies, • the register address chosen and data type. 3. Simple test routine or CLI command I can run to verify the register is updating. Acceptance criteria • When I query the defined register from a Modbus master I receive the same RSSI value shown in the IG502 web UI. • Script survives reboot (I’ll place it in /etc/rc.local; just note any extra steps). • No impact on existing gateway functions. If you have firsthand experience with InHand gateways, Modbus mapping, or DNP3 integrations, that’s a plus. Let me know your approach and estimated turnaround,