Hello,
I want to send variables about the state of the 4G network by SMS with a script.
I manage to retrieve the variables and display their value in the terminal but when I receive my SMS, the text is empty.
Yet other variables work well like uptime or free memory.
I thought of characters that are not authorized via SMS but nothing confirmed.
I did not find anything like a similar problem on the forum.
Script:
#Local variable
:local PHONE1 #MYNUMBER
:local INTERFACE "lte1"
#get variables from system
:local UPTIME;
:local LTEINFO;
:local RSRQ;
:local SINR;
:local message "";
:set UPTIME [/system resource get uptime];
:set LTEINFO [/interface lte info $INTERFACE once as-value without-paging];
:set RSRQ [:pick $LTEINFO 17 [:find $LTEINFO " "]];
:set SINR [:pick $LTEINFO 20 [:find $LTEINFO " "]];
:put $SINR
:put $RSRQ
:set message ("Test " . $UPTIME . " " . $SINR . " " . $RSRQ);
/tool sms send port=$INTERFACE phone-number=$PHONE1 message=$message
Thank you in advance for your help.
Regards, Chris.