Determine wifi Channel when on Wifi Direct
Environment: C# / Windows 10
I have a working system in which an application starts a WiFiDirectAdvertisementPublisher. A wifi device connects to the Wifi Direct session and communicates as expected.
In order to assist Wifi sniffing diagnostics, I have been asked to report the Channel number (eg: 1, 6, 11, etc) being used. I have looked through the publisher, listener, WifiDirectDevice, and various other objects of the Windows.Devices.WiFiDirect namespace but have been unable to find anything that will report the Channel being used.
Is the Channel information available in the current WiFiDirect API?
If not, is there some other way to determine it?
I started investigating P/Invoke from c# using WlanQueryInterface and requesting the wlan_intf_opcode_channel_number but wasnt sure if this would provide me what I needed. Seems like a lot of work just to get the operating wifi Channel. Initial attempts have not yet been successful.
Any info on the topic would be appreciated.
Thanks