Date: Fri, 4 Apr 2008 06:59:06 +1300 From: Andrew Thompson <thompsa@FreeBSD.org> To: Jordan Coleman <jordan@JordanColeman.com> Cc: freebsd-embedded@freebsd.org Subject: Re: Programmatic access to 802.11 info Message-ID: <20080403175906.GB29676@heff.fud.org.nz> In-Reply-To: <8C45E249-2E03-4F70-B3C2-E28A92EEFB05@JordanColeman.com> References: <8C45E249-2E03-4F70-B3C2-E28A92EEFB05@JordanColeman.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Apr 03, 2008 at 01:09:01PM -0400, Jordan Coleman wrote: > We are currently working on an embedded application that need to connect to > wireless networks. The UI lets the user configure one or more networks, > select whether to use a specific network or roam among a list of SSIDs, > view SSID scan information etc. We are wrapping wpa_supplicant and letting > it handle network selection, roaming, WPA (as well as WEP), etc. and that > seems to work well enough. However, at the moment, we're having trouble > getting various status information in a reliable and efficient manner. > > Our temporary code invokes "ifconfig -v <dev> list scan" and scrapes its > output to get scanning info (it appears to provide more and better info > than wpa_supplicant's 'scan results' command). Similarly, we're scraping > "wpa_cli status" and "ifconfig <dev> list sta" for association and signal > strength information. At best, this seems like the hard way to get this > info and it's darn ugly, too (polling sucks, but having to fork and exec > ifconfig on every poll sucks even more). What's more, some of the > information we want, such as signal quality ("n out of 5 bars", etc.), > isn't really available. We can get RSSI from "ifconfig list sta", but it's > not the same thing. > > So can anyone suggest how to go about getting this information straight > from the system? The application is primarily written in Perl, but Perl is > not a hard requirement for this portion of the code. The device runs > FreeBSD 7 and the wireless hardware is Atheros-based. So far, I've been > unsuccessful in finding helpful docs and the FreeBSD wireless code is big > enough to make grokking it a challenge. The best reference is the ifconfig code itself. Have a look at src/sbin/ifconfig/ifieee80211.c Andrew
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080403175906.GB29676>