Page 1 of 1

RB411 Alignment LED Script

Posted: Fri Apr 18, 2008 6:22 pm
by Gerard
Here is an alignment script using the 5 LED's on the RB411/RB411A.

Tested with 3.7.. You can adjust the signal levels to suite your needs..
:for i from=1 to=100 do={
 /interface wireless monitor wlan1 interval=1 do={
  :if ($"signal-strength" <= -90) do={
   :led led1=no led2=no led3=no led4=no led5=no;
   }
  :if ($"signal-strength" <= -85 && $"signal-strength" > -90) do={
   :led led1=yes led2=no led3=no led4=no led5=no;
   }  
  :if ($"signal-strength" <= -80 && $"signal-strength" > -85) do={
   :led led1=yes led2=yes led3=no led4=no led5=no;
   }  
  :if ($"signal-strength" <= -75 && $"signal-strength" > -80) do={
   :led led1=yes led2=yes led3=yes led4=no led5=no;
   }
  :if ($"signal-strength" <= -65 && $"signal-strength" > -75) do={
   :led led1=yes led2=yes led3=yes led4=yes led5=no;
   }  
  :if ($"signal-strength" <= -20 && $"signal-strength" > -65) do={
   :led led1=yes led2=yes led3=yes led4=yes led5=yes;
   }  
 }
}
Mikrotik PLEASE PLEASE PLEASE add better scripting functionality for the wireless scan function..

This is just a proof of concept.. Don't blame me if it doesn't work for you..

Thanks,
Gerard

Re: RB411 Alignment LED Script

Posted: Sun Jul 06, 2008 4:59 pm
by Giepie
Brilliant script!!!

Congrats man!

I'll be sure to use it soon.

G

Re: RB411 Alignment LED Script

Posted: Sat Sep 27, 2008 5:58 am
by fireline
Anyone try to get this working on ROS 3.11? I can't seem to figure out the problem.

Re: RB411 Alignment LED Script

Posted: Tue Feb 10, 2009 10:53 pm
by marks-mkt
For what it's worth, I just posted another wireless alignment script that uses the LEDs and beeps. Here's the link to the new post I made: http://forum.mikrotik.com/viewtopic.php?f=9&t=29638

Re: RB411 Alignment LED Script

Posted: Mon Aug 24, 2009 4:30 pm
by brianc
Trying to get this led script to work all the time. I dont want to have to manually start script. I need it to be always on.
How can I do this???

Re: RB411 Alignment LED Script

Posted: Mon Aug 24, 2009 4:31 pm
by mrz
add scheduler to run script at certain intervals.

Re: RB411 Alignment LED Script

Posted: Mon Aug 24, 2009 6:30 pm
by brianc
When I reboot router it says that it ran the script 1 time and sytem scheduler says it ran 1 time but leds dont light up. If I click on run script then they come on.

I want them to automatically come on

Re: RB411 Alignment LED Script

Posted: Mon Aug 24, 2009 6:32 pm
by changeip
your script is probbaly running too quickly - before the system is fully ready for whatever your script does. Put a delay of 10s on startup and try again.

Re: RB411 Alignment LED Script

Posted: Mon Aug 24, 2009 6:50 pm
by brianc
Thank you!!!!!!!!! That worked.

Re: RB411 Alignment LED Script

Posted: Wed Jan 18, 2012 3:04 pm
by David1234
I tried to use this script in 411 v5.7 and 5.0rc2

and it doesn't work?
why is it?

I want to make a simple script - that only blink when the registration is under -90 else led 1-4 is on

plsssss help me .
I think that me mistake is in the syntax
thank you !

this is my script:
:if ([/interface wireless registration-table get value-name=signal-strength number=0] =-123)
do={/interface wireless registration-table remove numbers=0}
else={beep frequency=1000 length=2}

this one works, and if I change the "=" to "<= " it give me that the interval is not good.

why is it?????
I ask this question 3 times here and still get no answer - it cant be that hard.
please help me.

thank you ,