Hi Guys,
I’m looking for some assistance regarding a script to reset the USB power, should a 3G modem lose it’s IP for whatever reason.
So, the scripts must monitor the 3G modem (i.e ppp1-out), be it the connection status, an IP, or anything else, and should the modem lose it’s connection/become disconnected, the script must then reset the usb power (/system routerboard usb\ power-reset duration=30), give the modem time to initialize/settle, and then resume monitoring, an added bonus would be if it could then update DNS.
I already have the DNS Update, and Power Reset scripts seperate (see below), so if the monitoring script can call other scripts, that would be just as great.
=======USB RESET=======
/system routerboard usb\ power-reset duration=30
=======DNS UPDATE======
:global host “freedns.afraid.org”
:global url “http://freedns.afraid.org/dynamic/update.php?====SOMERANDOMCHARS==”
/tool fetch url=$url host=$host
I would sincerely appreciate any assistance or tips in this regard.