frequency changer
Posted: Sun Jun 21, 2009 1:28 pm
I had some problems with disturbance signal and i had to make this script.It works on router where interface is set in AP mode.
This is timeschedule and it's interval is 10 sec and call a script timeschange
It pings until there is one timeout.Then enables schedule-freqchange and disable timeschedule.
When the schedule-freqchange is enabled it calls a freqchange script
The part when the frequency is changed and after that you can see ping command.It's used as delay time.We know when the frequency is changed, it needs some time to get connected and that's why i set a ping command.To give that time.Otherwise it's going to change frequency in circles
Give me some comment about this one
This is timeschedule and it's interval is 10 sec and call a script timeschange
Code: Select all
:do {:global ping "[ping 62.240.12.12 count=1]"} while($ping=1);
/system scheduler enable schedule-freqchange;
/system scheduler disable timeschedule
When the schedule-freqchange is enabled it calls a freqchange script
Code: Select all
:if([/interface wireless get wlan1 frequency]=5000) do={ /interface wireless set wlan1 frequency=5470; /ping 62.240.12.12 count=10; /system scheduler enable timeschedule; /system scheduler disable schedule-freqchange } else={/interface wireless set wlan1 frequency=5000; /ping 62.240.12.12 count=10; /system scheduler enable timeschedule; /system scheduler disable schedule-freqchange}
Give me some comment about this one