Page 1 of 1

help accessing supported bands and channels using APi

Posted: Mon Oct 25, 2010 4:32 am
by pdeline
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.

Re: help accessing supported bands and channels using APi

Posted: Mon Oct 25, 2010 10:01 am
by mrz
Which ROS version you have?

Re: help accessing supported bands and channels using APi

Posted: Mon Oct 25, 2010 2:13 pm
by janisk
definitely not 5.0rc2 as this works there:
/interface/wireless/info/print
=.proplist=5ghz-channels

Re: help accessing supported bands and channels using APi

Posted: Wed Oct 27, 2010 1:22 am
by pdeline
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.

Re: help accessing supported bands and channels using APi

Posted: Sun Oct 31, 2010 6:37 pm
by pdeline
definitely not 5.0rc2 as this works there:
/interface/wireless/info/print
=.proplist=5ghz-channels
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.

Re: help accessing supported bands and channels using APi

Posted: Mon Nov 01, 2010 9:02 am
by mrz
On which board and what wireless card is used?

Re: help accessing supported bands and channels using APi

Posted: Thu Nov 25, 2010 12:49 am
by pdeline
I've managed to resolve this. The Java API described here: http://forum.mikrotik.com/viewtopic.php ... 07#p103407
does not account for a length being encoded in more than one byte.

Re: help accessing supported bands and channels using APi

Posted: Thu Nov 25, 2010 11:56 am
by janisk
it seems i should update that code with correct length calculation.
hope someone will find useful :)
http://wiki.mikrotik.com/wiki/API_in_Java