0

can someone please tell me how I can extract Radio Type, Channel and Encryption information through Managed Wifi API in C#? I am able to see all the above information in my command prompt through "netsh wlan show interfaces" command (when I am connected to Wifi), however I am not looking to use this command and get the info in C#. Thanks.

Leo
  • 315
  • 1
  • 3
  • 17

1 Answers1

1

After doing lot of googling and R&D, I have found some solution of my problem. I have drilled down "WlanInterface" class under "WlanClient" class through which I was able to extract "Channel" and "Encryption" values. "Encryption" was little tricky, the code snippet is as follows:

 Wlan.WlanAvailableNetwork[] networks =    wlanIface.GetAvailableNetworkList(0);
                    Wlan.WlanAvailableNetwork network = networks.Where(x => x.flags.HasFlag(Wlan.WlanAvailableNetworkFlags.Connected)).FirstOrDefault(); 
                    muObject.Encryption = network.dot11DefaultCipherAlgorithm.ToString();

I have extracted "Radio Type" from netsh wlan query until I find the perfect solution... :-)

Leo
  • 315
  • 1
  • 3
  • 17