Community discussions

MikroTik App
 
pdeline
just joined
Topic Author
Posts: 11
Joined: Thu Sep 09, 2010 5:14 am

help accessing supported bands and channels using APi

Mon Oct 25, 2010 4:32 am

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.
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7198
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: help accessing supported bands and channels using APi

Mon Oct 25, 2010 10:01 am

Which ROS version you have?
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6263
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: help accessing supported bands and channels using APi

Mon Oct 25, 2010 2:13 pm

definitely not 5.0rc2 as this works there:
/interface/wireless/info/print
=.proplist=5ghz-channels
 
pdeline
just joined
Topic Author
Posts: 11
Joined: Thu Sep 09, 2010 5:14 am

Re: help accessing supported bands and channels using APi

Wed Oct 27, 2010 1:22 am

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.
 
pdeline
just joined
Topic Author
Posts: 11
Joined: Thu Sep 09, 2010 5:14 am

Re: help accessing supported bands and channels using APi

Sun Oct 31, 2010 6:37 pm

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.
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7198
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: help accessing supported bands and channels using APi

Mon Nov 01, 2010 9:02 am

On which board and what wireless card is used?
 
pdeline
just joined
Topic Author
Posts: 11
Joined: Thu Sep 09, 2010 5:14 am

Re: help accessing supported bands and channels using APi

Thu Nov 25, 2010 12:49 am

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.
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6263
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: help accessing supported bands and channels using APi

Thu Nov 25, 2010 11:56 am

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