Community discussions

 
delphi
newbie
Topic Author
Posts: 29
Joined: Thu Feb 27, 2014 7:36 pm

Mikrotik logic bug

Mon Sep 10, 2018 6:10 pm

It seems that routerOs contains a bug.
For the old wifi which support only 2 Ghz. The next script constuction works incorrect:

:do {
/interface wireless set [find default-name=wlan1] band="5ghz-a"
:log info "wlan1Support5 true"
} on-error={
:log info "wlan1Support5 false"
}

The construction must log 2 strings for this case. But it didn't lead to :log info "wlan1Support5 false"
"on-error" case seems not to be executed which is 100% bug.
The attempt to assign the 5ghz-a to the old 2 Ghz (b/g) wifi chips must lead to on-error executer.
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 5942
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: Mikrotik logic bug

Mon Sep 10, 2018 6:25 pm

Works for me.
[admin@MikroTik] > :do { /interface wireless set wlan1 band=5ghz-a; :put "no error"} on-error={ :put "error"}
error


What you are telling is not how it should work, there will never be two log entries.
If there is an error, then script inside do () immediately stops and on-error is executed.
So if you see only "wlan1Support5 true" then there is no error, if you see "wlan1Support5 false" then there is error
 
delphi
newbie
Topic Author
Posts: 29
Joined: Thu Feb 27, 2014 7:36 pm

Re: Mikrotik logic bug

Mon Sep 10, 2018 6:31 pm

Mu 411 UAHR with 6.27 firmware post
:log info "wlan1Support5 true"
 
delphi
newbie
Topic Author
Posts: 29
Joined: Thu Feb 27, 2014 7:36 pm

Re: Mikrotik logic bug

Mon Sep 10, 2018 6:44 pm

On error not executed but the do section is executed.
After that the wireless breaks with system messge:
"no supported channel
scan-list does not contain valid channels
"

Who is online

Users browsing this forum: No registered users and 9 guests