FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

12615 questions

14984 answers

23964 comments

46769 members

0 votes
62 views 0 comments
by

Dear Sir or Madam,

is there any possibility to use an output which gives a positive or negative potential when the lte connection is interrupted?

I´d like to use the output from the power socket:

Output: digital open collector (OC) output; 30 V, 300 mA.

E.g. to connect an LED to the output of the router, which lights up when there is no longer an lte connection.

Many thanks in advance and kind regards.

Nicolai Hanelt

1 Answer

0 votes
by

Hello,

There is no direct way to realize this via WebUI, however, lt could be achievable using a script and placing it in /etc/rc.local file or in a System -> Custom scripts section in web interface. 

An example script is below:

#!/bin/ash
while [ 1 ]; do
 sleep 300
 ping 8.8.8.8 -s 0 -c 3 -q >/dev/null
 ret=$?
 if [ $ret -ne 0 ]; then
 ubus call ioman.gpio.dout1 update '{"value":"1"}'
 else
 ubus call ioman.gpio.dout1 update '{"value":"0"}'
 fi
done

The idea above is that router checks mobile connectivity by pinging google DNS three times every 5 minutes and, based on the results, either sets the digital output to high or low.

Best regards,