# 8812au not detecting 5GHz networks during scan

## Lylloo

I have a D-Link DWA172 wireless adapter supporting 802.11ac an using 2.4 and 5GHz frequencies. It's ID is 2001:3318 while using lsusb.

According to this Wiki https://wikidevi.com/wiki/D-Link_DWA-172_rev_A1 device is supported by abperiasamy's drivers, so I downloaded them from its Git hub, compiled them and modprobed them.

After scanning for wireless networks using "iwlist scan"  it finds my 5GHz network broadcasted by my TL-WDR3600 v1.5 router. Then my Gentoo connects to it and in a few seconds it is loosing connection to the 5GHz networks and reconnects to the fallback network on 2.4GHz. Then I run "iwlist scan" again and my 5GHz network does not appear anymore. If I modprobe -rv 8812au, unplug USB device, then reconnect it and run modprobe -v 8812au again and scan for wifi APs my 5GHz appears again and my Gentoo connects to it one more time and then the same thing happens, it is loosing connection to 5GHz network again and connects to fallback 2.4GHz network.

It is annoying, because my virtual Win10 scans and connects to 5GHz network without any problem using the same device and stays connected for as long as I am using it.

I am using this  modprobe.d config for the wifi stack:

```
cat /etc/modprobe.d/cfg80211.conf 

options cfg80211 ieee80211_regdom=US
```

Wifi regions are set to the US in DD-WRT firmware and channels in use are 40ch for 5GHz and 6ch for 2.4GHz

I've already researched that regulatory domain might be the reason for this trouble, so I tried with region set in cfg80211.conf and without it - using regulatory domain 00.

The network is protected with WPA2 AES key.

Any help to resolve this annoying issue will be highly appreciated.

Thanks in advance.

Best regards,

lylloo

----------

## charles17

Does https://wiki.gentoo.org/wiki/AC1200_Wireless_Adapters#Realtek_RTL8812AU provide some help for your problem?

----------

## Lylloo

Thanks for providing this link.

Yes, I've already used this howto about a month ago and tried everything there (alternative drivers, adding needed kernel modules), but it didn't help in my case.

----------

## hephooey

I had a similar problem. I have an Edimax adapter using 8812 chip. I set up my 2.4G and 5G wifi with the same ssid. The adapter always connect to the 2.4G one. If I blacklist the mac address of the adapter on the router for 2.4G wifi. The adapter cannot connect to the wireless network at all. But if I disable the 2.4G wifi, the adapter can connect to the 5G wifi without any problem. I ended up hack the code of the driver to disable the 2.4G channels. It works fine for me since I only use this for my desktop at home, no need to worry about other networks. I guess giving 2.4G and 5G different ssid should also work

----------

## Lylloo

They already are different, but no 5GHz SSID appears during scan at all.

----------

## chithanh

What is the output of

```
# iw reg get
```

Does it change after 5 GHz stops working, or when you set 

```
# iw reg set US
```

?

The ieee80211_regdom parameter depends on the CONFIG_WIRELESS_OLD_REGULATORY kernel configuration option, and should be avoided in favor of crda+wireless-regdb.

----------

