如何检索/显示RSSI和SSID信息 [英] How do I retrieve/display the RSSI and SSID information

查看:171
本文介绍了如何检索/显示RSSI和SSID信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,编程初学者在这里寻找一些帮助。



我正在尝试使用C#语言在Windows 8.1操作系统上使用Visual Studio 1013开发基于RSSI的非常基本的室内定位程序。为此,程序将需要能够与NIC通话并显示所感知的Wi-Fi RSSI值及其相应的SSID。如何在代码中完成?



感谢阅读。

解决方案

它更好使用netsh

这里是样本:



 ProcessStartInfo w_info =  new  ProcessStartInfo(  netsh   wlan show interfaces); 
w_info.WorkingDirectory = @ %WINDIR%\system32;
w_info.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
w_info.CreateNoWindow = true ;
w_info.RedirectStandardOutput = true ;
w_info.UseShellExecute = false ;
System.Diagnostics.Process s_proc = new System.Diagnostics.Process();
s_proc.StartInfo = w_info;
s_proc.Start();





然后从

 s_proc.StandardOutput.ReadToEnd() 

尝试解析你想要的东西:



 SSID:ipmadar 
身份验证:WPA2-Personal
密码:CCMP
连接模式:自动连接
频道: 1
接收率( Mbps): 54
传输速率(Mbps): 54
信号:80 %





PS:它在Windows 7下运行未在windows8.1中测试过,请告知我这个问题我觉得它会起作用


Hello, programming beginner here who is looking for some help.

I’m trying to develop a very basic indoor positioning program based on RSSI using the C# language with Visual Studio 1013 on Windows 8.1 OS. To do this, the program will need to be able to "talk" to the NIC and display the sensed Wi-Fi RSSI values and their corresponding SSIDs. How can this be done in code?

Thanks for reading.

解决方案

it`s better to use netsh
here is sample :

ProcessStartInfo w_info = new ProcessStartInfo("netsh", "wlan show interfaces");
w_info.WorkingDirectory = @"%WINDIR%\system32";
w_info.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
w_info.CreateNoWindow = true;
w_info.RedirectStandardOutput = true;
w_info.UseShellExecute = false;
System.Diagnostics.Process s_proc = new System.Diagnostics.Process();
s_proc.StartInfo = w_info;
s_proc.Start();



then retrieve the output from

s_proc.StandardOutput.ReadToEnd()


try to parse what you want like:

SSID                   : ipmadar
Authentication         : WPA2-Personal
Cipher                 : CCMP
Connection mode        : Auto Connect
Channel                : 1
Receive rate (Mbps)    : 54
Transmit rate (Mbps)   : 54
Signal                 : 80% 



PS: it`s works under windows 7 not tested in windows8.1 please inform me about that issue i think it will work.


这篇关于如何检索/显示RSSI和SSID信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆