A script for signal fade problems requiring freq change

I wrote a combination script for people who have signal fade that is strange. I have a major backhaul that for days or weeks will work great with a -64/-68 signal, then one day it will keep dropping and have a -88 signal. Change it from 5745, to 5755 (for superchannel) or 5765, and it works fine again. A couple days later it will have to go back to 5745 to work again or suffer from signal fade.

So instead of being bothered by phone calls on the nights / weekend, I wrote this simple combination of Netwatch, Scheduler and a Script. I run superchannel, for those of you who don’t, change the +5 to +20, and the 5775 to whatever you want the high number to be and 5745 to be the low number.

Here it is:
/system script add name=“setNextFreq” source=“:local f1\r\n :set f1 ([/int wireless get Backhaul frequency] + 5)\r\n :if ($f1 = 5775)
do{\r\n\t:set f1 5745\r\n }\r\n /int wireless set
Backhaul frequency=$f1\r\n”

The scheduler item:
/system scheduler add name=“setNext” on-event=“/system script run setNextFreq” interval=20s

The Netwatch entry:
/tool netwatch add host=—THE OTHER IP ADDRESS-- timeout=1s interval=2s up-script=“/system scheduler disable delayStart\r\n/system
scheduler disable setNext\r\n " down-script=”:delay 15 \r\n/system scheduler enable setNext"


This whole bunch of stuff basically does this:

  1. When the Netwatch IP goes down, it activates a 15 second delay.
  2. After 15 seconds, it changes the channel, and waits 20 seconds.
  3. If the Netwatch IP comes back up, it deactivates the channel changer.
  4. If it doesn’t, it repeats until it comes online again.

Hopefully this will help someone, I couldn’t find anything like it on the forum.

Dear DirectWireless,

Doing a scan for limited time, eg ( 5 sec) or
doing /interface wireless frequency-monitor once,
seems doing the trick too. :slight_smile:

Could you write the script, that do the same,
but instead changing frequency, its
doing frequency monitor once.

Thank’s
//Budi

I’m not sure how to script freq monitor for a time period.. I’m curious to see if that fixes my problem though.

@DirectWireless

i noticed it seems you know about script writing on mikrotik. is it possible that i can write a script that will add certain options to system like. when i have a new customer because am not using hotspot, i have to use

ACCESS LIST
IP FIREWALL
QUEUES

to ensure that the customers dont get out of hand. is it possible that all i have to do is suplly the data of the client and the fields are auto updated. hope you knwo what i mean