locked
[W10M][UWP App] How to get connected Access Point MAC Address(BSSID) with Wi-Fi? RRS feed

  • Question

  • Hi.

    .

    I need currently connected AP info (SSID, BSSID, RSSI, Channel, IPAddress).

    How to get this information?

    If you know that, please let me know.

    Thanks.

    Jack.

    Tuesday, July 5, 2016 1:24 AM

Answers

  • Hi jack.hong,
    The WlanConnectionProfileDetails class only provide GetConnectedSsid method to get the Connected Ssid. As I know, there is no other method to get the connected BSSID.

    I will recommend you submit your feedback/suggestion/feature-request in our Windows 10 Feedback app.


    Best Regards,
    Jayden Gu


    • Proposed as answer by Jayden Gu Wednesday, August 3, 2016 1:57 PM
    • Marked as answer by Barry Wang Thursday, August 4, 2016 9:52 AM
    Tuesday, July 26, 2016 8:57 AM

All replies

  • Hi jack.hong,

    You can initiate a network scan using the WiFiAdapter.FindAllAdaptersAsync static method or the WiFiAdapter.ScanAsync method on a particular adapter. You can also retrieve the list of networks from the results of the most current scan from a given Wi-Fi adapter by getting the AvailableNetworks property of the WiFiAdapter.NetworkReport

    For more info, see WiFiAvailableNetwork class.

    And we can use WlanConnectionProfileDetails.GetConnectedSsid to get the connected ssid that use the WlanConnectionProfileDetails.GetConnectedSsid equals to the AvailableNetwork.Ssid.

    For example:

     string connectedSsid = null;
    
     var connectedProfile = await adapter.NetworkAdapter.GetConnectedProfileAsync();
     if (connectedProfile != null &&
         connectedProfile.IsWlanConnectionProfile &&
         connectedProfile.WlanConnectionProfileDetails != null)
     {
         connectedSsid = connectedProfile.WlanConnectionProfileDetails.GetConnectedSsid();
     }
    
     if (!string.IsNullOrEmpty(connectedSsid))
     {
         if (connectedSsid.Equals(AvailableNetwork.Ssid))
         {
             connectivityLevel = connectedProfile.GetNetworkConnectivityLevel().ToString();
         }
     }
    

    You can get the more detail code in Wi-Fi scanning sample: https://github.com/Microsoft/Windows-universal-samples/tree/e13cf5dca497ad661706d150a154830666913be4/Samples/WiFiScan.


    Best Regards,

    Jayden Gu 

    Wednesday, July 6, 2016 7:14 AM
  • Hi Jayden.

    .

    Thanks for your response.

    But that is not real information for me.

    I need Connected AP Information.

    .

    Your information is can't used in area using 2 AP with same SSID.

    AP's unique identity is BSSID(MAC Address).

    .

    one Scenario.

    I hope check Wi-Fi Roaming.

    Wi-Fi Roaming is repeat connect to 2 AP with same SSID.

    If 2 AP's SSID is same, I can't get real Information as connected AP.

    Can you understand?

    .

    Thanks.

    Jack. 

    Wednesday, July 6, 2016 8:07 AM
  • Hi jack.hong,
    The WlanConnectionProfileDetails class only provide GetConnectedSsid method to get the Connected Ssid. As I know, there is no other method to get the connected BSSID.

    I will recommend you submit your feedback/suggestion/feature-request in our Windows 10 Feedback app.


    Best Regards,
    Jayden Gu


    • Proposed as answer by Jayden Gu Wednesday, August 3, 2016 1:57 PM
    • Marked as answer by Barry Wang Thursday, August 4, 2016 9:52 AM
    Tuesday, July 26, 2016 8:57 AM