Wireless signal indicator






2.77/5 (16 votes)
A desktop utility to indicate the current wireless singnal strength, signal quality, and link status.
Introduction
Wireless signal status indicator is a simple tray application which gives continuous status information about the signal strength, signal quality, and link status. The application is rich in UI to show all these details in an effective manner.
Background
- Signal strength: The received strength of the wireless signal at the client adapter.
- Signal quality: The quality of the signal received at the client adapter.
- Link status: The link quality between the client adapter and the corresponding wireless network.
Using the code
The native Wifi WlanQueryInterface()
function is used to query the "connection attributes" of a wireless connection. This function will be called in client program in a timer functionality to get the signal quality continuously.
Based on interpolation between the signal quality and signal strength, the signal strength is calculated as:
public static uint GetSignalQuality(Guid gg)
{
UInt32 dwSize = 0;
IntPtr ppData = IntPtr.Zero;
IntPtr ppChannel = IntPtr.Zero;
WLAN_OPCODE_VALUE_TYPE pOpcodeValueType;
if (WlanQueryInterface(m_pClientHandle, ref gg,
WLAN_INTF_OPCODE.wlan_intf_opcode_current_connection,
IntPtr.Zero, out dwSize, out ppData,
out pOpcodeValueType) != ERROR_SUCCESS)
{
m_errorMessage = "Failed WlanQueryInterface() - " +
"Current Connection Attributes";
return 0;
}
if (ppData != IntPtr.Zero)
{
WLAN_CONNECTION_ATTRIBUTES connectionAttributes =
new WLAN_CONNECTION_ATTRIBUTES(ppData);
return connectionAttributes.wlanAssociationAttributes.wlanSignalQuality;
}
return 0;
}
Points of interest
The tool also provides a context menu in the tray icon to select the network interface through which you want to query the signal quality, and an Exit menu to close the application.