Facebook  -  Twitter      

Questo forum fa uso dei cookie
Questo forum utilizza i cookie per memorizzare i dettagli del tuo login o della tua ultima visita. I cookie sono piccoli files di testo salvati nel computer; i cookie da noi utilizzati sono relativi unicamente ai servizi da noi forniti direttamente o dai banner pubblicitari. I cookie su questo forum salvano inoltre i dettagli relativi alle discussioni lette e alle tue preferenze personali. Sei pregato di selezionare il tasto OKAY se sei consapevole della presenza di questi files e ci autorizzi ad utilizarli per le informazioni specificate.

Indipendentemente dalla tua scelta un cookie verrà salvato per memorizzare nel tuo pc la risposta a questo form. Puoi modificare le impostazioni relative ai cookie nelle preferenze del tuo browser.

  • 0 voto(i) - 0 media
  • 1
  • 2
  • 3
  • 4
  • 5
[Mikrotik] RSSIBeeper

#1
Information 
Codice:
# Mikrotik RB411/433 "RSSI Readback" alignment script
#
# Based off script by Mark Shumate Feb 2009
# Modified by Randy Cosby June 2009
#
# NOTE: This script may work on other platforms, I
# don't have anything but RB411/433 here in front of
# me. The beeps will probably work on practically any
# wireless CPE type Routerboard, but maybe the script
# would have to be edited?
#

# default delaytime
:local lnsdelaytime 230ms;

# name of wireless interface to monitor (default wlan1)
:local lnsintname "wlan1";
:local lnsbeepfreq 800;

# base freq (as in pitch) of tens digit beep
:local tensbeepfreq 1200;
#  base freq (as in pitch) of ones digit beep
:local onesbeepfreq 1100;# The (veery approximate, heh) running time of the script
# is set here. I am too lazy right now to do this a
# better way...besides, who cares if the thing beeps
#  a couple extra minutes right?!? :)
:local lnsrunningtime 10m;

# Here, we set how long the script will beep. NOTE that
# startup/shutdown tones will still be played.
:local lnsbeeptime 10m;

# figure out beep cutoff time
:local lnsrunbeepdiff;
:set lnsrunbeepdiff ($lnsrunningtime - $lnsbeeptime);


# play starting tones
:delay 150ms;
:beep frequency=($lnsbeepfreq - 300) length=150ms;
:delay 150ms;:beep frequency=($lnsbeepfreq - 200) length=150ms;
:delay 550ms;

# main monitoring cycle
:while ($lnsrunningtime > 0s) do={
/interface wireless monitor "$lnsintname" once do={
    :put "Monitoring....";
:if ($"status" = "connected-to-ess") do={
#:if ($"status" = "searching-for-network") do={

    :local rssi ($"signal-strength");
#     :local rssi -60;
    :put $"signal-strength";
    :local tensbeeps (tonum( $rssi / 10 ) * -1 );
    :put $tensbeeps;
    :local onesbeeps (($rssi*-1) - ($tensbeeps * 10))
    :put $onesbeeps;
    :for i from=1 to=($tensbeeps) do={
    :beep frequency=(-($rssi*$rssi)/10+$tensbeepfreq) length=($lnsdelaytime / 2);
    :delay $lnsdelaytime;
    :set lnsrunningtime ($lnsrunningtime - $lnsdelaytime);
:delay 400ms;
    :set lnsrunningtime ($lnsrunningtime - 400ms);
    :if ($onesbeeps = 0) do={
            :beep frequency=(-($rssi * $rssi)/10 + $onesbeepfreq) length=($lnsdelaytime*2);
            :delay $lnsdelaytime;
            :set lnsrunningtime ($lnsrunningtime - ($lnsdelaytime));
           } else={
    :for i from=1 to=($onesbeeps) do={
    :beep frequency=(-($rssi * $rssi)/10 + $onesbeepfreq) length=($lnsdelaytime / 2);
    :delay $lnsdelaytime;    
    :set lnsrunningtime ($lnsrunningtime - $lnsdelaytime);

     }
    }
    :delay 1s;
           } else={
   :if ($"status" = "searching-for-network") do={
      :delay 200ms;
     :if ($lnsrunningtime > $lnsrunbeepdiff) do={
       :beep frequency=$lnsbeepfreq length=150ms;
     }
      :delay 200ms;
      :if ($lnsrunningtime > $lnsrunbeepdiff) do={
        :beep frequency=($lnsbeepfreq + 100) length=125ms;
      }
      :delay 150ms;
      :if ($lnsrunningtime > $lnsrunbeepdiff) do={
        :beep frequency=($lnsbeepfreq + 200) length=100ms;
      }
      :delay 300ms;
      :set lnsrunningtime ($lnsrunningtime - 750ms);
      } else={
     
      :if ($lnsrunningtime > $lnsrunbeepdiff) do={
        :beep frequency=($lnsbeepfreq - 150) length=150ms;
      }
      :delay 150ms;
      :if ($lnsrunningtime > $lnsrunbeepdiff) do={
        :beep frequency=($lnsbeepfreq - 350) length=100ms;
      }
      :delay 1550ms;
     
    }
  }
}
#:put $lnsrunningtime;
#:set lnsrunningtime (totime($lnsrunningtime));
#:set lnsrunningtime ("$lnsrunningtime" - "$lnsdelaytime");
:put $lnsrunningtime;
}

# shut off LEDs, play shutdown tones
:beep frequency=($lnsbeepfreq - 200) length=150ms;
:delay 150ms;
:beep frequency=($lnsbeepfreq - 300) length=150ms;
:delay 150ms;
Cita messaggio


[-]
Condividi/Segnala (Mostra tutti)
Facebook Linkedin Twitter

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Utenti che stanno guardando questa discussione:
1 Ospite(i)


Powered by MyBB, © 2002-2017 MyBB Group.