get current frequency via API

Hello,
I want to see current AP frequency via API. Where it is hidden?
API *) reporting ‘frequency’ => ‘5580’, but via SNMP I see:
MIKROTIK-MIB::mtxrWlApFreq.2 = INTEGER: 5755

*) $api->query( ‘/interface/wireless/print’, {}, {} );

-Jan

You can use the “monitor” command, and extract the frequency out of the returned “channel” property. Unlike some other similar commands, this one doesn’t have a “once” argument though, so you’ll need to manually cut it off once it begins (unless you do want to monitor the frequency, and do something as it keeps changing).

In terms of protocol flow:

/interface/wireless/monitor
.tag=w
=numbers=wlan1
=.proplist=channel

!re
.tag=w
=channel=2452/20-Ce/gn
=.section=0

/cancel
=tag=w

!trap
.tag=w
=category=2
=message=interrupted

!done

!done
.tag=w

Oh, thank you!

but “once” seems working:
$api->query( ‘/interface/wireless/monitor’, {numbers => ‘wlan2’,‘once’=>‘’}, {} );

Huh… suits me right for using tab instead of “?” when checking CLI. In CLI, when using tab, “once” appears only after you specify the interface name, but not before.