morrownr / 8812au Goto Github PK
View Code? Open in Web Editor NEWLinux Driver for USB WiFi Adapters that are based on the RTL8812AU Chipset
Linux Driver for USB WiFi Adapters that are based on the RTL8812AU Chipset
The setup is loosely based as documented in B.A.T.M.A.N Advanced Quick start
Hardware:
Alfa AWUS036ACH (have some other realtek devices which i will test - waiting for an MT7612U device) on Raspberry Pi 4.
Software:
Centos 8, not the very latest patches in the Realtek rt8812au driver - will try them tomorrow but expect no difference.
Setup script:
#!/bin/bash
#
if [ $# -lt 2 ]; then
echo "$0: <wlan_interface> <bat_mesh_name>"
exit 1
fi
# based on the open-mesh batman Quick Start Guide
#
# setup eth0
sudo modprobe batman-adv
sudo yum install avahi-autoipd -y
sudo batctl if add eth0
sudo atctl if
# setup $1
# cannot remove and read interface as IBSS - can change it though....
sudo iw dev $1 set type ibss
sudo ip link set up mtu 1532 dev $1
sudo iw dev $1 ibss join $2 5785 HT20 fixed-freq
sudo batctl if add $1
sudo ip link set up dev bat0
sudo avahi-autoipd bat0 &
batctl if
When I run this script on two identically configured Pi's, the following happens:
[ 112.490762] ------------[ cut here ]------------
[ 112.498509] WARNING: CPU: 3 PID: 1649 at /var/lib/dkms/rtl8812au/5.9.3.2/build/core/rtw_cmd.c:4053 rtw_dfs_rd_en_decision+0x118/0x3f0 [8812au]
[ 112.517367] Modules linked in: nft_counter ipt_REJECT nf_reject_ipv4 ip6t_REJECT nf_reject_ipv6 xt_tcpudp xt_state xt_conntrack nf_conntrack nf_defrag_ipv4 nft_compat nf_tables nfnetlink 8812au(O) bcm2835_codec(C) bcm2835_isp(C) bcm2835_v4l2(C) brcmfmac videobuf2_dma_contig v4l2_mem2mem brcmutil bcm2835_mmal_vchiq(C) videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 dwc2 videobuf2_common raspberrypi_hwmon udc_core videodev vc_sm_cma(C) mc rpivid_mem uio_pdrv_genirq uio sch_fq_codel i2c_dev batman_adv bridge stp llc mac80211 libarc4 sha256_generic libsha256 cfg80211 rfkill ip_tables x_tables ipv6 nf_defrag_ipv6 crc_ccitt
[ 112.595604] CPU: 3 PID: 1649 Comm: RTW_CMD_THREAD Tainted: G WC O 5.4.49-v8.1.el8 #1
[ 112.608127] Hardware name: Raspberry Pi 4 Model B Rev 1.2 (DT)
[ 112.617651] pstate: 20000005 (nzCv daif -PAN -UAO)
[ 112.626141] pc : rtw_dfs_rd_en_decision+0x118/0x3f0 [8812au]
[ 112.635507] lr : rtw_dfs_rd_en_decision+0xd8/0x3f0 [8812au]
[ 112.644680] sp : ffffffc01223bd10
[ 112.651543] x29: ffffffc01223bd10 x28: ffffffc008f288b0
[ 112.660438] x27: 0000000000000003 x26: ffffffc00903d000
[ 112.669377] x25: 0000000000000004 x24: ffffffc0113be000
[ 112.678231] x23: ffffffc0113bd000 x22: 000000000000000e
[ 112.687141] x21: ffffff80e92087a8 x20: 00000000000000fe
[ 112.696002] x19: ffffff80e9208000 x18: 0000000000000000
[ 112.704845] x17: 0000000000000000 x16: 0000000000000000
[ 112.713685] x15: 0000000000000000 x14: 0000000000000000
[ 112.722449] x13: 0000000000000000 x12: 0000000000000000
[ 112.731217] x11: 0000000000000001 x10: 00000000000019a0
[ 112.739870] x9 : ffffffc01223b890 x8 : ffffffc01223bd80
[ 112.748521] x7 : 0000000000000000 x6 : 0000000000000001
[ 112.757203] x5 : ffffff80e142dc80 x4 : ffffffc01223bd6a
[ 112.765935] x3 : ffffffc01223bd6b x2 : ffffffc0113bd000
[ 112.774728] x1 : 00000000000000fe x0 : 0000000000000000
[ 112.783451] Call trace:
[ 112.789354] rtw_dfs_rd_en_decision+0x118/0x3f0 [8812au]
[ 112.798073] rtw_mlmeext_disconnect+0x150/0x1a0 [8812au]
[ 112.806743] disconnect_hdl+0x58/0xb8 [8812au]
[ 112.814584] rtw_cmd_thread+0x248/0x38c [8812au]
[ 112.822490] kthread+0x124/0x128
[ 112.828937] ret_from_fork+0x10/0x18
[ 112.835677] ---[ end trace 8e322d2dc552c87e ]---
[ 120.547318] NOHZ: local_softirq_pending 08
[ 141.027706] NOHZ: local_softirq_pending 08
[ 143.543924] brcmfmac: brcmf_cfg80211_set_power_mgmt: power save enabled
[ 144.318876] batman_adv: bat0: Interface activated: wlan1
[ 144.327626] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
[ 148.639578] batman_adv: bat0: Interface deactivated: wlan1
[ 148.649336] ------------[ cut here ]------------
I looked at the source code, it is in where it makes a decision about the packet type - and this type isn't being handled.
rtw_dfs_rd_en_decision()
it falls through to the default: case in the switch statement (it would have been nice if Realtek would have told the switch value there too - but they used just a simple macro instead of WARN_ON(flag,format...)
Don't know whether this can / should be fixed. I'll try to get a bit more data tomorrow.
I am looking for an older version of the driver, which, if I recall correctly had monitor mode enabled. I believe the repo used to be https://github.com/morrownr/8812au-20210629, but it now seems to be removed. Is there some way to get this older repo?
Hi, after whole process i got this error message...
DKMS: add completed.
Error! echo
Your kernel headers for kernel 5.4.83-v7l+ cannot be found at
/lib/modules/5.4.83-v7l+/build or /lib/modules/5.4.83-v7l+/source.
An error occurred while running: dkms build : 1
Done.
Removing 8814au.conf from: /etc/modprobe.d
Removing source files from: /usr/src/rtl8814au-5.8.5.1
Cleanup complete
... so the conf file missing
What Iam I doing wrong? I run on 2021-01-11-raspios-buster-armhf-lite, RPi 4B
Thx
I am currently testing this driver with hostapd. With the proper driver settings and hostapd.conf settings, I have found that this driver and a good rtl8812au adapter make for a very good Access Point. All capabilities, including n and ac are supported, including channels widths up to 80.
I plan to make a guide available here soon. If anyone wants to start testing now, let me know and I will post a short version of the guide here. I will eventually make the details available in the main documentation.
Nick
Hello, i can't build your drive and get next error, when type make in console:
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.9.0-1-amd64/build M=/home/work/gits/8812au modules
make[1]: Entering directory '/usr/src/linux-headers-5.9.0-1-amd64'
ERROR: Kernel configuration is invalid.
include/generated/autoconf.h or include/config/auto.conf are missing.
Run 'make oldconfig && make prepare' on kernel src to fix it.
make[2]: *** [/usr/src/linux-headers-5.9.0-1-common/Makefile:718: include/config/auto.conf] Error 1
make[1]: *** [/usr/src/linux-headers-5.9.0-1-common/Makefile:185: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.9.0-1-amd64'
make: *** [Makefile:2395: modules] Error 2
Hi,
Is AP/VLAN mode supported by this driver? It's difficult to find out because not many people use that feature.
Thanks
Can it work on 5.10.0?
kali kernel:Linux kali 5.9.0-kali1-amd64 #1 SMP Debian 5.9.1-1kali2 (2020-10-29) x86_64 GNU/Linux
The result after restarting the virtual machine
To set high power, I used the following command
sudo iw reg set US
sudo ip link set wlan0 down
iw wlan0 set txpower fixed 3000
sudo ip link set wlan0 up
Return result
I don't understand where is the problem? Can you help me?
thanks
Injection fully working on 2.4ghz, 5 ghz it is not effective at all.
I'm stuck at this, tried a lot of things from all over Google to no avail. Searching manually with ls
command on the directory clearly shows theres a file called dkms.conf
, so maybe DKMS is looking into the wrong directory for the file..? I've even tried to download the driver into the root directory and install from there, but it still gives the same error.
System: Ubuntu 18.04 / 5.4.80-hiveos
sudo ./install-driver.sh:
Installing rtl8812au-5.9.3.2
Copying source files to: /usr/src/rtl8812au-5.9.3.2
Copying 8812au.conf to: /etc/modprobe.d
Creating symlink /var/lib/dkms/rtl8812au/5.9.3.2/source ->
/usr/src/rtl8812au-5.9.3.2
DKMS: add completed.
Kernel preparation unnecessary for this kernel. Skipping...
Building module:
cleaning build area...
'make' -j4 KVER=5.4.80-hiveos KSRC=/lib/modules/5.4.80-hiveos/build..............
cleaning build area...
DKMS: build completed.
8812au:
Running module version sanity check.
Good news! Module version v5.9.3.2_37279.20201012 for 8812au.ko exactly matches what is already found in kernel 5.4.80-hiveos.
DKMS will not replace this module.
You may override by specifying --force.
depmod...
DKMS: install completed.
dkms status:
Error! Could not locate dkms.conf file
File: does not exist.
The driver was installed successfully.
sudo ./remove-driver.sh:
-------- Uninstall Beginning --------
Module: rtl8812au
Version: 5.9.3.2
Kernel: 5.4.80-hiveos (x86_64)
-------------------------------------
Status: Before uninstall, this module version was ACTIVE on this kernel.
8812au.ko:
- Uninstallation
- Deleting from: /lib/modules/5.4.80-hiveos/
rmdir: failed to remove '': No such file or directory
- Original module
- No original module was found for this module on this kernel.
- Use the dkms install command to reinstall any previous module version.
depmod...
DKMS: uninstall completed.
------------------------------
Deleting module version: 5.9.3.2
completely from the DKMS tree.
------------------------------
Done.
The driver was removed successfully.
I'm a big newbie at Linux so any help will be greatly appreciated!!!
I have this error:
Error! Could not locate dkms.conf file.
File: does not exist.
someone can help plz?
Installing rtl8812au-5.9.3.2
Copying source files to: /usr/src/rtl8812au-5.9.3.2
Copying 8812au.conf to: /etc/modprobe.d
Error! DKMS tree already contains: rtl8812au-5.9.3.2
You cannot add the same module/version combo more than once.
An error occurred while running: dkms add : 3
Removing 8812au.conf from: /etc/modprobe.d
Removing source files from: /usr/src/rtl8812au-5.9.3.2
Cleanup complete
dkms status:
8812au, 150821: added
Error! Could not locate dkms.conf file.
File: does not exist.
its a zorin machine (Ubuntu 18 i think)
Manual Monitor mode using iw will work, but tools that automatically set the monitor mode will crash, like bettercap tool or "sudo airmon-ng start wlan1"
This git is by far the best driver I found, fixed deauths - thank-you
Hello,
updated Kali x86 to latest version today:
Linux a 5.10.0-kali6-686-pae #1 SMP Debian 5.10.26-1kali2 (2021-04-01) i686 GNU/Linux
In previous versions the driver worked very well with no issues.
But in this version airodump-ng does not filter by channel and even it does not find any ap from time to time.
Using default options with a usb 3.0 device powered in a usb 2.0 port.
Attached dmesg output shows errors. They repeat in a loop.
error_8812.txt
Please see README for a link to the proper repo.
Regards
Hi All,
I have an issue with the installation. Doing well until running installation script:
sudo ./install-driver.sh
As a result I got:
Running: install-driver.sh version 20210421
Start installation.
Copying source files to: /usr/src/rtl8812au-5.9.3.2
Copying 8812au.conf to: /etc/modprobe.d
Creating symlink /var/lib/dkms/rtl8812au/5.9.3.2/source ->
/usr/src/rtl8812au-5.9.3.2
DKMS: add completed.
Kernel preparation unnecessary for this kernel. Skipping...
Building module:
cleaning build area...
'make' -j4 KVER=5.10.17-v7l+ KSRC=/lib/modules/5.10.17-v7l+/build...(bad exit status: 2)
Error! Bad return status for module build on kernel: 5.10.17-v7l+ (armv7l)
Consult /var/lib/dkms/rtl8812au/5.9.3.2/build/make.log for more information.
An error occurred. dkms build error = 10
Please report this error.
I have RPi 4B with Raspbian GNU/Linux 10 (buster), went for 32bit with sudo ./raspi32.sh
NIC is Comfast CF-912AC: Bus 001 Device 003: ID 0bda:8812 Realtek Semiconductor Corp. RTL8812AU 802.11a/b/g/n/ac 2T2R DB WLAN Adapter
Logfile /var/lib/dkms/rtl8812au/5.9.3.2/build/make.log
output:
pi@raspberrypi:~/src/8812au $ cat /var/lib/dkms/rtl8812au/5.9.3.2/build/make.log
DKMS make.log for rtl8812au-5.9.3.2 for kernel 5.10.17-v7l+ (armv7l)
sob, 8 maj 2021, 10:58:34 CEST
make ARCH=arm CROSS_COMPILE= -C /lib/modules/5.10.17-v7l+/build M=/var/lib/dkms/rtl8812au/5.9.3.2/build modules
make[1]: Wej\u015bcie do katalogu '/home/pi/linux-3a33f11c48572b9dd0fecac164b3990fc9234da8'
ERROR: Kernel configuration is invalid.
include/generated/autoconf.h or include/config/auto.conf are missing.
Run 'make oldconfig && make prepare' on kernel src to fix it.
make[1]: *** [Makefile:718: include/config/auto.conf] B\u0142\u0105d 1
make[1]: Opuszczenie katalogu '/home/pi/linux-3a33f11c48572b9dd0fecac164b3990fc9234da8'
make: *** [Makefile:2412: modules] B\u0142\u0105d 2
Thanks for help in advance
Hi,
I've been trying to get my wifi dongle (8811au) back on ubuntu 21.04 for 3 days.
Can anyone help
neuberfran@ubuntu2104:~$ nmcli con
NAME UUID TYPE DEVICE
Conexão cabeada 1 4f0a34b8-d394-3914-b110-164598dfb94a ethernet enp3s0
pablo 4a2dca15-84ed-4fba-837a-a732957991f1 wifi --
neuberfran@ubuntu2104:~$ nmcli con up pablo
Erro: Ativação da conexão falhou: No suitable device found for this connection (device lo not available because device is strictly unmanaged).
neuberfran@ubuntu2104:~$ iwconfig
lo no wireless extensions.
enp3s0 no wireless extensions.
enxd03745db188a unassociated Nickname:"WIFI@REALTEK"
Mode:Auto Frequency=2.412 GHz Access Point: Not-Associated
Sensitivity:0/0
Retry:off RTS thr:off Fragment thr:off
Power Management:off
Link Quality=0/100 Signal level=0 dBm Noise level=0 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
neuberfran@ubuntu2104:~$ route -n
Tabela de Roteamento IP do Kernel
Destino Roteador MáscaraGen. Opções Métrica Ref Uso Iface
0.0.0.0 192.168.1.1 0.0.0.0 UG 100 0 0 enp3s0
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 enp3s0
192.168.1.0 0.0.0.0 255.255.255.0 U 100 0 0 enp3s0
Hi there,
I used your instructions to install hostapd on ubuntu 18.04 installed on an old PC. I uninstalled network-manger, and installed dhcpcd5. Everything else was based on your instructions. The problem is the PC (server) itself has internet access, but the WiFi clients do not. They are able to connect but they do not get IP address.
Hello
I would be very interested to be able to get the original Realtek 5.9.3.2 driver, as the last one I was able to get from FTP was 5.6.4.2. The FTP credentials I have are no longer working.
My repo is starting to show signs of wear and tear, and it would be good to rebase to a newer version.
My 5.6.4.2 repo
I opened an issue on my own repo with some thoughts on the kernel 5.10 breakage.
If you have any thoughts on this, feel free to share.
sometime this week, yesterday I believe, you must have changed something that makes my device get 42949572.96dBm with iw dev on managed mode. Fresh install from this branch and it goes like that (I use your repo a lot so I noticed it)
anyone else?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.