Page 1 of 1

Mikrotik logic bug

Posted: Mon Sep 10, 2018 6:10 pm
by delphi
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.

Re: Mikrotik logic bug

Posted: Mon Sep 10, 2018 6:25 pm
by mrz
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

Re: Mikrotik logic bug

Posted: Mon Sep 10, 2018 6:31 pm
by delphi
Mu 411 UAHR with 6.27 firmware post
:log info "wlan1Support5 true"

Re: Mikrotik logic bug

Posted: Mon Sep 10, 2018 6:44 pm
by delphi
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
"