Click here to Skip to main content
Licence CPOL
First Posted 7 Feb 2008
Views 44,873
Downloads 1,031
Bookmarked 46 times

Wireless signal indicator

By mygapula sudheer | 7 Feb 2008
A desktop utility to indicate the current wireless singnal strength, signal quality, and link status.
4 votes, 28.6%
1
2 votes, 14.3%
2
1 vote, 7.1%
3
2 votes, 14.3%
4
5 votes, 35.7%
5
2.63/5 - 14 votes
μ 2.63, σa 3.06 [?]

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.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

mygapula sudheer



India India

Member


Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
QuestionUsing DeviceIoControl PinmemberDebojyoti Majumder19:43 30 Mar '11  
GeneralGreat work PinmemberTJTurner17:17 28 Sep '09  
GeneralMy vote of 1 Pinmembersesar16:06 30 Aug '09  
GeneralRe: My vote of 1 PinmemberRickNash3:46 14 Sep '09  
GeneralMy vote of 2 PinmemberCountry Man5:37 9 Jun '09  
GeneralMy vote of 1 PinmemberBikkel3221:22 4 Jun '09  
GeneralConnectionClass Pinmemberburatino2223:55 14 Jul '08  
GeneralConnectionClass.dll PinmemberRickNash6:20 14 Apr '08  
GeneralRe: ConnectionClass.dll Pinmembermygapula sudheer0:52 11 Sep '09  
GeneralExcellent One........ Pinmemberravinaik19:14 7 Feb '08  
GeneralGreat Work!! PinmemberMember 428576318:53 7 Feb '08  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Mobile
Web03 | 2.5.120206.1 | Last Updated 7 Feb 2008
Article Copyright 2008 by mygapula sudheer
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid