多くの科学者が、WLANを介して接続されたデバイスを、その信号強度、到着時間、ラウンドトリップ時間などを測定することによって追跡する方法を文書化した論文を公開しています。.NETAPIを使用してWindowsでこれらの値にアクセスする方法はありますか?
または、位置追跡にすでに利用可能なソフトウェアSDKを知っていますか?
こんにちは、Windows 7の場合、これはMACアドレスRSSISSIDを使用してすべてのAPを検出できる優れたコードです。
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using NativeWifi;
class Program
{
static void Main(string[] args)
{
WlanClient client = new WlanClient();
// Wlan = new WlanClient();
try
{
foreach (WlanClient.WlanInterface wlanIface in client.Interfaces)
{
Wlan.WlanBssEntry[] wlanBssEntries = wlanIface.GetNetworkBssList();
foreach (Wlan.WlanBssEntry network in wlanBssEntries)
{
int rss = network.rssi;
// MessageBox.Show(rss.ToString());
byte[] macAddr = network.dot11Bssid;
string tMac = "";
for (int i = 0; i < macAddr.Length; i++)
{
tMac += macAddr[i].ToString("x2").PadLeft(2, '0').ToUpper();
}
Console.WriteLine("Found network with SSID {0}.", System.Text.ASCIIEncoding.ASCII.GetString(network.dot11Ssid.SSID).ToString());
Console.WriteLine("Signal: {0}%.", network.linkQuality);
Console.WriteLine("BSS Type: {0}.", network.dot11BssType);
Console.WriteLine("MAC: {0}.", tMac);
Console.WriteLine("RSSID:{0}", rss.ToString());
}
Console.ReadLine();
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
}
}
お役に立てば幸いです。
Managed Wifi APIは、信号強度情報を提供します。これは、私が以前に提起し、ここで回答された質問を基にしたコードスニペットです。
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);
}
Windows自体がLocationAPIを提供するようになりました。