OpenWrt Forum Archive

Topic: Retriving link state information from broadcom driver

The content of this topic has been archived on 28 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hey!

I'm in a project where it's required that we retrive the wireless link state information from the broadcom driver. Specificly I need to calculate the SNR(Signal-to-noice ratio) of a given link. We're using the Linksys WRT54GL V1.1 router, with Kamikaze 7.07.  Would anyone know where I can find a broadcom(BCM2050KML) API? Or just know how to get link information.

Thanks!
/Mikael

ipkg install wl
wl assoclist
wl sta_info <mac_address>
wl rssi <mac_address>

Thanks for answering!

I need the SNR for each link that the router receieves a package from. So if the router is A and it receives a message from B, I need to calculate the SNR on the link between A and B.

IWSPY seems to have functionality that would allow this! I have been looking into iwconfigs source code to find something I could use there, and I'll look into iwspy as well at. The problems with it as I can tell (and I could very well be wrong) is that not all drivers respond to ioctl messages that are sent using iwspy or iwconfig, so the results may very upon driver, or am I wrong?

Tried running iwspy on the routers though, and it produced interesting results.

root@OpenWrt:~# iwspy wl0 00:12:F0:89:82:B8
Segmentation fault

Then trying to do the same thing again will crash the router and then it needs to be rebooted for proper use. It should be noted that I have done almost nothing with the router, other than install the firmware, and change the wl0 interface to be in ad-hoc mode. Oh, I should probably have mentioned that the project needs a adhoc environment, we need the SNR for every link that decides to join.

Running iwspy on my own laptop gave me another error, but that was easably solved with sudo smile. I wonder if the router error is something equaly simple, but if it is I haven't seen it.

As for ipkg install wl, here's the error (ofcourse there's a error.. smile )
root@OpenWrt:~# ipkg update
Downloading http://downloads.openwrt.org/snapshots/ … s/Packages
wget: server returned error: HTTP/1.1 404 Not Found
Downloading http://downloads.openwrt.org/kamikaze/p … l/Packages
Updated list of available packages in /usr/lib/ipkg/lists/packages
An error ocurred, return value: 1.
Collected errors:
ipkg_download: ERROR: Command failed with return value 1: `wget --passive-ftp    -q -P /tmp/ipkg-rhwf9F http://downloads.openwrt.org/snapshots/brcm-2.4-2.4/packages/Packages'

root@OpenWrt:~# ipkg install wl
Nothing to be done
An error ocurred, return value: 4.
Collected errors:
Cannot find package wl.

.. and yes there's connectivity to the net:) Although I honestly can't tell how many firewalls I'm behind, so that might be the problem with this. What is wl anyway?

I am very new to the everything about this, and I'm trying to fill the gap of knowledge so if I ask something silly, please bear with me.

So anyway, I'm very happy about any responce, and other ideas on how to go about retriving link information are very appricieated.

//Mikael

The url shown is wrong, it should be brcm-2.4 (NOT brcm-2.4-2.4) edit your /etc/ipkg.conf and correct it.

The discussion might have continued from here.