Click here to Skip to main content
Licence CPOL
First Posted 7 Feb 2008
Views 48,526
Downloads 1,401
Bookmarked 46 times

Wireless signal indicator

By | 7 Feb 2008 | Article
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.

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
GeneralMy vote of 1 Pinmemberranummark9:51 24 May '12  
QuestionConnectionClass Source Code Pinmemberaefaustino2:09 25 Apr '12  
QuestionUsing DeviceIoControl PinmemberDebojyoti Majumder18:43 30 Mar '11  
GeneralGreat work PinmemberTJTurner16:17 28 Sep '09  
GeneralMy vote of 1 Pinmembersesar15:06 30 Aug '09  
GeneralRe: My vote of 1 PinmemberRickNash2:46 14 Sep '09  
GeneralMy vote of 2 PinmemberCountry Man4:37 9 Jun '09  
GeneralMy vote of 1 PinmemberBikkel3220:22 4 Jun '09  
GeneralConnectionClass Pinmemberburatino2222:55 14 Jul '08  
GeneralConnectionClass.dll PinmemberRickNash5:20 14 Apr '08  
Good work Big Grin | :-D , however I had to install this hot fix first: WindowsXP-KB918997-v6-x86-ENU.exe
 
Your code uses another dll "ConnectionClass.dll", is this a third party library or something you have written. Confused | :confused:
GeneralRe: ConnectionClass.dll Pinmembermygapula sudheer23:52 10 Sep '09  
GeneralExcellent One........ Pinmemberravinaik18:14 7 Feb '08  
GeneralGreat Work!! PinmemberMember 428576317: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
Web04 | 2.5.120529.1 | Last Updated 7 Feb 2008
Article Copyright 2008 by mygapula sudheer
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid