Hello,
You could try implementing a custom script to set output value to high and switch LED, when connection loss over mobile interface is detected:
Simply login to router's WebUI, navigate to System -> Custom scripts section and add a similar script:
#!/bin/ash
while [ 1 ]; do
sleep 5
ping -I wwan0 8.8.8.8 -s 0 -c 3 -q >/dev/null
ret=$?
if [ $ret -ne 0 ]; then
ubus call ioman.gpio.dout1 update '{"value":"0"}'
logger "Mobile connected"
else
ubus call ioman.gpio.dout1 update '{"value":"1"}'
logger "Mobile connected"
fi
done
The above script performs connection health check every 5 seconds by pinging 8.8.8.8 as well as adding a message in the logs to indicate connection status and sets output to high, when no responses are received.
Alternatively, you can configure the router to send an email or SMS, when mobile data disconnect is detected by the device in Services -> Events reporting, by configuring an instance of Mobile data type and setting Event subtype as Disconnected.
As an automatic recovery option, you can configure Automatic modem reboot in Services -> Auto reboot -> Ping/Wget reboot.
Best regards,