本文介绍了检测无线网络的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
有什么解决方案可以使用C Sharp .net或任何其他语言来测量WI-FI信号强度?
我们将不胜感激.
Hi all,
Is there any solution to measure the WI-FI signal strength in C sharp .net, or in any other language?
Help will be highly appreciated.
推荐答案
static void Main(string[] args)
{
WlanClient client = new WlanClient();
foreach ( WlanClient.WlanInterface wlanIface in
client.Interfaces )
{
Wlan.WlanAvailableNetwork[] networks =
wlanIface.GetAvailableNetworkList( 0 );
foreach ( Wlan.WlanAvailableNetwork network in networks )
{
Console.WriteLine(
"Found network with SSID {0} and Siqnal Quality {1}.",
GetStringForSSID(network.dot11Ssid),
network.wlanSignalQuality);
}
}
}
static string GetStringForSSID(Wlan.Dot11Ssid ssid)
{
return Encoding.ASCII.GetString(ssid.SSID, 0, (int) ssid.SSIDLength);
}
泰勒·里斯(Taylor Leese)的上述代码是从这里 [ ^ ].
问候
Espen Harlinn
The above code, by Taylor Leese, was copied from here[^].
Regards
Espen Harlinn
这篇关于检测无线网络的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!