help accessing supported bands and channels using APi

I’m trying to access the supported bands and the various channels for each. I can issue the following:

/interface/wireless/info/print
=.proplist=supported-bands

And get this back:

!re
=supported-bands=5ghz,5ghz-turbo,5ghz-10mhz,5ghz-5mhz
!re
=supported-bands=2ghz-b,2ghz-g,2ghz-g-turbo,2ghz-10mhz,2ghz-5mhz
!re
!done

But when I try and get the 5ghz-channels as follows it hangs.

/interface/wireless/info/print
=.proplist=5ghz-channels

Note that this information does show up in the console.

Any suggestions on how to access the supported information via the API is appreciated.

Which ROS version you have?

definitely not 5.0rc2 as this works there:

/interface/wireless/info/print
=.proplist=5ghz-channels

I’m using 4.10. Thanks for asking.

More information:
When I query for any of the 5ghz properties or the capabilities property the call never returns. All other properties behave as expected.

What response are you seeing when you do this?
I have upgraded to 5.0rc3 and I still do not get a response to this API command. It just hangs.

On which board and what wireless card is used?

I’ve managed to resolve this. The Java API described here: http://forum.mikrotik.com/t/api-login-and-md5/18926/2
does not account for a length being encoded in more than one byte.

it seems i should update that code with correct length calculation.
hope someone will find useful :slight_smile:
http://wiki.mikrotik.com/wiki/API_in_Java