views:

43

answers:

0

Hi,

I'm developing an application using Visual Studios 2010 C# running on a Windows 7 Professional machine. In my application, I am trying to read the RSSI of a WLAN AP on a specific WiFi channel, regardless if my WLAN radio / bridge is connected to an AP or not.

I've search different forums and tried implementing sample codes that I found (including sample code that I found in this forum). Each time I run these sample codes, I either get compile errors because variables were defined in code not included in the samples, or I get runtime exceptions like System.Management.ManagementException {"Not Supported"}. (I get this exception when I tried to implement the code that I found on the bytes.com groups under topic "net-c/657473-wmi-wifi-discovery" which was itself referenced in a forum post in this website).

Of course, I've also tried to make calls to wlanapi.dll using wrapping code that I found in samples on pinvoke.net (which doesn't seem to have a forum), and I can't get that code to work because not all of the variables are defined in the sample codes listed on that website.

Here are my questions:

  1. It is possible to measure RSSI using wlanapi.dll or any other method in C# code without a connection to a network? Or worse yet, if RF interference prevents the APIs from being able to get SSID info. (Yes, I would still want to measure the resulting RSSI even in the presence of interference.)
  2. How can I get the code sample I found on the bytes.com site to work on my machine?
  3. Alternatively, where and how are the variables defined in the pinvoke.net sample code that I found? (To see my implementation, see my unanswered question on the MSDN forum.) I appreciate your help.

Thank you,

Jonathan Becker PhD Student Carnegie Mellon Silicon Valley