This project is read-only.

How to get Signal Strenght

Aug 1, 2008 at 10:04 AM
can u please help to get the singal strength of a wireless network??
please try to reply soon.. i need it urgent
Feb 21, 2009 at 2:08 AM
Probably way too late, but here is how I did it:

            WlanClient client = new WlanClient();
            foreach (WlanClient.WlanInterface wlanIface in client.Interfaces)
                //Add the event to track when the wireless connection changes
                wlanIface.WlanConnectionNotification += new WlanClient.WlanInterface.WlanConnectionNotificationEventHandler(wlanIface_WlanConnectionNotification);
                //This is all to output some cool info about the connection
                Wlan.WlanAvailableNetwork[] networks = wlanIface.GetAvailableNetworkList(0);
                Wlan.WlanConnectionAttributes current = wlanIface.CurrentConnection;
                Wlan.WlanAvailableNetwork currentMore = networks.Where(n => n.profileName == current.profileName).Single();
                Console.WriteLine("Currently {1} to {0} with a signal quality of {2}.",current.profileName,current.isState,currentMore.wlanSignalQuality);

I built this off the sample code included with the project.
May 13, 2012 at 10:55 AM
Edited May 13, 2012 at 11:01 AM
Hello! I'm trying to get signal quality from WlanNotification event:
void wi_WlanNotification(NativeWifi.Wlan.WlanNotificationData notifyData) 
    int SignalQuality;
    if (notifyData.notificationCode == (int)NativeWifi.Wlan.WlanNotificationCodeMsm.SignalQualityChange)
    SignalQuality = Marshal.ReadInt32(notifyData.dataPtr); 
But i'm getting strange values into SignalQuality variable:
62, 238, 226, 202, ... 65535 sometimes.
What can be wrong? Thank you.