FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14455 questions

17168 answers

28195 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
108 views 0 comments
by anonymous
As someone who is still new to Teltonika products, I am wondering if anyone has advice on how to use the output pin to display the 4G SIM connection status with an external LED. While I know there is an LED on the Teltonika device itself, I plan to place the device in a sealed enclosure, and I'd like to connect it to an external LED that can be seen from outside the enclosure. Any insights or tips would be greatly appreciated. Thanks.

1 Answer

0 votes
by anonymous

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,