Greetings,
I would need your kind help to know what to indicate in the RUTX09 script so that it sends me an SMS to a certain number every time it boots.
In RUT955 I indicated:
gsmctl -S -s “00391234567890 RUTX09 restart”
and it worked, but I don’t know what to indicate about this modem
Thank you so much
Roberto
Hello, Roberto
Thanks for reaching out to us.
Firstly, I’d like to inform you that all gsmctl commands work the same way on all RUT router modems. Therefore, the command gsmctl -S -s „phone_number RUTX09 restart’" should work without any issues on the RUTX09 device. If you encounter any problems, kindly provide the error messages you are receiving. Additionally, please share the “gsmctl -y” output so that we can check the modem version.
Secondly, could you confirm if you are using some custom scripts or if you have made edits to the “/etc/rc.local” file? The “rc.local” file is utilized to execute commands each time the router reboots. I strongly recommend employing this solution. You can access and modify the “rc.local” file by either going to Router WebUI → System → Custom Scripts in the user interface or by making changes through the command line interface using the command “vim /etc/rc.local”
Here are a couple of examples of changes you can make in the “rc.local” file to achieve the desired results:
Add these commands :
sleep 150
gsmctl -S -s „ recipient_phone_number specific_sms_text“
With these commands, an SMS message will be sent every time the router boots. However, it’s important to note that this solution may not be optimal because after 150 seconds, the modem may still not be connected, and therefore, the SMS will not be sent. Furthermore, the 150-second timeframe is provided as a reference and may vary depending on various parameters. It’s advisable to determine the specific duration it takes for your modem to establish a connection after boot.
Add this script
scipt.zip (541 Bytes)
With this script, every time the device boots, it will send a ping to 8.8.8.8. When a connection is established, it will send a message. This approach ensures that even if the modem takes more than 120 seconds to establish a connection, the script will continue to check for connectivity. For instance, if the connection is established after 150 seconds, an SMS message will be sent. Also, with this method the commands will not be executed if modem is not able to establish mobile connection.
Best Regards,
Julius
Dear thank you,
It happened to me that after entering the script, when I restarted the router, all the mobile signal LEDs flashed endlessly every 500 milliseconds, even though the connection had started regularly.
I had to shut down and restart and it did the same thing…I didn’t understand why.
However then I just needed to put sleep 60 before sending and it worked.
Thanks again for the help
This topic was automatically closed after 15 days. New replies are no longer allowed.