Can anyone help me with the script to auto change frequencies if the total CCQ is below 15%? My site has many anonymous APs and sometime those APs jamned the frequency, so I always need to change the frequency manually. Really need help from MT scripting master out there. ![]()
bring up my post
bring up my problem
Use a script like this to cycle through frequencies:
/interface wireless
:local interface “wlan1”
:local freqList {2412;2417;2422;2427;2432;2437;2442;2447;2452;2457;2462}
:local freqListLen [:len $freqList]
:local freq [get $interface frequency]
:local pos [:find $freqList $freq]
monitor $interface once do={
:local ccq $“overall-tx-ccq”
:if ($ccq < 15) do={
:log info “CCQ: $ccq%. Too low, change frequency”
:set pos ($pos + 1)
:if ($pos = $freqListLen) do={
:set pos ($pos - $freqListLen)
}
set $interface frequency=[:pick $freqList $pos]
}
}You can also change the freqList array to contain only the frequencies you want to cycle through. So if you only want to cycle through a few, you could do something like this:
:local freqList {2412;2437;2462}Create a new schedule in /system scheduler that runs the script however often you want.
thanks a lot, will try it ![]()