WiFi 6 networks issue on Win 7/8.1

Ruslan Sydorovych 86 Reputation points
2022-08-03T20:29:19.237+00:00

Hello!

I have found an issue with my program which uses Wlan API on Windows 7/8.1 (Virtual Machine). The problem is, it reports the wrong Auth. algorithm and encryption for WiFi 6 networks (WPA3-SAE version selected in the AX1800 Wi-Fi 6 Router). Such networks are reported as Encryption: WEP and Auth. Algorithm: 802.11 Open, which are incorrect. On Windows 10 and Windows 11 (Virtual Machine), such networks reports correctly - Encryption: AES (CCMP) and Auth. Algorithm: WPA3-Personal (WPA3-PSK). Please, check out the screenshots below.

Screenshots:
227873-win-81-wlantest.png
227818-win-10-wlantest.png

What could cause such issue? Also, I have found some information here: windows-10-2004-comes-with-wi-fi-6-and-wpa3-support
So, it means that older Operating systems does not support the WiFi 6 standard (WPA3)? Thank you.

Updated: 11.08.2022:
Hello!

I have run this command: netsh wlan show drivers, so it supports the 802.11ax. I have added this command details below. On Win 10, it reports the auth. algorithm as WPA3-PSK, the not connectable reason displays: The operation was successful. (0). This info is correct.
When I use other wireless adapter which does not support the WiFi 6 on Win 10, it still reports auth. algorithm as WPA3-PSK and the not connectable reason Capability matching failed at network (262162), which also is correct. The problem occurs only on Win 7/8.1. So, I can confirm that it reports the wrong auth. algorithm and encryption when networks are WPA3-PSK (WiFi 6), it reports such networks as: Auth. Algorithm: 802.11 Open and Encryption: WEP. I think, it is a bug in Windows 7/8.1, because it should report the auth. algorithm as WPA3-PSK for WiFi 6 networks.

C:\Windows\system32>netsh wlan show drivers
Interface name: Wi-Fi 4
Driver : ASUS Wireless USB Adapter
Vendor : Realtek Semiconductor Corp.
Provider : Realtek Semiconductor Corp.
Date : 7/27/2021
Version : 5001.0.13.104
INF file : oem29.inf
Type : Native Wi-Fi Driver
Radio types supported : 802.11n 802.11g 802.11b 802.11ax 802.11ac 802.11n 802.11a
FIPS 140-2 mode supported : Yes
802.11w Management Frame Protection supported : Yes
Hosted network supported : No
Authentication and cipher supported in infrastructure mode:
Open None
WPA2-Personal CCMP
Open WEP-40bit
Open WEP-104bit
Open WEP
WPA-Enterprise TKIP
WPA-Personal TKIP
WPA2-Enterprise TKIP
WPA2-Personal TKIP
WPA-Enterprise CCMP
WPA-Personal CCMP
WPA2-Enterprise CCMP
WPA3-Personal CCMP
Vendor defined TKIP
Vendor defined CCMP
Vendor defined Vendor defined
Vendor defined Vendor defined
WPA2-Enterprise Vendor defined
WPA2-Enterprise Vendor defined
Vendor defined Vendor defined
Vendor defined Vendor defined
Wireless Display Supported: Yes (Graphics Driver: Yes, Wi-Fi Driver: Yes)

I know these OS are old and no longer supported but in case of such WiFi 6 networks it should report them as WPA3-PSK or Not supported/Unknown value than just switching to 802.11 Open (WEP), which I assume is the default value at this moment. You can try to reproduce it on Windows 7/8.1 by running a test example (https://learn.microsoft.com/en-us/windows/win32/api/wlanapi/nf-wlanapi-wlangetavailablenetworklist), I just added the check for WPA3 (DOT11_AUTH_ALGO_WPA3_SAE) to this code to illustrate this issue:

#ifndef UNICODE  
#define UNICODE  
#endif  
  
#include <windows.h>  
#include <wlanapi.h>  
#include <objbase.h>  
#include <wtypes.h>  
  
#include <stdio.h>  
#include <stdlib.h>  
  
// Need to link with Wlanapi.lib and Ole32.lib  
#pragma comment(lib, "wlanapi.lib")  
#pragma comment(lib, "ole32.lib")  
  
int wmain()  
{  
  
 // Declare and initialize variables.  
  
 HANDLE hClient = NULL;  
 DWORD dwMaxClient = 2;      //      
 DWORD dwCurVersion = 0;  
 DWORD dwResult = 0;  
 DWORD dwRetVal = 0;  
 int iRet = 0;  
 WCHAR GuidString[39] = { 0 };  
 unsigned int i, j, k;  
  
 /* variables used for WlanEnumInterfaces  */  
  
 PWLAN_INTERFACE_INFO_LIST pIfList = NULL;  
 PWLAN_INTERFACE_INFO pIfInfo = NULL;  
  
 PWLAN_AVAILABLE_NETWORK_LIST pBssList = NULL;  
 PWLAN_AVAILABLE_NETWORK pBssEntry = NULL;  
  
 int iRSSI = 0;  
  
 dwResult = WlanOpenHandle(dwMaxClient, NULL, &dwCurVersion, &hClient);  
 if (dwResult != ERROR_SUCCESS) {  
 wprintf(L"WlanOpenHandle failed with error: %u\n", dwResult);  
 return 1;  
 // You can use FormatMessage here to find out why the function failed  
 }  
  
 dwResult = WlanEnumInterfaces(hClient, NULL, &pIfList);  
 if (dwResult != ERROR_SUCCESS) {  
 wprintf(L"WlanEnumInterfaces failed with error: %u\n", dwResult);  
 return 1;  
 // You can use FormatMessage here to find out why the function failed  
 }  
 else {  
 wprintf(L"Num Entries: %lu\n", pIfList->dwNumberOfItems);  
 wprintf(L"Current Index: %lu\n", pIfList->dwIndex);  
 for (i = 0; i < (int)pIfList->dwNumberOfItems; i++) {  
 pIfInfo = (WLAN_INTERFACE_INFO *)&pIfList->InterfaceInfo[i];  
 wprintf(L"  Interface Index[%u]:\t %lu\n", i, i);  
 iRet = StringFromGUID2(pIfInfo->InterfaceGuid, (LPOLESTR)&GuidString,  
 sizeof(GuidString) / sizeof(*GuidString));  
 // For c rather than C++ source code, the above line needs to be  
 // iRet = StringFromGUID2(&pIfInfo->InterfaceGuid, (LPOLESTR) &GuidString,   
 //     sizeof(GuidString)/sizeof(*GuidString));   
 if (iRet == 0)  
 wprintf(L"StringFromGUID2 failed\n");  
 else {  
 wprintf(L"  InterfaceGUID[%d]: %ws\n", i, GuidString);  
 }  
 wprintf(L"  Interface Description[%d]: %ws", i,  
 pIfInfo->strInterfaceDescription);  
 wprintf(L"\n");  
 wprintf(L"  Interface State[%d]:\t ", i);  
 switch (pIfInfo->isState) {  
 case wlan_interface_state_not_ready:  
 wprintf(L"Not ready\n");  
 break;  
 case wlan_interface_state_connected:  
 wprintf(L"Connected\n");  
 break;  
 case wlan_interface_state_ad_hoc_network_formed:  
 wprintf(L"First node in a ad hoc network\n");  
 break;  
 case wlan_interface_state_disconnecting:  
 wprintf(L"Disconnecting\n");  
 break;  
 case wlan_interface_state_disconnected:  
 wprintf(L"Not connected\n");  
 break;  
 case wlan_interface_state_associating:  
 wprintf(L"Attempting to associate with a network\n");  
 break;  
 case wlan_interface_state_discovering:  
 wprintf(L"Auto configuration is discovering settings for the network\n");  
 break;  
 case wlan_interface_state_authenticating:  
 wprintf(L"In process of authenticating\n");  
 break;  
 default:  
 wprintf(L"Unknown state %ld\n", pIfInfo->isState);  
 break;  
 }  
 wprintf(L"\n");  
  
 dwResult = WlanGetAvailableNetworkList(hClient,  
 &pIfInfo->InterfaceGuid,  
 0,  
 NULL,  
 &pBssList);  
  
 if (dwResult != ERROR_SUCCESS) {  
 wprintf(L"WlanGetAvailableNetworkList failed with error: %u\n",  
 dwResult);  
 dwRetVal = 1;  
 // You can use FormatMessage to find out why the function failed  
 }  
 else {  
 wprintf(L"WLAN_AVAILABLE_NETWORK_LIST for this interface\n");  
  
 wprintf(L"  Num Entries: %lu\n\n", pBssList->dwNumberOfItems);  
  
 for (j = 0; j < pBssList->dwNumberOfItems; j++) {  
 pBssEntry =  
 (WLAN_AVAILABLE_NETWORK *)& pBssList->Network[j];  
  
 wprintf(L"  Profile Name[%u]:  %ws\n", j, pBssEntry->strProfileName);  
  
 wprintf(L"  SSID[%u]:\t\t ", j);  
 if (pBssEntry->dot11Ssid.uSSIDLength == 0)  
 wprintf(L"\n");  
 else {  
 for (k = 0; k < pBssEntry->dot11Ssid.uSSIDLength; k++) {  
 wprintf(L"%c", (int)pBssEntry->dot11Ssid.ucSSID[k]);  
 }  
 wprintf(L"\n");  
 }  
  
 wprintf(L"  BSS Network type[%u]:\t ", j);  
 switch (pBssEntry->dot11BssType) {  
 case dot11_BSS_type_infrastructure:  
 wprintf(L"Infrastructure (%u)\n", pBssEntry->dot11BssType);  
 break;  
 case dot11_BSS_type_independent:  
 wprintf(L"Infrastructure (%u)\n", pBssEntry->dot11BssType);  
 break;  
 default:  
 wprintf(L"Other (%lu)\n", pBssEntry->dot11BssType);  
 break;  
 }  
  
 wprintf(L"  Number of BSSIDs[%u]:\t %u\n", j, pBssEntry->uNumberOfBssids);  
  
 wprintf(L"  Connectable[%u]:\t ", j);  
 if (pBssEntry->bNetworkConnectable)  
 wprintf(L"Yes\n");  
 else {  
 wprintf(L"No\n");  
 wprintf(L"  Not connectable WLAN_REASON_CODE value[%u]:\t %u\n", j,  
 pBssEntry->wlanNotConnectableReason);  
 }  
  
 wprintf(L"  Number of PHY types supported[%u]:\t %u\n", j, pBssEntry->uNumberOfPhyTypes);  
  
 if (pBssEntry->wlanSignalQuality == 0)  
 iRSSI = -100;  
 else if (pBssEntry->wlanSignalQuality == 100)  
 iRSSI = -50;  
 else  
 iRSSI = -100 + (pBssEntry->wlanSignalQuality / 2);  
  
 wprintf(L"  Signal Quality[%u]:\t %u (RSSI: %i dBm)\n", j,  
 pBssEntry->wlanSignalQuality, iRSSI);  
  
 wprintf(L"  Security Enabled[%u]:\t ", j);  
 if (pBssEntry->bSecurityEnabled)  
 wprintf(L"Yes\n");  
 else  
 wprintf(L"No\n");  
  
 wprintf(L"  Default AuthAlgorithm[%u]: ", j);  
 switch (pBssEntry->dot11DefaultAuthAlgorithm) {  
 case DOT11_AUTH_ALGO_80211_OPEN:  
 wprintf(L"802.11 Open (%u)\n", pBssEntry->dot11DefaultAuthAlgorithm);  
 break;  
 case DOT11_AUTH_ALGO_80211_SHARED_KEY:  
 wprintf(L"802.11 Shared (%u)\n", pBssEntry->dot11DefaultAuthAlgorithm);  
 break;  
 case DOT11_AUTH_ALGO_WPA:  
 wprintf(L"WPA (%u)\n", pBssEntry->dot11DefaultAuthAlgorithm);  
 break;  
 case DOT11_AUTH_ALGO_WPA_PSK:  
 wprintf(L"WPA-PSK (%u)\n", pBssEntry->dot11DefaultAuthAlgorithm);  
 break;  
 case DOT11_AUTH_ALGO_WPA_NONE:  
 wprintf(L"WPA-None (%u)\n", pBssEntry->dot11DefaultAuthAlgorithm);  
 break;  
 case DOT11_AUTH_ALGO_RSNA:  
 wprintf(L"RSNA (%u)\n", pBssEntry->dot11DefaultAuthAlgorithm);  
 break;  
 case DOT11_AUTH_ALGO_RSNA_PSK:  
 wprintf(L"RSNA with PSK(%u)\n", pBssEntry->dot11DefaultAuthAlgorithm);  
 break;  
 case DOT11_AUTH_ALGO_WPA3_SAE:  
 wprintf(L"WPA3-PSK (%u)\n", pBssEntry->dot11DefaultCipherAlgorithm);  
 break;  
 default:  
 wprintf(L"Other (%lu)\n", pBssEntry->dot11DefaultAuthAlgorithm);  
 break;  
 }  
  
 wprintf(L"  Default CipherAlgorithm[%u]: ", j);  
 switch (pBssEntry->dot11DefaultCipherAlgorithm) {  
 case DOT11_CIPHER_ALGO_NONE:  
 wprintf(L"None (0x%x)\n", pBssEntry->dot11DefaultCipherAlgorithm);  
 break;  
 case DOT11_CIPHER_ALGO_WEP40:  
 wprintf(L"WEP-40 (0x%x)\n", pBssEntry->dot11DefaultCipherAlgorithm);  
 break;  
 case DOT11_CIPHER_ALGO_TKIP:  
 wprintf(L"TKIP (0x%x)\n", pBssEntry->dot11DefaultCipherAlgorithm);  
 break;  
 case DOT11_CIPHER_ALGO_CCMP:  
 wprintf(L"CCMP (0x%x)\n", pBssEntry->dot11DefaultCipherAlgorithm);  
 break;  
 case DOT11_CIPHER_ALGO_WEP104:  
 wprintf(L"WEP-104 (0x%x)\n", pBssEntry->dot11DefaultCipherAlgorithm);  
 break;  
 case DOT11_CIPHER_ALGO_WEP:  
 wprintf(L"WEP (0x%x)\n", pBssEntry->dot11DefaultCipherAlgorithm);  
 break;  
 default:  
 wprintf(L"Other (0x%x)\n", pBssEntry->dot11DefaultCipherAlgorithm);  
 break;  
 }  
  
 wprintf(L"  Flags[%u]:\t 0x%x", j, pBssEntry->dwFlags);  
 if (pBssEntry->dwFlags) {  
 if (pBssEntry->dwFlags & WLAN_AVAILABLE_NETWORK_CONNECTED)  
 wprintf(L" - Currently connected");  
 if (pBssEntry->dwFlags & WLAN_AVAILABLE_NETWORK_HAS_PROFILE)  
 wprintf(L" - Has profile");  
 }  
 wprintf(L"\n");  
  
 wprintf(L"\n");  
 }  
 }  
 }  
  
 }  
 if (pBssList != NULL) {  
 WlanFreeMemory(pBssList);  
 pBssList = NULL;  
 }  
  
 if (pIfList != NULL) {  
 WlanFreeMemory(pIfList);  
 pIfList = NULL;  
 }  
  
 system("Pause");  
 return dwRetVal;  
}  

Please, fix this issue. Thank you.

Windows development | Windows API - Win32
Developer technologies | C++
{count} votes

1 answer

Sort by: Most helpful
  1. Junjie Zhu - MSFT 21,646 Reputation points
    2022-08-04T03:14:55.77+00:00

    Hello @Ruslan Sydorovych
    Welcome to Microsoft Q&A!

    You can use cmd to check whether the computer supports WI-FI6.
    Enter the following command and press Enter to execute.

    netsh wlan show drivers  
    

    If it shows that the [802.11ax] protocol is supported, it means that the computer supports Wi-Fi 6.

    In the Windows support document Faster and more secure Wi-Fi in Windows , there is no mention of Windows8.

    Thank you.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.