English 中文(简体)
从 Windows 获取 Rssi 值
原标题:Get Rssi Value From Windows
  • 时间:2012-05-25 19:01:26
  •  标签:
  • windows
  • rssi

我想测量调制解调器的 rssi 值。 是否有 spi 能为 Windows 获得 rssi 值? 我用 Wifi. manager in and roid. 但我找不到 Windows 的 spi 。

问题回答

使用本地代码是最好的。 您需要使用 wlan_ intf_ opcode_ rssi 代码的 WlanQuery Interface () 来返回 RSSI 值作为 LONG 数据类型。 您可以从那里将其转换为 dbm 。

DWORD WINAPI WlanQueryInterface(
 __in        HANDLE hClientHandle,
 __in        const GUID *pInterfaceGuid,
 __in        WLAN_INTF_OPCODE OpCode,
 __reserved  PVOID pReserved,
 __out       PDWORD pdwDataSize,
 __out       PVOID *ppData,
 __out_opt   PWLAN_OPCODE_VALUE_TYPE pWlanOpcodeValueType
);

在此使用 opcode wlan_intf_opcode_rssi 来获取 RSSI 值 :

WLAN_INTF_OPCODE  >> wlan_intf_opcode_rssi >> LONG

这里是 C++ 样本, 如何开始 :

http://msdn.microsoft.com/en-us/library/windows/desktop/ms706765(v=vs.85).aspx

If you want C# Try this: How to get SSID and RSSI for Win7 using C#

Since this question appeared on home page for review- the existing answer is outdated. There is now a Managed Wifi API available as a wrapper around the Windows Native Wifi API.

Signal strength in percentage and RSSI could be obtained as, Wlan.WlanAvailableNetwork[] networks = wlanIface.GetAvailableNetworkList(0);

Wlan.WlanBssEntry[] redes = wlanIface.GetNetworkBssList(); //Get the atribute that you need

foreach (Wlan.WlanBssEntry network in redes)
{
    Console.Write("Network SSID {0} RSSI {1}
 ", GetStringForSSID(network.dot11Ssid),
 network.rssi);
 } 




相关问题
Why running a service as Local System is bad on windows?

I am trying to find out the difference between difference service account types. I tumbled upon this question. The answer was because it has powerful access to local resources, and Network Service ...

Programmatically detect Windows cluster configuration?

Does anyone know how to programatically detect that a Windows server is part of a cluster? Further, is it possible to detect that the server is the active or passive node? [Edit] And detect it from ...

get file icon for Outlook appointment (.msg)

I ve read Get File Icon used by Shell and the other similar posts - and already use SHFileInfo to get the associated icon for any given extension, and that works great. However, Outlook uses ".msg" ...

Identifying idle state on a windows machine

I know about the GetLastInputInfo method but that would only give me the duration since last user input - keyboard or mouse. If a user input was last received 10 minutes ago, that wouldn t mean the ...

Terminating a thread gracefully not using TerminateThread()

My application creates a thread and that runs in the background all the time. I can only terminate the thread manually, not from within the thread callback function. At the moment I am using ...

热门标签