AI-Powered Router Diagnostics for OpenWrt. Designed for the Xunison Exigo D50 5G (Qualcomm ipq50xx, Quectel RM500Q-AE modem, mainline ath11k WiFi).
RouterDiag is a lightweight diagnostic and monitoring tool that continuously tracks LTE signal performance, network stability, and system health. It leverages the Google Gemini AI (e.g., gemini-2.5-flash) to analyse telemetry data and provide actionable recommendations for network optimisation.
- Dynamic Sensor Monitoring: Automatically detects and allows selection of multiple hardware temperature sensors (CPU, WiFi, UBI, etc.).
- Per-Sensor Thresholds: Customisable warning and critical temperature ranges for each individual sensor.
- Signal & System Telemetry: Tracks RSRP, RSRQ, RSSI, SNR, Carrier Aggregation status, CPU load, and memory usage.
- LuCI Web Interface: Integrated dashboard for real-time monitoring and easy configuration of all parameters including sensors.
- AI-Powered Analysis: Sends collected metrics to Gemini for expert diagnosis.
- Email Alerts: Automated notifications via
msmtpfor critical events (e.g., low signal, high temperature). - Auto-Fix Capabilities: Automatically attempts to restart services or reload the firewall if issues are detected.
- External Logging: Stores history on USB storage to protect internal flash memory.
usr/bin/router-diag: The main diagnostic script.etc/init.d/router-diag: OpenWrt procd init script for automatic startup.
- OpenWrt 21.x, 22.x, 23.x, or SNAPSHOT.
sms_toolfor modem communication.msmtpfor email notifications.curlfor AI API interactions.- A valid Google Gemini API Key.
- Copy
usr/bin/router-diagto/usr/bin/. - Copy
etc/init.d/router-diagto/etc/init.d/. - Make both scripts executable:
chmod +x /usr/bin/router-diag /etc/init.d/router-diag. - Enable the service:
/etc/init.d/router-diag enable. - Run the setup:
router-diag setup.
router-diag {setup|start|stop|status|analyze|history|log|config}Created by Steve Meek