Last active
April 22, 2022 09:26
-
-
Save stevenma-code/c336bc34cf5a8dd834172046ad542597 to your computer and use it in GitHub Desktop.
Mikrotik 1. Reboot & 2. Obtain LTE Modem Signal Parameters & Other Info Using SMS Text
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# from: https://forum.mikrotik.com/viewtopic.php?t=177315 | |
name="smsreboot" owner="admin" | |
policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon | |
dont-require-permissions=no run-count=0 | |
source= | |
/tool sms send lte1 "mynumber" message="Okeydokey boss" | |
:delay 5s | |
/system reboot | |
# also from: https://forum.mikrotik.com/viewtopic.php?t=177315 | |
{ | |
:local phone "+1234567890" | |
:local curdate [/system clock get date] | |
:local curtime [/system clock get time] | |
:local monitor [/interface lte monitor lte1 once as-value] | |
:local registration ($monitor->"registration-status") | |
:local functionality ($monitor->"functionality") | |
:local operator ($monitor->"current-operator") | |
:local rssi ($monitor->"rssi") | |
:local rsrp ($monitor->"rsrp") | |
:local rsrq ($monitor->"rsrq") | |
:local cqi ($monitor->"cqi") | |
:local uptime ($monitor->"session-uptime") | |
/tool sms send lte1 phone-number=$phone \ | |
message="Registration: $registration\r\n\ | |
Functionality: $functionality\r\n\ | |
Operator: $operator\r\n\ | |
RSSI: $rssi\r\n\ | |
RSRP: $rsrp\r\n\ | |
RSRQ: $rsrq\r\n\ | |
CQI: $cqi\r\n\ | |
Time: $curtime\r\n\ | |
Date: $curdate\r\n\ | |
Uptime: $uptime" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment