SKFREE

Skripty - Ako ziskat hodnoty v MK, z wireless - status - noise floor

rado3105 - 02.11.2010 - 14:50
Post subject: Ako ziskat hodnoty v MK, z wireless - status - noise floor
Ako ziskat hodnoty v MK, z wireless - status - noise floor? Viete poradit v mk, chcem to vyuzit pri skriptovani
rado3105 - 02.11.2010 - 18:40
Post subject:
Je to mozne?
JOFO - 02.11.2010 - 19:01
Post subject:
ano je to mozne... ale je to trocha zlozitejsie... udaje , ktore potrebujes su vo vystupe z wireless monitora
rado3105 - 02.11.2010 - 19:04
Post subject:
Takze nasiel som taketo nieco:

/ system script
add name="log_rf_data" source="#/int wir reg print
\n:log debug \( \
\"log_rf_data::signal-to-noise=\" . \[int wir reg get \[find \
interface=wlan1\] signal-to-noise\] . \",tx-ccq=\" . \[int wir reg get \
\[find interface=wlan1\] tx-ccq\] . \",rx-ccq=\" . \[int wir reg get \
\[find interface=wlan1\] rx-ccq\] \)
\n#:log debug \"log_rf_data::script \
debug\"
\n
\n
\n" policy=ftp,reboot,read,write,policy,test,winbox,password
Code: add name="log_rf_data2" source="/int wir monitor \[find name=wlan1\] once do \
{:env; :log debug \(\"log_rf_data2::signal-to-noise=\" . \
\$signal-to-noise . \",tx-ccq=\" . \$tx-ccq . \",rx-ccq=\" . \$rx-ccq . \
\",noise-floor=\" . \$noise-floor\);}
\n#/int wir monitor \[find \
name=wlan1\] once do {:env; :put \(\"log_rf_data2::signal-to-noise=\" . \
\$signal-to-noise . \",tx-ccq=\" . \$tx-ccq . \",rx-ccq=\" . \$rx-ccq . \
\",noise-floor=\" . \$noise-floor\);}" \
policy=ftp,reboot,read,write,policy,test,winbox,password


konkretne to robi cast v CODE.

Vedel by mi niekto vybrat len cast ako ziskat hodnotu noise-floor, ktora ak bude vyssia ako napr. -99, vykona sa nejaky prikaz v skiripte(konkretne prepne na iny kanal)?
rado3105 - 02.11.2010 - 20:00
Post subject:
potreboval by som akosi spojit tieto dve veci:

:if ($noise-floor < -80) do= { /interface wireless set wlan1 frequency=5442}

a

/int wir monitor [find name=wlan1] once do {:env; :log debug ("log_rf_data2::signal-to-noise=" . $signal-to-noise . ",tx-ccq=" . $tx-ccq . ",rx-ccq=" . $rx-ccq . ",noise-floor=" . $noise-floor);}

#/int wir monitor [find name=wlan1] once do {:env; :put ("log_rf_data2::signal-to-noise=" . $signal-to-noise . ",tx-ccq=" . $tx-ccq . ",rx-ccq=" . $rx-ccq . ",noise-floor=" . $noise-floor);}
JOFO - 02.11.2010 - 22:00
Post subject:
to je nejaky divny skript...
tu mas nieco chodive... Wink
Code: :local wlan1stats;
:local val;
:local noisefloor;
:local pom;

/interface wireless
:set wlan1stats [monitor wlan1 once as-value];
:foreach val in=$wlan1stats do={
 :set pom [:pick $val 0 12];
 :if ($pom = "noise-floor=") do={
  :set noisefloor [:pick $val 12 [:len $val]];
 }
}


snad pobezi Wink
rado3105 - 02.11.2010 - 22:06
Post subject:
Jofo to je robene asi len na 3 a vyssie. Potreboval by som to na 2.9. To co som hodil mi funguje v 2.9, dokaze to vytiahnut hodnotu noise-floor a hodit to do logu, len to neviem spojit s tou podmienkou if: ked bude noise-floor mensi ako nejaka hodnota aby preplo na kanal ktory tam bude nastaveny.
JOFO - 02.11.2010 - 22:12
Post subject:
tak 2.9 uz nikde nemam...
kup si radsej licenciu, nove ROS maju aj ine zaujimave ficurky Smile
rado3105 - 02.11.2010 - 22:27
Post subject:
Nemozem to momentalne menit na 3, mam na to viacero dovodov. Neslo by nejako upravit to co som tu dal aby to akosi dostalo tu hodnotu a potom porovnalo? Pomocou tohto prikazu to zapise noise-flor do logu: /int wir monitor [find name=wlan1] once do {:env; :log debug ("$noise-floor);} a potreboval by som to skombinovat s tymto: if ($noise-floor < -9Cool do= { /interface wireless set wlan1 frequency=5442}. Viem to len zapisat ale ako dostat z toho tu hodnotu, hodit to do nejakej premennej a porovnat, neviem.
JOFO - 02.11.2010 - 22:31
Post subject:
s tym ti nepomozem, kedze nemam na nijakom stroji ROS2.9.. takmer vsetko uz mam na v4
All times are GMT
Powered by PNphpBB2 © 2003-2005 The PNphpBB Group
Credits