Hello
Hope someone can help a real noob. I have a Mikrotik SXT LTE. It works great but from time to time the 4G signal dies and I have to reboot the device.
The vendor told me its possible to write a simple script that will reboot the device automatically in this scenario but I don’t have a clue where to start. Can someone please point me in the right direction?
Thanks in advance!
DrJ
The easiest thing you can do is to configure Watchdog to reboot your device when ping to a specific host stops working. Depending on what IP you choose to ping, however, that has a potential disadvantage of producing a lot of false positives.
A somewhat more sophisticated way is to use Netwatch instead. It is also a ping-based tool, but it does not reboot your router blindly, but fires a script instead.
Finally, provided you can determine the state of your 4G link by checking some properties of your LTE interface, the best way to solve your problem is to fire your script periodically (like once a minute) by Scheduler. The script will then need to check interface properties, determine if the link is down and reboot your router if needed.
You can find general information about scripting in RouterOS here: Scripting. Then search the rest of the wiki for the commands you may need to use in your script. Check out the Interface and Interface/LTE pages in particular.
Thank you!!! Really appreciated. I’ll do some research.
Any idea why it just ‘loses’ 4G connection? I have a strong signal but unfortunately no decent fixed line provider. I have tried other 4G routers (TP Link, Asus, Huawei etc) but they were all a lot worse than the Microtik.
Watchdog looks perfect for what I’m trying to do.
One last question, any tips on how to set up Gmail? Given the IP is not guaranteed to be static is there another way to set up email using DNS ie smtp.gmail.com?