https://wiki.mikrotik.com/index.php?title=LED_Antenna_Alignment&feed=atom&action=historyLED Antenna Alignment - Revision history2024-03-28T12:32:57ZRevision history for this page on the wikiMediaWiki 1.38.2https://wiki.mikrotik.com/index.php?title=LED_Antenna_Alignment&diff=5824&oldid=prevNormis at 10:50, 29 October 20072007-10-29T10:50:16Z<p></p>
<p><b>New page</b></p><div>Here is a short script I wrote to use the onboard LED on the RB532 for antenna alignment.<br />
<br />
The LED blinks a number of times in a second. The more blinks, the higher the SNR.<br />
<br />
Currently it will only show the SNR of the first entry in the Registrations tab in the Wireless window. This should not be a problem, since you will most likely use this tool for CPE alignment or when setting up a point to point link, where you only have 1 entry in the Registrations tab. <br />
<br />
It can be modified to look for a specific MAC address or SSID. <br />
<br />
Put the following as a System/Script entry.<br />
<pre><br />
:global if-snr [ /interface wireless registration-table get [/interface wireless registration-table find] signal-to-noise ]<br />
:if (($if-snr > 0) && ($if-snr <= 15 )) do={/blink duration=250ms}<br />
:if (($if-snr > 15) && ($if-snr <= 25 )) do={/blink duration=500ms}<br />
:if (($if-snr > 25) && ($if-snr <= 35 )) do={/blink duration=750ms}<br />
:if ($if-snr > 35 ) do={/blink duration=1s}<br />
</pre><br />
<br />
Use scheduler to run the script every 1 or 2 seconds (your preference). In the 'On Event' box type:<br />
<pre><br />
/system script run [/system script find name=blinkled]<br />
<br />
# [WHERE blinkled IS THE NAME OF THE SCRIPT SHOWN ABOVE]<br />
</pre><br />
<br />
[[Category:Scripting]]</div>Normis