rtl8812AU and/or rtl8814AU drivers

I updated the rtl8812au-ac driver, It should work now.
https://github.com/1Jeff1/openwrt/commit/af426db0e78c3880a6bfe26fa97ae03caccce783.patch

3 Likes

Thanks @jeff1 I was able to compile the WiFi driver for the NanoPi R2S and confirm working with my dongle Alfa AWUS036ACS with no issues at all, also this driver works better than the one used on friendlywrt as this support AC WiFi.

How did you set it up? By CLI or GUI?

I set it up using GUI, I'm not familiarized with CLI.

I mean by LuCI? Because I have an Archer T4UHP with the rtl8812au chipset and it doesn't work.

@jeff1
I managed to compile your rtl8812au-ac driver package as single package for 19.07.3 on a Archer C2600 (have modified 0003-wireless-5.8.patch to match the older kernel code). The driver can do a successful scan on my ASUS USB-AC56 wifi device (after having problems with the delivered rtl8812au-ct driver).

The problem is, that I am not able to successfully connect to a hotspot:

root@Gate:~# logread | grep -e radio2 -e wlan4wan2 -e wwan2
Sun Aug  9 18:30:00 2020 cron.info crond[1026]: USER root pid 14653 cmd /usr/sbin/hotspot-login wlan4wan2>/dev/null
Sun Aug  9 18:45:00 2020 cron.info crond[1026]: USER root pid 25764 cmd /usr/sbin/hotspot-login wlan4wan2>/dev/null
Sun Aug  9 18:52:21 2020 daemon.notice netifd: Interface 'wwan2' is disabled
Sun Aug  9 18:52:21 2020 daemon.notice netifd: Interface 'wwan2' has link connectivity loss
Sun Aug  9 18:52:21 2020 daemon.notice netifd: wwan2 (25295): udhcpc: received SIGTERM
Sun Aug  9 18:52:21 2020 daemon.notice netifd: Interface 'wwan2' is now down
Sun Aug  9 18:52:21 2020 daemon.notice wpa_supplicant[25221]: wlan4wan2: CTRL-EVENT-DISCONNECTED bssid=ec:58:ea:12:10:88 reason=3 locally_generated=1
Sun Aug  9 18:52:21 2020 daemon.notice wpa_supplicant[25221]: nl80211: deinit ifname=wlan4wan2 disabled_11b_rates=0
Sun Aug  9 18:52:21 2020 daemon.notice wpa_supplicant[25221]: wlan4wan2: CTRL-EVENT-TERMINATING
Sun Aug  9 18:52:22 2020 daemon.notice netifd: radio2 (31285): command failed: Not supported (-95)
Sun Aug  9 18:52:22 2020 kern.info kernel: [ 8665.496512] IPv6: ADDRCONF(NETDEV_UP): wlan4wan2: link is not ready
Sun Aug  9 18:52:22 2020 daemon.notice netifd: Network device 'wlan4wan2' link is up
Sun Aug  9 18:52:22 2020 daemon.notice netifd: Interface 'wwan2' is enabled
Sun Aug  9 18:52:22 2020 daemon.notice netifd: Interface 'wwan2' has link connectivity
Sun Aug  9 18:52:22 2020 daemon.notice netifd: Interface 'wwan2' is setting up now
Sun Aug  9 18:52:22 2020 daemon.notice netifd: wwan2 (31551): udhcpc: started, v1.30.1
Sun Aug  9 18:52:22 2020 daemon.notice netifd: wwan2 (31551): udhcpc: sending discover
Sun Aug  9 18:52:27 2020 daemon.notice netifd: wwan2 (31551): udhcpc: sending discover
Sun Aug  9 18:52:27 2020 daemon.notice wpa_supplicant[31463]: wlan4wan2: Trying to associate with ec:58:ea:12:10:88 (SSID='WiFi4rlp' freq=2437 MHz)
Sun Aug  9 18:52:27 2020 daemon.notice wpa_supplicant[31463]: wlan4wan2: CTRL-EVENT-STARTED-CHANNEL-SWITCH freq=2437 ht_enabled=1 ch_offset=0 ch_width=20 MHz cf1=2437 cf2=0
Sun Aug  9 18:52:29 2020 daemon.notice wpa_supplicant[31463]: wlan4wan2: Associated with ec:58:ea:12:10:88
Sun Aug  9 18:52:29 2020 daemon.notice wpa_supplicant[31463]: wlan4wan2: CTRL-EVENT-CONNECTED - Connection to ec:58:ea:12:10:88 completed [id=0 id_str=]
Sun Aug  9 18:52:29 2020 daemon.notice wpa_supplicant[31463]: wlan4wan2: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
Sun Aug  9 18:52:29 2020 kern.info kernel: [ 8672.120113] IPv6: ADDRCONF(NETDEV_CHANGE): wlan4wan2: link becomes ready
Sun Aug  9 18:52:31 2020 user.notice mwan3[32642]: Execute ifdown event on interface wwan2 (unknown)
Sun Aug  9 18:52:31 2020 user.info mwan3track[3548]: Detect ifdown event on interface wwan2 (wlan4wan2)
Sun Aug  9 18:52:31 2020 user.notice mwan3track[3548]: Interface wwan2 (wlan4wan2) is offline
Sun Aug  9 18:52:32 2020 daemon.notice netifd: wwan2 (31551): udhcpc: sending discover
config wifi-device 'radio2'
        option path 'platform/soc/soc:usb30@1/10000000.dwc3/xhci-hcd.1.auto/usb4/4-1/4-1:1.0'
        option type 'mac80211'
        option htmode 'VHT80'
        option country 'DE'
        option channel '6'
        option hwmode '11g'

config wifi-iface 'wwan2'
        option device 'radio2'
        option ifname 'wlan4wan2'
        option network 'wwan2 wwan2_6'
        option mode 'sta'
        option ssid 'WiFi4rlp'
        option encryption 'none'
        option macaddr 'XX:XX:XX:XX:XX:XX'
config interface 'wwan2'
        option proto 'dhcp'
        option hostname 'android-xxxxxxxxxx'
        option macaddr 'XX:XX:XX:XX:XX:XX'
        option metric '2'
        option peerdns '0'
        list dns '8.8.8.8'
        list dns '1.1.1.1'
        list dns '8.8.4.4'
        list dns '1.0.0.1'

config interface 'wwan2_6'
        option ifname '@wwan2'
        option proto 'dhcpv6'
        option reqaddress 'try'
        option reqprefix 'auto'
        option metric '2'

Any idea why the wifi disconnects directly? The same config works on a other device.

Thanks for creating this patch and for using the aircrack driver! I am able to scan!
Haven't previously been able to do that.

Likewise, a lot cannot be done because it does not work well.

Yeah, I can't connect either with the patch he posted but it scans and this is the first patch I've seen using the aircrack source for openwrt. I know aircrack drivers work in client mode on arch linux so I think it's a step in the right direction at least.

1 Like

It connect only to encrypted networks, some parameter seems to be missing that make it look on the web UI that is not connected.

root@OpenWrt:/# iwconfig wlan0
wlan0     IEEE 802.11AC  ESSID:"XXX_5GHz"  
          Mode:Managed  Frequency:5.765 GHz  Access Point: 90:C8:A0:09:1E:9A
          Bit Rate:434 Mb/s   
          RTS thr:off   Fragment thr:off
          Encryption key:****-****-****-****-****-****-****-****   Security mode:open
          Power Management:off
          Link Quality=37/100  Signal level=68/100  Noise level=0/100
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

Hi,

trying to compile the RTL8812AU driver but I cant find:

compat-wireless "Module.symvers" located in build_dir/target.../linux-.../compat-wireless into the folder "staging_dir/target.../usr/include/mac80211/Module.symvers" as to allow proper linking

I have copied the driver to the proper location and I can find it in make menuconfig

I am building OpenWrt 19.07.2 for x86 on Ubuntu 20...

I get this error:

 from /home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/build_dir/target-x86_64_musl/linux-x86_64/rtl8812au-2016-12-13/core/rtw_cmd.c:22:
/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/build_dir/target-x86_64_musl/linux-x86_64/rtl8812au-2016-12-13/include/osdep_service.h: In function 'thread_enter':
/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/build_dir/target-x86_64_musl/linux-x86_64/rtl8812au-2016-12-13/include/osdep_service.h:343:2: error: implicit declaration of function 'allow_signal'; did you mean 'do_signal'? [-Werror=implicit-function-declaration]
  allow_signal(SIGTERM);
  ^~~~~~~~~~~~
  do_signal
/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/build_dir/target-x86_64_musl/linux-x86_64/rtl8812au-2016-12-13/include/osdep_service.h: In function 'flush_signals_thread':
/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/build_dir/target-x86_64_musl/linux-x86_64/rtl8812au-2016-12-13/include/osdep_service.h:353:6: error: implicit declaration of function 'signal_pending'; did you mean 'timer_pending'? [-Werror=implicit-function-declaration]
  if (signal_pending (current))
      ^~~~~~~~~~~~~~
      timer_pending
/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/build_dir/target-x86_64_musl/linux-x86_64/rtl8812au-2016-12-13/include/osdep_service.h:355:3: error: implicit declaration of function 'flush_signals'; did you mean 'do_signal'? [-Werror=implicit-function-declaration]
   flush_signals(current);
   ^~~~~~~~~~~~~
   do_signal
In file included from /home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/build_dir/target-x86_64_musl/linux-x86_64/rtl8812au-2016-12-13/include/drv_types.h:35:0,
                 from /home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/build_dir/target-x86_64_musl/linux-x86_64/rtl8812au-2016-12-13/core/rtw_cmd.c:22:
/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/build_dir/target-x86_64_musl/linux-x86_64/rtl8812au-2016-12-13/include/wifi.h: At top level:
/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/build_dir/target-x86_64_musl/linux-x86_64/rtl8812au-2016-12-13/include/wifi.h:994:0: warning: "IEEE80211_MAX_AMPDU_BUF" redefined
 #define IEEE80211_MAX_AMPDU_BUF 0x40
 
In file included from /home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/staging_dir/target-x86_64_musl/usr/include/mac80211/net/cfg80211.h:24:0,
                 from /home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/build_dir/target-x86_64_musl/linux-x86_64/rtl8812au-2016-12-13/include/osdep_service_linux.h:81,
                 from /home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/build_dir/target-x86_64_musl/linux-x86_64/rtl8812au-2016-12-13/include/osdep_service.h:41,
                 from /home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/build_dir/target-x86_64_musl/linux-x86_64/rtl8812au-2016-12-13/include/drv_types.h:32,
                 from /home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/build_dir/target-x86_64_musl/linux-x86_64/rtl8812au-2016-12-13/core/rtw_cmd.c:22:
/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/staging_dir/target-x86_64_musl/usr/include/mac80211/linux/ieee80211.h:1442:0: note: this is the location of the previous definition
 #define IEEE80211_MAX_AMPDU_BUF  0x100
 
cc1: some warnings being treated as errors
make[6]: *** [scripts/Makefile.build:327: /home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/build_dir/target-x86_64_musl/linux-x86_64/rtl8812au-2016-12-13/core/rtw_cmd.o] Error 1
make[5]: *** [Makefile:1542: _module_/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/build_dir/target-x86_64_musl/linux-x86_64/rtl8812au-2016-12-13] Error 2
make[5]: Leaving directory '/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.171'
make[4]: *** [Makefile:1576: modules] Error 2
make[4]: Leaving directory '/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/build_dir/target-x86_64_musl/linux-x86_64/rtl8812au-2016-12-13'
make[3]: *** [Makefile:84: /home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/build_dir/target-x86_64_musl/linux-x86_64/rtl8812au-2016-12-13/.built] Error 2
make[3]: Leaving directory '/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/package/kernel/rtl8812au'
time: package/kernel/rtl8812au/compile#1.95#0.32#2.15
make[2]: *** [package/Makefile:113: package/kernel/rtl8812au/compile] Error 2
make[2]: Leaving directory '/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2'
make[1]: *** [package/Makefile:107: /home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/staging_dir/target-x86_64_musl/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2'
make: *** [/home/lordrayden/OpenWrt/Rooter19072/rooter1907-2/include/toplevel.mk:227: world] Fehler 2

How can I resolve this?

I tried the driver above, and it works.

In my environment, it cannot run AC & AP mode (and reboot is required if switch from one to another) at the same time, and the LuCI seemed not right as some info may not provided correctly by driver or we cannot identify it.

Howerver, it's really a bit step supporting RTL firmwares, hoping it would be better in the future.

Thank you so much Jeff. Much appreciated for your work. This patch works really well with the latest snapshot of OpenWRT. I'm using the ALFA Awus1900 USB wifi.

Keep up the good work. Please let us know if you have any more new patches.

Thank you

Just doing some comparison with my WRT1900acs V2 running the latest OpenWRT snapshot. I have the ALFA Awus1900 USB wifi connect at the back of the WRT1900acs usb port.

This is a 5Ghz stock test no tweaking or tuning on the WRT1900 wifi and the ALFA wifi.

WRT1900acs V2 @ 5Ghz wifi

ALFA Awus1900 USB @ 5Ghz wifi

Check the pings!
Jeff's driver is a blessing in the skies. Thanks again Jeff! :smiley:

I don't have Ubuntu, but I use MXLinux(debian freespin). It should be similar??

Just awesome :smiley:

Around 10 meters behind a plaster wall

Around 7 meters, behind 2 plaster walls and a large wardrobe and TV blocking the Awus1900.

All tests done on 5Ghz wifi Channel 161. Clients have intel 7260ac

Using Jeff1's patch.

For some reason none of the drivers in the Openwrt package lists work with this Awus1900. Only Jeff1''s patch. If anyone has managed to get one of the drivers in the OpenWRT to work with this Awus1900, please let me know.

Cheers

Hello I use edup 1612 8814au (3x3, 4 antennas) as an access point at an x86-64 home server running openwrt under proxmox

Jeffs patch works very good .
Gimbleguy thank you for the video how to compile
With openwrt the device has much stronger signal than both aircrack-ng driver under linux (hostapd) and windows 8.1 with realtek's own utility as an access point (at openwrt I can choose 30db with the right country i.e. panama)
Speeds are on par wih windows 8.1 access point and at difficult rooms better than windows (with 30db setting ).
Using as a client a dell1830 (3x3) card I can see about 560mbit/s (at the same room with 8814au)

but there are some problems:

  1. the most serious is that I can not use a channel above 48 (5240). The channels 5260-5320 and 5500-5885 are shown at the luci drop-down list and I can choose them. Luci reports that it transmits at the chosen channel (i.e.5500) but it has switched to 5180 (36). Tried to change countries without much luck.
    iw list shows that all the above channels are available
    At debian hostapd says something about neighbouring BSSes and automatically changes channel (at some of the
    mentioned channels)
    At windows I can transmit at all the above channels as access point (so it is not a hardware thing)

  2. After I change a hardware setting (i.e transmit channel) a reboot is needed. Without reboot the clients associate but the password is not accepted

  3. The CPU usage seems much higher with openwrt than debian even without traffic (just with clients connected).
    At linux I have about 2-3% of a single CPU (i5-6500) and at openwrt about 10-12%. I think it helps if I chose to install USB3
    drivers at make menuconfig --> kernel modules --> USB support --> Support for USB3 controllers
    With it enabled I think it idles at 5-10% (instead of 10-12%). I need to do some more tests for it

  4. I need to install not luci but luci-ssl (else I have problems connecting with firefox)

Any help with the channel problem will be much appreciated

Thank you

1 Like

Another problem.
When the power is cut and reboot the device is "disabled".
I need to manually restart the device from Luci in order to be enabled
This is a big problem because at a power outage the AP is not available.

Any solution?

I can not get a console with enter or ctrl-c after a power outage

Only way to get a console is to do a restart of wireless device through Luci or reboot manually openwrt (from luci no console)

Next is the screen after a reboot


It seems that 1st boot stops just before "usbcore: registered new interfaxe driver rtl88XXau"

Hello, can you reupload the video?:
Patching & Compile OpenWRT Kernel for ALFA Awus1900 USB Wifi Adapter Connected To WRT1900ACS

It's not available.
My regards.