Git Product home page Git Product logo

rtl8812au's Introduction

RTL8812AU/21AU and RTL8814AU drivers

Supports Realtek 8811, 8812, 8814 and 8821 chipsets

Monitor mode Frame Injection GitHub version GitHub issues GitHub forks GitHub stars GitHub license
Kali Arch Armbian ArchLinux aircrack-ng wifite2

DKMS

This driver can be installed using [DKMS]. This is a system which will automatically recompile and install a kernel module when a new kernel gets installed or updated. To make use of DKMS, install the dkms package, which on Debian (based) systems is done like this:

$ sudo apt-get install dkms

Installation of Driver

In order to install the driver open a terminal in the directory with the source code and execute the following command:

$ sudo ./dkms-install.sh

Removal of Driver

In order to remove the driver from your system open a terminal in the directory with the source code and execute the following command:

$ sudo ./dkms-remove.sh

Build / Install with Make

For building & installing the driver with 'make' use

$ make
$ make install

Using hostapd?

Check the documents folder for more information on how to setup wpa_cli and hostapd support on these drivers.
For 802.11ac (high speed), the driver also needs to be loaded with:
"modprobe -r 88XXau" && "modprobe 88XXau rtw_vht_enable=2"

# For a bit more info on AP/STA mode configuration, see following links:
  - http://blog.fraggod.net/2017/04/27/wifi-hostapd-configuration-for-80211ac-networks.html
  - https://github.com/mk-fg/archlinux-pkgbuilds/issues/2#issuecomment-325991813

Download / Build / Install

Download

$ git clone -b v5.2.20 https://github.com/svpcom/rtl8812au.git
$ cd rtl*

Package / Build dependencies (Kali)

$ apt-get install build-essential
$ apt-get install bc
$ apt-get install libelf-dev
$ apt-get install linux-headers-`uname -r`

For Raspberry (RPI 2/3) you will need kernel sources

$ wget "https://raw.githubusercontent.com/notro/rpi-source/master/rpi-source" -O /usr/bin/rpi-source
$ chmod 755 /usr/bin/rpi-source
$ rpi-source 

Then you need to download and compile the driver on the RPI

$ git clone https://github.com/aircrack-ng/rtl8812au -b v5.2.20
$ cd rtl*
$ make
$ cp 8812au.ko /lib/modules/`uname -r`/kernel/drivers/net/wireless
$ depmod -a
$ modprobe 88XXau

then run this step to change platform in Makefile, For RPI 2/3:

$ sed -i 's/CONFIG_PLATFORM_I386_PC = y/CONFIG_PLATFORM_I386_PC = n/g' Makefile
$ sed -i 's/CONFIG_PLATFORM_ARM_RPI = n/CONFIG_PLATFORM_ARM_RPI = y/g' Makefile

But for RPI 3 B+ you will need to run those below which builds the ARM64 arch driver:

$ sed -i 's/CONFIG_PLATFORM_I386_PC = y/CONFIG_PLATFORM_I386_PC = n/g' Makefile
$ sed -i 's/CONFIG_PLATFORM_ARM64_RPI = n/CONFIG_PLATFORM_ARM64_RPI = y/g' Makefile

For setting monitor mode

  1. Fix problematic interference in monitor mode.
$ airmon-ng check kill

You may also uncheck the box "Automatically connect to this network when it is available" in nm-connection-editor. This only works if you have a saved wifi connection.

  1. Set interface down
$ ip link set <wlan1> down
  1. Set monitor mode
$  airmon-ng start <wlan1>
or
$ iw dev <wlan1> set type monitor
  1. Set interface up
$ ip link set <wlan1> up

For setting TX power to a fixed index (1=min, 63=max)

$ iwconfig <wlan1> txpower -30
or
$ iw <wlan1> set txpower fixed -3000

LED control

You can now control LED behaviour statically by Makefile, for example:

CONFIG_LED_ENABLE = n

value can be y or n

statically by module parameter in /etc/modprobe.d/8812au.conf or whatever, example:

options 88XXau rtw_led_enable=0

value can be 0 or 1

or dynamically by writing to /proc/net/rtl8812au/$(your interface name)/led_enable, for example:

$ echo "0" > /proc/net/rtl8812au/$(your interface name)/led_enable

value can be 0 or 1

check current value:

$ cat /proc/net/rtl8812au/$(your interface name)/led_enable

Testing / Debug

Check "documents" and "tools" folders for information
We also got a Android APK tool for debugging several chipsets

https://github.com/aircrack-ng/rtl8812au/blob/v5.2.20/documents/Screenshot_20190129-025608-01.jpeg

NetworkManager

Newer versions of NetworkManager got some options you might want to disable. Simply add these lines into the NetworkManager.conf

[device]
wifi.scan-rand-mac-address=no

[ifupdown]
managed=false

[connection]
wifi.powersave=2

at the end of file /etc/NetworkManager/NetworkManager.conf and restart NetworkManager with the command:

$ sudo service NetworkManager restart

rtl8812au's People

Contributors

antlarr avatar blurbdust avatar brimstone avatar bwisn avatar cgarces avatar crazar avatar cyberunner23 avatar diederikdehaas avatar dpshaker avatar evilphish avatar fariouche avatar francoism90 avatar georgebannister avatar gorebrau avatar igorpecovnik avatar j-forristal avatar kimocoder avatar masap avatar noraj avatar qwikwit avatar reflexe avatar roboschmied avatar svpcom avatar thijswithaar avatar tpwrules avatar tuomount avatar ulli-kroll avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rtl8812au's Issues

Connection drops in Ubuntu 23.10 for TP Link T4U V2

I've tried installing this for a TP Link Archer T4U V2 but it keeps dropping the connection. When I disable and re-enable in network manager it works fine again for a while, but then lots of drop-outs.
Tried various kernels but didn't make any difference - same problem in default 23.10 kernel 6.5.0 and latest 6.6.1.
Also tried the changes recommended in README.md for NetworkManager.conf but same problems

Any ideas how I might resolve this?

Segfault when installing on Raspberry Pi

I get this when I try to install on my Raspberry Pi 3B. Running today's image of Raspbian, completely stock.

I had to install some kernel headers to get it this far. Not sure where to go from here.

pi@gcs:~/rtl8812au $ sudo ./dkms-install.sh 
About to run dkms install steps...

Creating symlink /var/lib/dkms/rtl8812au/5.2.20.2/source ->
                 /usr/src/rtl8812au-5.2.20.2

DKMS: add completed.

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...
'make' -j4 KVER=4.19.75-v7+ KSRC=/lib/modules/4.19.75-v7+/build.......................(bad exit status: 2)
Error! Bad return status for module build on kernel: 4.19.75-v7+ (armv7l)
Consult /var/lib/dkms/rtl8812au/5.2.20.2/build/make.log for more information.

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area.....
'make' -j4 KVER=4.19.75-v7+ KSRC=/lib/modules/4.19.75-v7+/build..........(bad exit status: 2)
Error! Bad return status for module build on kernel: 4.19.75-v7+ (armv7l)
Consult /var/lib/dkms/rtl8812au/5.2.20.2/build/make.log for more information.
Finished running dkms install steps.
Disabled IPv6 Successfuly 
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
pi@gcs:~/rtl8812au $ cat /var/lib/dkms/rtl8812au/5.2.20.2/build/make.log
DKMS make.log for rtl8812au-5.2.20.2 for kernel 4.19.75-v7+ (armv7l)
Sat 23 Nov 02:33:34 GMT 2019
make ARCH=arm CROSS_COMPILE= -C /lib/modules/4.19.75-v7+/build M=/var/lib/dkms/rtl8812au/5.2.20.2/build O="" modules
make[1]: Entering directory '/usr/src/linux-headers-4.19.75-v7+'
  CC [M]  /var/lib/dkms/rtl8812au/5.2.20.2/build/core/rtw_cmd.o
  CC [M]  /var/lib/dkms/rtl8812au/5.2.20.2/build/core/rtw_security.o
  CC [M]  /var/lib/dkms/rtl8812au/5.2.20.2/build/core/rtw_debug.o
  CC [M]  /var/lib/dkms/rtl8812au/5.2.20.2/build/core/rtw_io.o
  CC [M]  /var/lib/dkms/rtl8812au/5.2.20.2/build/core/rtw_ioctl_query.o
  CC [M]  /var/lib/dkms/rtl8812au/5.2.20.2/build/core/rtw_ioctl_set.o
  CC [M]  /var/lib/dkms/rtl8812au/5.2.20.2/build/core/rtw_ieee80211.o
  CC [M]  /var/lib/dkms/rtl8812au/5.2.20.2/build/core/rtw_mlme.o
  CC [M]  /var/lib/dkms/rtl8812au/5.2.20.2/build/core/rtw_mlme_ext.o
  CC [M]  /var/lib/dkms/rtl8812au/5.2.20.2/build/core/rtw_mi.o
In file included from ./include/linux/filter.h:24,
                 from ./include/net/sock.h:64,
                 from ./include/linux/tcp.h:23,
                 from ./include/linux/ipv6.h:87,
                 from ./include/net/if_inet6.h:19,
                 from ./include/net/addrconf.h:53,
                 from /var/lib/dkms/rtl8812au/5.2.20.2/build/include/osdep_service_linux.h:48,
                 from /var/lib/dkms/rtl8812au/5.2.20.2/build/include/osdep_service.h:51,
                 from /var/lib/dkms/rtl8812au/5.2.20.2/build/include/drv_types.h:27,
                 from /var/lib/dkms/rtl8812au/5.2.20.2/build/core/rtw_mlme_ext.c:17:
./include/net/sch_generic.h:127:1: internal compiler error: Segmentation fault
 static inline bool qdisc_run_begin(struct Qdisc *qdisc)
 ^~~~~~
0x76af411f ???
	../sysdeps/unix/sysv/linux/arm/sigrestorer.S:64
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <file:///usr/share/doc/gcc-8/README.Bugs> for instructions.
make[2]: *** [scripts/Makefile.build:303: /var/lib/dkms/rtl8812au/5.2.20.2/build/core/rtw_mlme_ext.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [Makefile:1519: _module_/var/lib/dkms/rtl8812au/5.2.20.2/build] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.19.75-v7+'
make: *** [Makefile:1593: modules] Error 2

Driver Fails to be installed on nv_nano

Hello Vasily,

Thanks for the repo firstly,

I am struggling to make the driver work on jetson nano.I modiefed the Makefile as:

CONFIG_PLATFORM_I386_PC = n . . . CONFIG_PLATFORM_ARM_NV_NANO = y
and installed it by sudo make install.

when I plug the AC56 and dmesg, i see that the driver is already registered seen below:
6.314813] iwlwifi 0000:01:00.0: Falling back to user helper [ 6.328989] usbcore: registered new interface driver rtl8812au [ 6.399248] 8812au: loading out-of-tree module taints kernel. [ 6.467905] RTL871X: module init start [ 6.467910] RTL871X: rtl8812au v4.3.8_12175.20140902 [ 6.467913] RTL871X: build time: Jun 20 2021 16:20:41 [ 6.467931] Error: Driver 'rtl8812au' is already registered, aborting... [ 6.474810] RTL871X: module init ret=-16 [ 6.806752] usbcore: registered new interface driver rtl88XXau [ 6.819857] iwlwifi 0000:01:00.0: Direct firmware load for iwlwifi-8265-24.uc

On jetson, there are two kernels:
4.15.0-144-generic 4.9.201-tegra

My problem is when I run sudo iw dev wlan0 set type monitor I get command failed: Operation not supported (-95)
I am not sure how the driver mechanism works but, couldnt find out the cause. Can you help on this issue?

Best,

Giray

install error

Is it because the kernel version is too low?

DKMS make.log for rtl8812au-5.2.20.2 for kernel 4.19.232 (aarch64)
Tue Mar 19 10:02:35 CST 2024
make ARCH=arm64 CROSS_COMPILE= -C /lib/modules/4.19.232/build M=/var/lib/dkms/rtl8812au/5.2.20.2/build O="" modules
make[1]: Entering directory '/usr/src/linux-headers-4.19.232'
  CC [M]  /var/lib/dkms/rtl8812au/5.2.20.2/build/core/rtw_cmd.o
  CC [M]  /var/lib/dkms/rtl8812au/5.2.20.2/build/core/rtw_security.o
  CC [M]  /var/lib/dkms/rtl8812au/5.2.20.2/build/core/rtw_debug.o
  CC [M]  /var/lib/dkms/rtl8812au/5.2.20.2/build/core/rtw_io.o
/bin/sh: 1: scripts/basic/fixdep: Exec format error
make[2]: *** [scripts/Makefile.build:333: /var/lib/dkms/rtl8812au/5.2.20.2/build/core/rtw_io.o] Error 126
make[2]: *** Deleting file '/var/lib/dkms/rtl8812au/5.2.20.2/build/core/rtw_io.o'
make[2]: *** Waiting for unfinished jobs....
/bin/sh: 1: scripts/basic/fixdep: Exec format error
make[2]: *** [scripts/Makefile.build:333: /var/lib/dkms/rtl8812au/5.2.20.2/build/core/rtw_cmd.o] Error 126
make[2]: *** Deleting file '/var/lib/dkms/rtl8812au/5.2.20.2/build/core/rtw_cmd.o'
/bin/sh: 1: scripts/basic/fixdep: Exec format error
make[2]: *** [scripts/Makefile.build:333: /var/lib/dkms/rtl8812au/5.2.20.2/build/core/rtw_security.o] Error 126
make[2]: *** Deleting file '/var/lib/dkms/rtl8812au/5.2.20.2/build/core/rtw_security.o'
/bin/sh: 1: scripts/basic/fixdep: Exec format error
make[2]: *** [scripts/Makefile.build:333: /var/lib/dkms/rtl8812au/5.2.20.2/build/core/rtw_debug.o] Error 126
make[2]: *** Deleting file '/var/lib/dkms/rtl8812au/5.2.20.2/build/core/rtw_debug.o'
make[1]: *** [Makefile:1676: _module_/var/lib/dkms/rtl8812au/5.2.20.2/build] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.19.232'
make: *** [Makefile:1603: modules] Error 2

Driver fails to build for 5.10.X kernel

Driver fails to build using 5.10.11 kernel. Worked fine with 5.4.79 version.

pi@raspberrypi:~/rtl8812au $ make
make ARCH=arm CROSS_COMPILE= -C /lib/modules/5.10.11-v7l+/build M=/home/pi/rtl8812au O="" modules
make[1]: Entering directory '/home/pi/kern/linux'
CC [M] /home/pi/rtl8812au/core/rtw_cmd.o
In file included from /home/pi/rtl8812au/include/drv_types.h:78,
from /home/pi/rtl8812au/core/rtw_cmd.c:17:
/home/pi/rtl8812au/include/rtw_security.h:246:8: error: redefinition of ‘struct sha256_state’
struct sha256_state {
^~~~~~~~~~~~
In file included from ./include/linux/filter.h:24,
from ./include/net/sock.h:59,
from ./include/linux/tcp.h:19,
from ./include/linux/ipv6.h:88,
from ./include/net/addrconf.h:50,
from /home/pi/rtl8812au/include/osdep_service_linux.h:48,
from /home/pi/rtl8812au/include/osdep_service.h:51,
from /home/pi/rtl8812au/include/drv_types.h:27,
from /home/pi/rtl8812au/core/rtw_cmd.c:17:
./include/crypto/sha.h:84:8: note: originally defined here
struct sha256_state {
^~~~~~~~~~~~
make[2]: *** [scripts/Makefile.build:279: /home/pi/rtl8812au/core/rtw_cmd.o] Error 1
make[1]: *** [Makefile:1808: /home/pi/rtl8812au] Error 2
make[1]: Leaving directory '/home/pi/kern/linux'
make: *** [Makefile:1593: modules] Error 2
pi@raspberrypi:~/rtl8812au $ uname -a
Linux raspberrypi 5.10.11-v7l+ #1 SMP Wed Feb 3 09:30:08 GMT 2021 armv7l GNU/Linux

add new device driver

because of chip 8812au have not power amplifier, so i decide to use chip 8812cu replace it, but i don't konw where should be modify, or what configuration add according to the device driver

Question: Which file are the driver settings read from

Hello,
I cannot figure it out myself, which file does this driver read its extra options(like rtw_tx_pwr_idx_override) from ?

E.g. how should you name the file under /etc/modprobe.d/ .

Also, any way to just log the value to make sure in the driver ?

I am experimenting around here:
OpenHD@cdbe62f

channels are hoping one to another

hello,

My setup is rpi3b and also observed the behaviour on rpi4. I used the svpcom-rtl8812au repo and installed it.

I set the wlan channel to 100 and when I give the command iwlist wlan1 channel i get it as expected

Current Frequency:5.5 GHz (Channel 100)

after I start the tx_Standalone.sh

iw wlan1 info shows that the channel changes constantly as below

pi@raspberrypi:~/wifibroadcast $ iw wlan1 info
Interface wlan1
	ifindex 4
	wdev 0x100000001
	addr 3c:7c:3f:b1:53:1e
	type monitor
	wiphy 1
	txpower 0.00 dBm
pi@raspberrypi:~/wifibroadcast $ iw wlan1 info
Interface wlan1
	ifindex 4
	wdev 0x100000001
	addr 3c:7c:3f:b1:53:1e
	type monitor
	wiphy 1
	channel 3 (2422 MHz), width: 20 MHz, center1: 2422 MHz
	txpower 0.00 dBm
pi@raspberrypi:~/wifibroadcast $ iw wlan1 info
Interface wlan1
	ifindex 4
	wdev 0x100000001
	addr 3c:7c:3f:b1:53:1e
	type monitor
	wiphy 1
	channel 100 (5500 MHz), width: 20 MHz, center1: 5500 MHz
	txpower 0.00 dBm
pi@raspberrypi:~/wifibroadcast $ iw wlan1 info
Interface wlan1
	ifindex 4
	wdev 0x100000001
	addr 3c:7c:3f:b1:53:1e
	type monitor
	wiphy 1
	channel 120 (5600 MHz), width: 20 MHz, center1: 5600 MHz
	txpower 0.00 dBm
pi@raspberrypi:~/wifibroadcast $ iw wlan1 info
Interface wlan1
	ifindex 4
	wdev 0x100000001
	addr 3c:7c:3f:b1:53:1e
	type monitor
	wiphy 1
	channel 140 (5700 MHz), width: 20 MHz, center1: 5700 MHz
	txpower 0.00 dBm
pi@raspberrypi:~/wifibroadcast $ iw wlan1 info
Interface wlan1
	ifindex 4
	wdev 0x100000001
	addr 3c:7c:3f:b1:53:1e
	type monitor
	wiphy 1
	txpower 0.00 dBm
pi@raspberrypi:~/wifibroadcast $ iw wlan1 info
Interface wlan1
	ifindex 4
	wdev 0x100000001
	addr 3c:7c:3f:b1:53:1e
	type monitor
	wiphy 1
	txpower 0.00 dBm
pi@raspberrypi:~/wifibroadcast $ iw wlan1 info
Interface wlan1
	ifindex 4
	wdev 0x100000001
	addr 3c:7c:3f:b1:53:1e
	type monitor
	wiphy 1
	txpower 0.00 dBm
pi@raspberrypi:~/wifibroadcast $ iw wlan1 info
Interface wlan1
	ifindex 4
	wdev 0x100000001
	addr 3c:7c:3f:b1:53:1e
	type monitor
	wiphy 1
	channel 1 (2412 MHz), width: 20 MHz, center1: 2412 MHz
	txpower 0.00 dBm
pi@raspberrypi:~/wifibroadcast $ iw wlan1 info
Interface wlan1
	ifindex 4
	wdev 0x100000001
	addr 3c:7c:3f:b1:53:1e
	type monitor
	wiphy 1
	channel 36 (5180 MHz), width: 20 MHz, center1: 5180 MHz
	txpower 0.00 dBm

is this expected a behaviour?

Thanks

Does not build on kernel 5.15

The bulid fails with the following error

rtl8812au/core/rtw_br_ext.c:20:18: fatal error: netipx/ipx.h: No such file or directory
20 |         #include <net/ipx.h>
   |                  ^~~~~~~~~~~~~~

This is due to the ipx network layer being removed after being deprecated as mentioned here

Modprobe Unknown Symbol in Module

When trying to install on a Raspberry Pi 3B with the latest Raspbian, I'm getting stuck when trying to install the compiled driver.

  1. After running make, I don't get a 8812au.ko file in the directory. I do get a 88XXau.ko. So I just changed the command to: cp 88XXau.ko /lib/modules/uname -r/kernel/drivers/net/wireless . I confirmed that it did copy to the correct place successfully. Running sudo depmod -a completes without error.

  2. Running sudo modprobe 88XXau errors out with:

modprobe: ERROR: could not insert '88XXau': Unknown symbol in module, or unknown parameter (see dmesg)

Contents of dmesg:

[ 3501.728125] 88XXau: Unknown symbol __sanitizer_cov_trace_cmp1 (err -2)
[ 3501.728153] 88XXau: Unknown symbol __sanitizer_cov_trace_cmp2 (err -2)
[ 3501.728650] 88XXau: Unknown symbol __sanitizer_cov_trace_switch (err -2)
[ 3501.728688] 88XXau: Unknown symbol __sanitizer_cov_trace_const_cmp8 (err -2)
[ 3501.728714] 88XXau: Unknown symbol __sanitizer_cov_trace_const_cmp1 (err -2)
[ 3501.728740] 88XXau: Unknown symbol __sanitizer_cov_trace_const_cmp2 (err -2)
[ 3501.728772] 88XXau: Unknown symbol __sanitizer_cov_trace_const_cmp4 (err -2)
[ 3501.729062] 88XXau: Unknown symbol __sanitizer_cov_trace_pc (err -2)
[ 3501.729091] 88XXau: Unknown symbol __sanitizer_cov_trace_cmp8 (err -2)
[ 3501.729118] 88XXau: Unknown symbol __sanitizer_cov_trace_cmp4 (err -2)

Driver failed to build on kernel 5.10.16(rk3588).

make ARCH=arm64 CROSS_COMPILE= -C /lib/modules/5.10.160-rockchip/build M=/var/lib/dkms/rtl8812au/5.2.20.2/build O="" modules
make[1]: Entering directory '/usr/src/linux-headers-5.10.160-rockchip'
CC [M] /var/lib/dkms/rtl8812au/5.2.20.2/build/core/rtw_cmd.o
CC [M] /var/lib/dkms/rtl8812au/5.2.20.2/build/core/rtw_security.o
CC [M] /var/lib/dkms/rtl8812au/5.2.20.2/build/core/rtw_debug.o
CC [M] /var/lib/dkms/rtl8812au/5.2.20.2/build/core/rtw_io.o
CC [M] /var/lib/dkms/rtl8812au/5.2.20.2/build/core/rtw_ioctl_query.o
CC [M] /var/lib/dkms/rtl8812au/5.2.20.2/build/core/rtw_ioctl_set.o
CC [M] /var/lib/dkms/rtl8812au/5.2.20.2/build/core/rtw_ieee80211.o
CC [M] /var/lib/dkms/rtl8812au/5.2.20.2/build/core/rtw_mlme.o
CC [M] /var/lib/dkms/rtl8812au/5.2.20.2/build/core/rtw_mlme_ext.o
CC [M] /var/lib/dkms/rtl8812au/5.2.20.2/build/core/rtw_mi.o
CC [M] /var/lib/dkms/rtl8812au/5.2.20.2/build/core/rtw_wlan_util.o
CC [M] /var/lib/dkms/rtl8812au/5.2.20.2/build/core/rtw_vht.o
CC [M] /var/lib/dkms/rtl8812au/5.2.20.2/build/core/rtw_pwrctrl.o
CC [M] /var/lib/dkms/rtl8812au/5.2.20.2/build/core/rtw_rf.o
CC [M] /var/lib/dkms/rtl8812au/5.2.20.2/build/core/rtw_recv.o
CC [M] /var/lib/dkms/rtl8812au/5.2.20.2/build/core/rtw_sta_mgt.o
CC [M] /var/lib/dkms/rtl8812au/5.2.20.2/build/core/rtw_ap.o
CC [M] /var/lib/dkms/rtl8812au/5.2.20.2/build/core/rtw_xmit.o
CC [M] /var/lib/dkms/rtl8812au/5.2.20.2/build/core/rtw_p2p.o
CC [M] /var/lib/dkms/rtl8812au/5.2.20.2/build/core/rtw_rson.o
CC [M] /var/lib/dkms/rtl8812au/5.2.20.2/build/core/rtw_tdls.o
CC [M] /var/lib/dkms/rtl8812au/5.2.20.2/build/core/rtw_br_ext.o
CC [M] /var/lib/dkms/rtl8812au/5.2.20.2/build/core/rtw_iol.o
CC [M] /var/lib/dkms/rtl8812au/5.2.20.2/build/core/rtw_sreset.o
CC [M] /var/lib/dkms/rtl8812au/5.2.20.2/build/core/rtw_btcoex_wifionly.o
CC [M] /var/lib/dkms/rtl8812au/5.2.20.2/build/core/rtw_btcoex.o
CC [M] /var/lib/dkms/rtl8812au/5.2.20.2/build/core/rtw_beamforming.o
CC [M] /var/lib/dkms/rtl8812au/5.2.20.2/build/core/rtw_odm.o
CC [M] /var/lib/dkms/rtl8812au/5.2.20.2/build/core/efuse/rtw_efuse.o
CC [M] /var/lib/dkms/rtl8812au/5.2.20.2/build/os_dep/osdep_service.o
CC [M] /var/lib/dkms/rtl8812au/5.2.20.2/build/os_dep/linux/os_intfs.o
CC [M] /var/lib/dkms/rtl8812au/5.2.20.2/build/os_dep/linux/usb_intf.o
CC [M] /var/lib/dkms/rtl8812au/5.2.20.2/build/os_dep/linux/usb_ops_linux.o
CC [M] /var/lib/dkms/rtl8812au/5.2.20.2/build/os_dep/linux/ioctl_linux.o
/var/lib/dkms/rtl8812au/5.2.20.2/build/core/efuse/rtw_efuse.c: In function 'rtw_efuse_analyze':
/var/lib/dkms/rtl8812au/5.2.20.2/build/core/efuse/rtw_efuse.c:714:17: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
error, forbidden warning:rtw_efuse.c:714
714 | if (i % 16 == 0)
| ^~
In file included from /var/lib/dkms/rtl8812au/5.2.20.2/build/include/drv_types.h:60,
from /var/lib/dkms/rtl8812au/5.2.20.2/build/core/efuse/rtw_efuse.c:17:
/var/lib/dkms/rtl8812au/5.2.20.2/build/include/rtw_debug.h:292:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
292 | do {
| ^~
/var/lib/dkms/rtl8812au/5.2.20.2/build/core/efuse/rtw_efuse.c:716:25: note: in expansion of macro '_RTW_PRINT_SEL'
716 | _RTW_PRINT_SEL(RTW_DBGDUMP, "%02X%s"
| ^~~~~~~~~~~~~~
make[2]: *** [scripts/Makefile.build:273: /var/lib/dkms/rtl8812au/5.2.20.2/build/core/efuse/rtw_efuse.o] Error 1
make[2]: *** Deleting file '/var/lib/dkms/rtl8812au/5.2.20.2/build/core/efuse/rtw_efuse.o'
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [Makefile:1935: /var/lib/dkms/rtl8812au/5.2.20.2/build] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.10.160-rockchip'
make: *** [Makefile:1593: modules] Error 2

Build error in kernel 4.19 when cross compile

Compiler: arm-linux-gnueabihf-gcc (GNU Toolchain for the A-profile Architecture 8.3-2019.03 (arm-rel-8.36)) 8.3.0
Target Kerne Versionl: Linux/arm 4.19.111

=============ERROR INFO==============
drivers/net/wireless/realtek/rtl8812au/hal/phydm/halrf/rtl8812a/halrf_8812a_ce.c: In function '_iqk_tx_8812a':
drivers/net/wireless/realtek/rtl8812au/hal/phydm/halrf/rtl8812a/halrf_8812a_ce.c:859:52: warning: array subscript is above array bounds [-Warray-bounds]
error, forbidden warning:halrf_8812a_ce.c:859
dx = (TX_IQC_temp[i][0] >> 21) - (TX_IQC_temp[ii][0] >> 21);
~~~~~~~~~~~^~~~
drivers/net/wireless/realtek/rtl8812au/hal/phydm/halrf/rtl8812a/halrf_8812a_ce.c:861:53: warning: array subscript is above array bounds [-Warray-bounds]
error, forbidden warning:halrf_8812a_ce.c:861
dy = (TX_IQC_temp[i][1] >> 21) - (TX_IQC_temp[ii][1] >> 21);
~~~~~~~~~~~^~~~
drivers/net/wireless/realtek/rtl8812au/hal/phydm/halrf/rtl8812a/halrf_8812a_ce.c:875:52: warning: array subscript is above array bounds [-Warray-bounds]
error, forbidden warning:halrf_8812a_ce.c:875
dx = (TX_IQC_temp[i][2] >> 21) - (TX_IQC_temp[ii][2] >> 21);
~~~~~~~~~~~^~~~
drivers/net/wireless/realtek/rtl8812au/hal/phydm/halrf/rtl8812a/halrf_8812a_ce.c:877:53: warning: array subscript is above array bounds [-Warray-bounds]
error, forbidden warning:halrf_8812a_ce.c:877
dy = (TX_IQC_temp[i][3] >> 21) - (TX_IQC_temp[ii][3] >> 21);
~~~~~~~~~~~^~~~
drivers/net/wireless/realtek/rtl8812au/hal/phydm/halrf/rtl8812a/halrf_8812a_ce.c:1082:52: warning: array subscript is above array bounds [-Warray-bounds]
error, forbidden warning:halrf_8812a_ce.c:1082
dx = (RX_IQC_temp[i][0] >> 21) - (RX_IQC_temp[ii][0] >> 21);
~~~~~~~~~~~^~~~
drivers/net/wireless/realtek/rtl8812au/hal/phydm/halrf/rtl8812a/halrf_8812a_ce.c:1084:53: warning: array subscript is above array bounds [-Warray-bounds]
error, forbidden warning:halrf_8812a_ce.c:1084
dy = (RX_IQC_temp[i][1] >> 21) - (RX_IQC_temp[ii][1] >> 21);
~~~~~~~~~~~^~~~
drivers/net/wireless/realtek/rtl8812au/hal/phydm/halrf/rtl8812a/halrf_8812a_ce.c:1098:52: warning: array subscript is above array bounds [-Warray-bounds]
error, forbidden warning:halrf_8812a_ce.c:1098
dx = (RX_IQC_temp[i][2] >> 21) - (RX_IQC_temp[ii][2] >> 21);
~~~~~~~~~~~^~~~
drivers/net/wireless/realtek/rtl8812au/hal/phydm/halrf/rtl8812a/halrf_8812a_ce.c:1100:53: warning: array subscript is above array bounds [-Warray-bounds]
error, forbidden warning:halrf_8812a_ce.c:1100
dy = (RX_IQC_temp[i][3] >> 21) - (RX_IQC_temp[ii][3] >> 21);
~~~~~~~~~~~^~~~
CC [M] drivers/net/wireless/realtek/rtl8812au/hal/phydm/txbf/haltxbfjaguar.o
drivers/net/wireless/realtek/rtl8812au/hal/phydm/halrf/rtl8812a/halrf_8812a_ce.c: At top level:
cc1: warning: unrecognized command line option '-Wno-cast-function-type'
cc1: warning: unrecognized command line option '-Wno-stringop-overread'
cc1: warning: unrecognized command line option '-Wno-cast-function-type'
cc1: warning: unrecognized command line option '-Wno-implicit-fallthrough'
make[6]: *** [scripts/Makefile.build:333: drivers/net/wireless/realtek/rtl8812au/hal/phydm/halrf/rtl8812a/halrf_8812a_ce.o] Error 1
===================ERROR INFO========================

Build error in get_overridden_tx_power_index

/var/lib/dkms/rtl8812au/5.2.20.2/build/os_dep/linux/ioctl_cfg80211.c:3736:9: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
error, forbidden warning:ioctl_cfg80211.c:3736
 3736 |         u8 override = get_overridden_tx_power_index(0);
      |         ^~
make[2]: *** [scripts/Makefile.build:273: /var/lib/dkms/rtl8812au/5.2.20.2/build/os_dep/linux/ioctl_cfg80211.o] Error 1```

8812au monitor mode doesn't work well

root@raspberrypi:/home/pi# uname -a
Linux raspberrypi 5.10.17-v7l+ #1403 SMP Mon Feb 22 11:33:35 GMT 2021 armv7l GNU/Linux

root@raspberrypi:/home/pi# cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

root@raspberrypi:/home/pi# iw wlan1 info
Interface wlan1
ifindex 4
wdev 0x100000001
addr 08:10:7b:ba:a2:19
type monitor
wiphy 1
txpower 20.00 dBm

Can not change the channel even after installing the patch driver.
In this case, losing packets is always happening in WFB.

monitor mode?

After driver installation, do I need to set the wifi into monitor mode? Or if the wifi is working then everything is done?

Does not build on kernel 5.16

The build fails on kernel 5.16

Command: https://github.com/svpcom/rtl8812au/issues/new
Logs:

make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.16.15-76051615-generic/build M=/build/rtl8812au O="" modules
make[1]: Entering directory '/usr/src/linux-headers-5.16.15-76051615-generic'
  CC [M]  /build/rtl8812au/core/rtw_cmd.o
  CC [M]  /build/rtl8812au/core/rtw_security.o
  CC [M]  /build/rtl8812au/core/rtw_debug.o
  CC [M]  /build/rtl8812au/core/rtw_io.o
  CC [M]  /build/rtl8812au/core/rtw_ioctl_query.o
  CC [M]  /build/rtl8812au/core/rtw_ioctl_set.o
  CC [M]  /build/rtl8812au/core/rtw_ieee80211.o
  CC [M]  /build/rtl8812au/core/rtw_mlme.o
  CC [M]  /build/rtl8812au/core/rtw_mlme_ext.o
  CC [M]  /build/rtl8812au/core/rtw_mi.o
  CC [M]  /build/rtl8812au/core/rtw_wlan_util.o
  CC [M]  /build/rtl8812au/core/rtw_vht.o
  CC [M]  /build/rtl8812au/core/rtw_pwrctrl.o
  CC [M]  /build/rtl8812au/core/rtw_rf.o
  CC [M]  /build/rtl8812au/core/rtw_recv.o
  CC [M]  /build/rtl8812au/core/rtw_sta_mgt.o
/build/rtl8812au/core/rtw_mlme_ext.c: In function ‘mgt_dispatcher’:
/build/rtl8812au/core/rtw_mlme_ext.c:1640:20: warning: this statement may fall through [-Wimplicit-fallthrough=]
 1640 |                 if (MLME_IS_AP(padapter))
      |                    ^
/build/rtl8812au/core/rtw_mlme_ext.c:1645:9: note: here
 1645 |         case WIFI_ASSOCREQ:
      |         ^~~~
  CC [M]  /build/rtl8812au/core/rtw_ap.o
  CC [M]  /build/rtl8812au/core/rtw_xmit.o
  CC [M]  /build/rtl8812au/core/rtw_p2p.o
  CC [M]  /build/rtl8812au/core/rtw_rson.o
  CC [M]  /build/rtl8812au/core/rtw_tdls.o
  CC [M]  /build/rtl8812au/core/rtw_br_ext.o
  CC [M]  /build/rtl8812au/core/rtw_iol.o
  CC [M]  /build/rtl8812au/core/rtw_sreset.o
  CC [M]  /build/rtl8812au/core/rtw_btcoex_wifionly.o
  CC [M]  /build/rtl8812au/core/rtw_btcoex.o
  CC [M]  /build/rtl8812au/core/rtw_beamforming.o
  CC [M]  /build/rtl8812au/core/rtw_odm.o
  CC [M]  /build/rtl8812au/core/efuse/rtw_efuse.o
  CC [M]  /build/rtl8812au/os_dep/osdep_service.o
  CC [M]  /build/rtl8812au/os_dep/linux/os_intfs.o
  CC [M]  /build/rtl8812au/os_dep/linux/usb_intf.o
  CC [M]  /build/rtl8812au/os_dep/linux/usb_ops_linux.o
  CC [M]  /build/rtl8812au/os_dep/linux/ioctl_linux.o
/build/rtl8812au/core/efuse/rtw_efuse.c: In function ‘rtw_efuse_analyze’:
/build/rtl8812au/core/efuse/rtw_efuse.c:714:17: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
  714 |                 if (i % 16 == 0)
      |                 ^~
In file included from /build/rtl8812au/include/drv_types.h:60,
                 from /build/rtl8812au/core/efuse/rtw_efuse.c:17:
/build/rtl8812au/include/rtw_debug.h:292:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
  292 |         do {\
      |         ^~
/build/rtl8812au/core/efuse/rtw_efuse.c:716:25: note: in expansion of macro ‘_RTW_PRINT_SEL’
  716 |                         _RTW_PRINT_SEL(RTW_DBGDUMP, "%02X%s"
      |                         ^~~~~~~~~~~~~~
  CC [M]  /build/rtl8812au/os_dep/linux/xmit_linux.o
  CC [M]  /build/rtl8812au/os_dep/linux/mlme_linux.o
  CC [M]  /build/rtl8812au/os_dep/linux/recv_linux.o
  CC [M]  /build/rtl8812au/os_dep/linux/ioctl_cfg80211.o
  CC [M]  /build/rtl8812au/os_dep/linux/rtw_cfgvendor.o
  CC [M]  /build/rtl8812au/os_dep/linux/wifi_regd.o
  CC [M]  /build/rtl8812au/os_dep/linux/rtw_android.o
  CC [M]  /build/rtl8812au/os_dep/linux/rtw_radiotap.o
  CC [M]  /build/rtl8812au/os_dep/linux/ioctl_mp.o
/build/rtl8812au/os_dep/linux/recv_linux.c: In function ‘napi_recv’:
/build/rtl8812au/os_dep/linux/recv_linux.c:355:76: error: ‘GRO_DROP’ undeclared (first use in this function)
  355 |                         if (rtw_napi_gro_receive(&padapter->napi, pskb) != GRO_DROP)
      |                                                                            ^~~~~~~~
/build/rtl8812au/os_dep/linux/recv_linux.c:355:76: note: each undeclared identifier is reported only once for each function it appears in
make[2]: *** [scripts/Makefile.build:287: /build/rtl8812au/os_dep/linux/recv_linux.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/build/rtl8812au/os_dep/linux/ioctl_cfg80211.c: In function ‘rtw_get_systime_us’:
/build/rtl8812au/os_dep/linux/ioctl_cfg80211.c:590:25: error: storage size of ‘ts’ isn’t known
  590 |         struct timespec ts;
      |                         ^~
/build/rtl8812au/os_dep/linux/ioctl_cfg80211.c:592:9: error: implicit declaration of function ‘getboottime’; did you mean ‘getboottime64’? [-Werror=implicit-function-declaration]
  592 |         getboottime(&ts);
      |         ^~~~~~~~~~~
      |         getboottime64
/build/rtl8812au/os_dep/linux/ioctl_cfg80211.c:602:1: error: control reaches end of non-void function [-Werror=return-type]
  602 | }
      | ^
/build/rtl8812au/os_dep/linux/ioctl_cfg80211.c: In function ‘cfg80211_rtw_change_iface’:
/build/rtl8812au/os_dep/linux/ioctl_cfg80211.c:2125:24: warning: this statement may fall through [-Wimplicit-fallthrough=]
 2125 |                 is_p2p = _TRUE;
/build/rtl8812au/os_dep/linux/ioctl_cfg80211.c:2128:9: note: here
 2128 |         case NL80211_IFTYPE_STATION:
      |         ^~~~
/build/rtl8812au/os_dep/linux/ioctl_cfg80211.c:2150:24: warning: this statement may fall through [-Wimplicit-fallthrough=]
 2150 |                 is_p2p = _TRUE;
/build/rtl8812au/os_dep/linux/ioctl_cfg80211.c:2153:9: note: here
 2153 |         case NL80211_IFTYPE_AP:
      |         ^~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:287: /build/rtl8812au/os_dep/linux/ioctl_cfg80211.o] Error 1
make[1]: *** [Makefile:1852: /build/rtl8812au] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.16.15-76051615-generic'
make: *** [Makefile:1593: modules] Error 2```

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.