rtl8812AU and/or rtl8814AU drivers

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.

I Don't have the video but here are the instructions to compile at ubuntu:


adduser bb
usermod -aG sudo bb

#!!login as bb and NOT as root!!

sudo su

apt-get update && apt-get upgrade

apt-get install subversion build-essential libncurses5-dev zlib1g-dev gawk git ccache gettext libssl-dev xsltproc file unzip python2
#this maybe not needed : sudo apt install liblzma-dev libpam*
sudo apt-get install gcc binutils bzip2 flex python3 perl make  grep diffutils unzip gawk subversion libz-dev libc-dev rsync

apt install linux-headers-amd64 make sudo

exit
#!!!!!!!!!!!!!!! logout from root !!!!!!!!!!!!!!

git clone https://git.openwrt.org/openwrt/openwrt.git

cd openwrt

 git tag
 git branch

#If you don't use the following command you go to latest version include unstable (I think). Currently 
#19.07.7 spits an error about a crypt library missing and can not compile. 
#So DO NOT RUN the following command right now (but it will be needed generally to be at the stable tree)
 git checkout v19.07.7

#
./scripts/feeds update -a

#then (redirect τα errors at file "err"):
./scripts/feeds install -a 2>err
#at x86 I receive a couple of errors at feeds install but it seems it is OK. Others told about same errors at x86.

#Install rtl8812au(awus1900 usb driver). Jeffs patch 
wget https://github.com/1Jeff1/openwrt/commit/af426db0e78c3880a6bfe26fa97ae03caccce783.patch

patch -p1 -i af426db0e78c3880a6bfe26fa97ae03caccce783.patch

make menuconfig
#I choose target--> x86, subtarget--> x64, kernel modules--> wireless drivers--> rtl8812ac (the line that writes 8814au), 
#and collections--> luci 
#!!!!! Be carefull to NOT choose module install (M) but * (embedded at kernel). Use spacebar to cycle through options

#j4 for 4 threads
make -j4 V=s

#once OpenWRT build is finished

cd openwrt/bin/targets/x86/64
gunzip openwrt-x86-64-generic-ext4-combined.img.gz

#Then I use the file at proxmox to make a VM
#I make a new VM linux with standard linux settings. Choose whatever you want for disk (it will be deleted afterward)
#passthrough usb port of 8814 to VM
#Before starting the new VM detouch the previous made boot disk and delete it
#then at proxmox console where 113 is the number of the previously made new VM and local-zfs or local-lvm or whatevere #else is the place you made the initial disk of the VM(the disk that you deleted):

qm importdisk 113 openwrt-x86-64-generic-ext4-combined.img local-zfs
#Then the disk is shown at the proxmox web insterface and you edit it to make it scsi-0 and boot from it

#Luci responds at 192.168.1.1. To change it edit :
 vi /etc/config/network

#then login at luci and go to Network--> wireless and there you see your new 8814au to setup
#If you don't see it then something went wrong at compile and it is not recognised by openwrt
#If the if is disabled or not started try reboot
#In order to enable AP mode I had to install hostapd from : system--> software --> update 
#and reboot

#When I change options I have to apply and then reboot , else I connect but the password is not recognised
````Preformatted text`
1 Like

Sorry I took down the video as I don't use that WRT1900acs router as my main I have a new x86.

For snapshot on x86, I made a video for you.

Jeff's recommendation of packages to install first depending which linux you use

gcc-6+ binutils bzip2 flex python3 perl make4.1+ find grep diff unzip gawk getopt
subversion libz-dev libc-dev rsync which
 
My Cheat Sheet:

My Cheat Sheet:

#Make​ sure you install these packages first before proceeding to git

apt-get update && apt-get upgrade

apt-get install subversion build-essential libncurses5-dev zlib1g-dev gawk git ccache gettext libssl-dev xsltproc file

apt install linux-headers-amd64 make sudo


#Do​ NOT build OpenWRT firmware as root if you are using #Debian​/MXLinux!
#As​ your username proceed with these commands:

git clone https://git.openwrt.org/openwrt/openw...​

cd openwrt

./scripts/feeds update -a

./scripts/feeds install -a

#Install​ rtl8812au(awus1900 usb driver)

wget https://github.com/1Jeff1/openwrt/com...​

patch -p1 -i af426db0e78c3880a6bfe26fa97ae03caccce783.patch

make menuconfig

make -j1 V=sc

#once​ compile is finished

cd bin/targets
1 Like

Giant thanks for your description. Now I'm able to compile with success. I was trying to compile stable version and it was my trap.

I have similar observations:

  1. Client mode works only after reboot (any seting change need reboot);
  2. In AP mode i can change channal in luci but in deed it is still 5180 (36); I can change bandwidth; Without reboot the clients associate but the password is not accepted;

So far no solutions.

Thanks gimbleguy for movie. It works for me. Now I'm during wifi testing.

If that's not a secret, could you please reveal what kind of x86 router you are using?

Yeah I got the XCY Mini PC i58365U, 8GB Ram, 256GB SSD, 6 Gigabit LAN ports, with 4 USB3 ports, from Aliexpress at 43% off at the time.

https://www.aliexpress.com/item/4001054259808.html?spm=2114.12010612.8148356.8.3b4b5671Xni3hd

https://imgur.com/CyfAL3D

https://imgur.com/y3ZPvlE

I just done an OpenWRT squashfs build for it last night. I'll be installing it on the 256GB SSD

Testing again with the latest OpenWRT firmware Snapshot with the ALFA Awus1900 USB. Around 10 meters distance with 2 plaster walls. Using Jeff's Patch. Not bad at all

https://imgur.com/Lm07DVr