Is it possible to use Scan function to find specific (previously known) SSID? For example, I would like to go around my neighborhood and inspect if there is SSID with name “Test_Network”, but in a way that I do not need to look through all the other SSID’s shown up in the terminal/winbox window (basic Scan functionality).
Long story short - is there a possibility to use SSID as filter parameter for Scan function?
Thank you, antonsb.
Looks like you know exactly the solution I am looking for, I just need some guidance because I am not familiar with MT scripts.
First things first - I cannot connect to the network, so solution #1 is not appropriate.
Solution #2 - looks like this is what I am looking for, thank you! At first I got some weird messages in logs (using connection list) but it turned out that if you specify SSID in connection list, SSID field must be clear in interface configuration menu. If it is not too much to ask, for me it would be very useful if you can add some comments to the script you wrote in solution #3.
Solution #3 - this looks like the solution, but unfortunately I am not familiar with MT scripts. Could you please explain step-by-step what does this script do? It would be extremely helpful.
this pretty much depends what you want to do. for example if your MikroTik router is equipped with beeper you can run something like this continuously:
while (true) do={foreach i in=([/interface wireless scan wlan1 duration=5 as-value]) do={if (($i->"ssid")="Test_Network") do={:put $i; :for i from=1 to=3 step=1 do={:beep frequency=550 length=494ms;:delay 494ms;:beep frequency=400 length=494ms;:delay 494ms;}}}}
you can also post data in external DB using fetch etc…
antonsb, thank you very much!
Now I understand how the script/command should work, unfortunately in v6.48 ROS does not allow to recall Scan results as internal ID numbers (using as-value).
[reinis@Mikrotik cAP ac] > foreach i in=([/interface wireless scan wlan1 duration=5 as-value]) do={if (($i->"ssid")="Test_Network") do={:put $i}}
expected end of command (line 1 column 58)
It’s really unintuitive that there is no way for me to filter scan search results by an SSID from the command line (SSH)?
Apparently there is no way to pipe to a utility like grep.
The command doesn’t have a “where” argument.
And “as-value” seems to have been removed? Is there another way to put the output from the scan command in a structured way into variables ala https://wiki.mikrotik.com/wiki/Manual:Scripting ?
Is there at least a way to make a named pipe instead of a real file for the “save-file=” argument?