0

I have been looking into the DeviceNetworkInformation class, and I have successfully used the following

•CellularMobileOperator •IsNetworkAvailable •IsCellularDataEnabled •IsCellularDataRoamingEnabled •IsWiFiEnabled

but I was wondering if there was a wayt o get the name of the WiFi connection, in addition to whether WiFi is enabled or not. I would like to be able to see the current name of the connection within my application. I have not seen where this was implemented, so is this actually possible? If so, how might I access such a property?

Matthew
  • 3,976
  • 15
  • 66
  • 130

2 Answers2

0

Here comes the code snippet:

/// <summary>
/// Find WIFI SSID
/// </summary>
private void FindWIFISSIDClick(object sender, RoutedEventArgs e)
{
    foreach (var network in new NetworkInterfaceList())
    {
        if ( (network.InterfaceType == NetworkInterfaceType.Wireless80211) &&  (network.InterfaceState == ConnectState.Connected) )
            mLocatoinInfo.Text = network.InterfaceName; //Get the SSID of the WIFI
        else
            mLocatoinInfo.Text = "fail";
    }
}
ellic
  • 798
  • 12
  • 28
-1

You should take a look at this wrapper project with managed code in C# at Managed Wifi API.

References:

  1. How do I get the available wifi APs and their signal strength in .net?
  2. How to enumerate networks
  3. How to get signal strength
  4. How to obtain WIFI access point information?
  5. Wireless Network Scanner
Community
  • 1
  • 1
Furqan Safdar
  • 16,260
  • 13
  • 59
  • 93