Antenna Alignment with RB/4xx LED & Beep Script

http://www.netware.ir
This is a good solution for MikroPoint Antenna
BEEP SCRIPT
:local beep “10ms”;
:local no “2400ms”;
:local s90 “1290ms”;
:local s85 “790ms”;
:local s80 “590ms”;
:local s77 “390ms”;
:local s74 “290ms”;
:local s71 “240ms”;
:local s68 “190ms”;
:local s65 “140ms”;
:local s62 “90ms”;
:local s59 “60ms”;
:local s56 “40ms”;
:local s53 “20ms”;
:local s50 “10ms”;
:for i from=1 to=100 do={
/interface wireless monitor wlan1 interval=1 do={
:if ($“signal-strength” <= -90) do={
:delay $no;
}
:if ($“signal-strength” <= -85 && $“signal-strength” > -90) do={
:for i from=1 to=2 do={ :beep length=$beep; :delay $s90; }
}
:if ($“signal-strength” <= -80 && $“signal-strength” > -85) do={
:for i from=1 to=3 do={ :beep length=$beep; :delay $s85; }
}
:if ($“signal-strength” <= -77 && $“signal-strength” > -80) do={
:for i from=1 to=4 do={ :beep length=$beep; :delay $s80; }
}
:if ($“signal-strength” <= -74 && $“signal-strength” > -77) do={
:for i from=1 to=6 do={ :beep length=$beep; :delay $s77; }
}
:if ($“signal-strength” <= -71 && $“signal-strength” > -74) do={
:for i from=1 to=8 do={ :beep length=$beep; :delay $s74; }
}
:if ($“signal-strength” <= -68 && $“signal-strength” > -71) do={
:for i from=1 to=10 do={ :beep length=$beep; :delay $s71; }
}
:if ($“signal-strength” <= -65 && $“signal-strength” > -68) do={
:for i from=1 to=12 do={ :beep length=$beep; :delay $s68; }
}
:if ($“signal-strength” <= -62 && $“signal-strength” > -65) do={
:for i from=1 to=16 do={ :beep length=$beep; :delay $s65; }
}
:if ($“signal-strength” <= -59 && $“signal-strength” > -62) do={
:for i from=1 to=24 do={ :beep length=$beep; :delay $s62; }
}
:if ($“signal-strength” <= -56 && $“signal-strength” > -59) do={
:for i from=1 to=34 do={ :beep length=$beep; :delay $s59; }
}
:if ($“signal-strength” <= -53 && $“signal-strength” > -56) do={
:for i from=1 to=48 do={ :beep length=$beep; :delay $s56; }
}
:if ($“signal-strength” <= -50 && $“signal-strength” > -53) do={
:for i from=1 to=80 do={ :beep length=$beep; :delay $s53; }
}
:if ($“signal-strength” <= -20 && $“signal-strength” > -50) do={
:for i from=1 to=120 do={ :beep length=$beep; :delay $s50; }
}
}
}


LED SCRIPT FOR ACCESS POINT

:for i from=1 to=100 do={
/interface wireless monitor wlan1 interval=1 do={
:if ($“registered-clients”=1 ) do={
:for i from=1 to=24 do={:led led5=yes; :led led4=yes; :led led3=yes; :led led2=yes; :led led1=yes; }
}
:if ($“registered-clients”=0 ) do={
:for i from=1 to=24 do={:led led5=no; :led led4=no; :led led3=no; :led led2=no; :led led1=no; }
}
:if ($“signal-strength” <= -63 && $“signal-strength” > -75) do={
:for i from=1 to=48 do={ :led led5=no; :led led4=no; :led led3=yes; :led led2=yes; :led led1=yes; }
}
:if ($“signal-strength” <= -45 && $“signal-strength” > -62) do={
:for i from=1 to=120 do={ :led led5=no; :led led4=yes; :led led3=yes; :led led2=yes; :led led1=yes; }
}
:if ($“signal-strength” <= -10 && $“signal-strength” > -44) do={
:for i from=1 to=120 do={ :led led5=yes; :led led4=yes; :led led3=yes; :led led2=yes; :led led1=yes; }
}
}
}

LED SCRIPT FOR STATION
:for i from=1 to=100 do={
/interface wireless monitor wlan1 interval=1 do={
:if ($“signal-strength” <= -86 && $“signal-strength” > -90) do={
:for i from=1 to=24 do={:led led5=no; :led led4=no; :led led3=no; :led led2=no; :led led1=yes; }
}
:if ($“signal-strength” <= -76 && $“signal-strength” > -85) do={
:for i from=1 to=34 do={:led led5=no; :led led4=no; :led led3=no; :led led2=yes; :led led1=yes; }
}
:if ($“signal-strength” <= -63 && $“signal-strength” > -75) do={
:for i from=1 to=48 do={ :led led5=no; :led led4=no; :led led3=yes; :led led2=yes; :led led1=yes; }
}
:if ($“signal-strength” <= -45 && $“signal-strength” > -62) do={
:for i from=1 to=120 do={ :led led5=no; :led led4=yes; :led led3=yes; :led led2=yes; :led led1=yes; }
}
:if ($“signal-strength” <= -10 && $“signal-strength” > -44) do={
:for i from=1 to=120 do={ :led led5=yes; :led led4=yes; :led led3=yes; :led led2=yes; :led led1=yes; }
}
}
}

nice =) this should be added to Wiki :slight_smile:

can you maybe tell how it works? and how to test it. thanx

run the script and move the antenna - RB will beep with frequency and length depending on wireless signal strength

thanx

Very cool script indeed. But im getting confused with the beeps. And the lights. Now it is 4 lights on and then 3. Can you maybe give a explanation of what the lights mean etc 1led, 2leds ,3leds 3leds and the beeps.

more leds - stronger signal

Hi
Sorry form my english :wink:

This script work only for bridge mode?
When i set station-WDS and run script MT not beeping :wink: (OS 3.10)

Try upgrading to the latest routeros.

I test today with RB411 (brigde) & RB433 (station WDS). This script on 411 works fine, but on 433 - silence (RB411&Rb433 - OS 3.25)

Hello!

The Script works NOT on 411 with ROS 4.3, but on 3.30
I have tested!
“led led5=yes” → Led5 not lighting ?! Why on 4.3 not, but on 3.30?

regards
Christian

syntax errors on v4.5

I’m running 4.6 and looking to make this work.

Any insight on what syntax errors I might run into?

very thanx

Does this script can be used when physically installing the wireless devices as well?
Meaning.
First install the main-node, next installe the end-node.
To line up the end-node with the main-node, can this scipt be used to check wether the alignemt between main -and end node is good?

this is exactly the purpose of this script actually