Hi RangerZ, great work! It work like a charm!
I have a suggestion… I scheduled a crontab job to fallback to ther first network every hour (wifiMgr.sh --force 1) and it’s working fine, but if I’m already connected to ssid1, it drop anyway the connection for few seconds, because it put wlan0 down, it scan ecc. ecc.
I’ve done this little mod to handle it…
Ciao
ema
NetChange()
{
if [ “$1” ]; then
ssid=net"$1"_ssid
eval ssid=$$ssid
msg=“Force connection to network $1: $ssid”
logger WifiMgr: $msg
echo $msg
cursid=$(uci get wireless.@wifi-iface[1].ssid)
if [ “$cursid” = “$ssid” ]; then
msg=“Already connected, nothing done!”
logger WifiMgr: $msg
echo $msg
return
fi
fi
logger WifiMgr: Performing network scan…
scanres=
ifconfig wlan0 down