Howto get interface status?

I’m using rb112 as CPE.
I like to make a script. When the wireless interface is not connected (scanning) then the user led is blinking. When the link is up, the led dont blink.
(When te user call me, I need ask only the led status)
Have you idea hot to get wireless interface (wlan1 etc) status?

/interface wireless montor wlan1 once
:if($status=“connected to ess”) do=
else=

Should get you started. Too bad the RB112s don’t have real control over the LED or the user switch.

I try this, but don’t work :frowning:

/interface wireless monitor [find name=wlan1] once do={:set g1 $status};
:if ($g1="searching-for-network") do={/blink duration=5s};

Where is the bug?

Try the following:

:global g1 "na"
/interface wireless monitor [find name=wlan1] once do={:set g1 $status}
:if ($g1="searching-for-network") do={/blink duration=5s}

You need to create the global first.

Thank you! Workin’ :slight_smile: