I found a post by Base122 with some scripts to monitor signal strength. I have taken part of his info script (ATT PPP INFO), as seen below. When i manually disable the radio, and run the script i get the ppp info and i write the signal strength to a global. Since it has to take down the only communication interface i wanted to create a scheduled job that runs every hour to take down the interface and check signal strength and write to the global. This is only for debugging signal strength so i would let it run for 24 hours then turn it off. The issue, is when i run the CheckSignalStrength either manually or scheduled it never gets any data for signal strength. Basically i need a way to log hourly signal strength for 24 hours. Does anybody see any reason that the CheckSignalStrength would not work. I do see that the ATT PPP INFO job get created, but it always returns with no data.
Script: CheckSignalStrength
:log info "Starting Check For Signal Strength";
:log info "Disabling ATT Interface";
/interface ppp-client disable ATT
:delay 4s;
execute "/system script run \"ATT PPP INFO\"";
:global signalstrength
:log info "Current Signal Strengthx: $signalstrength";
:log info "Enable ATT Interface";
/interface ppp-client enable ATT
:log info "Signal Strength Check Completed";
Script: ATT PPP INFO
## This script only works if the ATT interface is disabled prior to running.
:log info "Starting Signal Strength Check";
# Set the PPP interface name #
:local pppName "ATT";
# Define the email address to receive PPP Info report #
:local emailAddress "epierce@innovari.com"
:local i 0;
global pppUptime;
:local pppID [/interface ppp-client find name=$pppName];
# Variables to hold PPP Info #
:local String1;
:local String2;
:local pppInfoString;
# Variable to hold PPP interface current IP address #
:local currentIP;
# Get System Identity #
:local SystemID [/system identity get name];
:local pppStatus;
:if ([/interface get [find name=$pppName ] running ]=true) do={
:set pppStatus "Running";
### Get the address of the specified wan interface ###
:set currentIP [/ip address get [find interface=$pppName] address];
:set currentIP [:pick $currentIP 0 [:find $currentIP "/"]]
} else={
:set pppStatus "Disabled";
}
:global SysDate [/system clock get date]
:global SysTime [/system clock get time]
:global signalstrength
:local lastSig $signalstrength
#:log info "Last $lastSig";
# Create the information File #
/file print file="$SystemID-$pppName-PPP-info";
# Start of info command
/interface ppp-client info $pppID do={
:set i ($i+1);
# for some reason this loop must run at least 3 times to set the system variables #
# set to run 5 times to be sure #
:if ($i=5) do={
# non info command stuff #
:set String1 "Date: $SysDate\nTime: $SysTime\nSystem ID: $SystemID\nPPP Interface: $pppName\nPPP Interface Status: $pppStatus\nIP Address: $currentIP\nUptime: $pppUptime\n";
:set String2 "Modem Status: $"status"\nPin Status: $"pin-status"\nFunctionality: $"functionality"\nManufacturer: $"manufacturer"\nModel: $"model"\nRevision: $"revision"\nSerial Number: $"serial-number"\nCurrent Operator: $"current-operator"\nAccess Technology: $"access-technology"\nSignal Strength: $"signal-strengh"";
:set pppInfoString "$String1$String2";
#:log info $pppInfoString;
:log info "Current Signal Strength: $"signal-strengh"";
:global signalstrength "$lastSig \r\nSignal Strength: $"signal-strengh"";
# Populate file with required information #
/file set "$SystemID-$pppName-PPP-info" contents=$pppInfoString;
:log info "PPP Info $pppName Script Completed";
## Must now stop this script, or info will run forever ##
/system script job remove [find script=ATTPPPinfoUptime ];
}}
Any help is much appreciated. We are using the RB411UHAR with an ATT Sierra 8750 radio. Thanks to Base122, for getting me headed down this direction.
Thanks.
Eric.