0

System control panel


The system control panel shows this info.

How can I query it (using C#)?

Using interop, I got the WLAN_ASSOCIATION_ATTRIBUTES.

But they only seem to contain DOT11_PHY_TYPE dot11PhyType;.

This gives me some information, but not all.

Example:

  1. dot11PhyType is 7.
  2. 7 means dot11_phy_type_ht.
  3. dot11_phy_type_ht is 802.11n.
  4. 802.11n is 2.4 or 5 GHz?

Apparently most protocols can use multiple frequencies. So how can I get the currently used one? Should I just show the highest value in the list?

I think I'm misunderstanding something here.

3
  • 1
    WlanGetNetworkBssList. It returns WLAN_BSS_LIST each item of that (WLAN_BSS_ENTRY) contains ulChCentrFrequency field. That is what you are looking for. or you can use third party lib that does all for you. For example: WiFi Framework. Commented Aug 21, 2024 at 17:05
  • @MikePetrichenko Thank you very much, that works. If you post that as an answer I can accept it. Out of curiosity, if you know, why would this info not be available in WlanQueryInterface? Commented Aug 21, 2024 at 18:45
  • 1
    It actually is but from other point of view. You can query channel number (wlan_intf_opcode_channel_number) which is unique identifies a current frequency. Just simple map channel to frequency (you also need to know PHY, but you already can do it). Commented Aug 21, 2024 at 19:00

1 Answer 1

1

According to the suggestion of Mike Petrichenko:

You could try to use WlanGetNetworkBssList.

It returns WLAN_BSS_LIST each item of that (WLAN_BSS_ENTRY) contains ulChCentrFrequency field. That is what you are looking for.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.