countdown to reboot....

Hi,

I have setup the CPE’s wireless connect list but i discovered when i run winbox remotely and try from winbox terminal
/interface wireless scan wlan1
to scan it disconnects the link (as normal ) but does not restore previous AP association unlike running terminal locally it does ?

The reason i want to scan CPE’s wireless remotely is as more AP’s are put on the network, i may need to change the connect list order, I don’t want to scan locally each CPE
so if could have a script that would
(1) countdown - say 2mins to reboot
(2) included or manually /interface wireless scan wlan1
(2) save the scan so on reboot it could be checked which AP connect list order should be used

I can’t say I’ve tried this, but the below might work as a script. You can’t initiate a reboot in two minutes and then scan - you’ll have to scan first, and then reboot:

/interface wireless scan wlan1 file=scanOutput.txt
/system reboot

Does that help at all?

[XXXXX_XXXX19@XXXXX_test19] > /interface wireless scan wlan1 file=scanOutput.txt
bad argument name file (line 1 column 32)
[XXXXX_XXXX19@XXXXX_test19]] > /system reboot
Reboot, yes? [y/N]:

looks like it does not want to generate file as f (file=scanOutput.txt) is highlighted

thanks for advice

Then you can’t save the output of a scan to file. You’d have to either use the API or something like expect via SSH/Telnet to remotely run the commands.

Look into history


there is a way how to scan on interface you are connected to… using SSH

set duration to low value (10s for example)

nature of SSH is it willnot drop connection very quicly and scan result will be printed out to console after scan and reconnection.

for example this is AP to wchich i am connected as a station (laptop)

pawel-mac:expect-1 cieplik$ ssh admin@10.78.9.2
admin@10.78.9.2's password: 








  MMM      MMM       KKK                          TTTTTTTTTTT      KKK
  MMMM    MMMM       KKK                          TTTTTTTTTTT      KKK
  MMM MMMM MMM  III  KKK  KKK  RRRRRR     OOOOOO      TTT     III  KKK  KKK
  MMM  MM  MMM  III  KKKKK     RRR  RRR  OOO  OOO     TTT     III  KKKKK
  MMM      MMM  III  KKK KKK   RRRRRR    OOO  OOO     TTT     III  KKK KKK
  MMM      MMM  III  KKK  KKK  RRR  RRR   OOOOOO      TTT     III  KKK  KKK

  MikroTik RouterOS 5.0beta4 (c) 1999-2010       http://www.mikrotik.com/

  
[admin@Internetowy] > /interface wireless scan 
VAP-1-hotspot  duration  freeze-frame-interval  number  wlan1
[admin@Internetowy] > /interface wireless scan duration=10s 
number: wlan1
Flags: A - active, B - bss, P - privacy, R - routeros-network, N - nstreme, T - tdma 
      ADDRESS           SSID                                           BAND       FREQ SIG NF   SNR RADIO-NAME                                          
ABP   00:1F:1F:A3:26:94 defa                                           2.4ghz-g   2462 -97 -97  0  

[admin@Internetowy] > 
[admin@Internetowy] > 
[admin@Internetowy] >

Enjoy!

Thanks but i note you were using RouterOS 5.0beta4, when i try using ssh scan on version 3.30 I have to use code:
[Client_test19@Client_test19] /interface wireless> scan
– Item number
duration –
freeze-frame-interval – Interval on how often to perform the scanning

[Client_test19@Client_test19] /interface wireless> scan wlan1 duration=10s

Which disconnects the Wlan connection and PPPoE reassigns a new ip address to CPE client and scan is lost, maybe i doing something wrong as usual ?

If you at reconnect getting new IP address from your ppp session, that TCP session will not be kept.

That is my problem, if i could save a scan then the next step is ok, but looks like catch21 so far?

No you cannot save it to file unfortunately, its a feature not bug, maybe a feature wish-list could be a good idea to use it.

EDIT:

Well, you can you another Interface, but in this solution cost is involved (additional hardware requirements)

what about establishing a new tunnel (pptp, etc) with static private addresses? %)

Tried pptp but once again when wireless connectivity is lost so is the result of scan when i try to execute
[Client_test19@Client_test19] /interface wireless> scan wlan1 duration=10s

As mentioned if i could only save the scan?

Another Q is should pptp connection be displayed in the ppp active connections, see picture
as Client_test19 which i was using at test is missing from ppp active list but reappears when i select pppoe ?
pptp.png