Giter Club home page Giter Club logo

rtl8812bu_for_raspbian's Introduction

Realtek 8812BU Driver for Raspbian

Driver for 802.11ac USB adapter with RTL8812BU chipset, only STA/Monitor mode is supported, no AP mode.

A few known wireless cards that use this driver include:

  • Fastoe AC1200 USB Wi-Fi Adapter
  • Cudy WU1200 AC1200 High Gain USB Wi-Fi Adapter
  • TP-Link Archer T3U
  • TP-Link Archer T3U Plus
  • TP-Link Archer T4U V3
  • Linksys WUSB6400M
  • Dlink DWA-181
  • Dlink DWA-182

Currently tested with Linux RaspberryPi 5.10.17-v7l+/5.4.51-v7l+/4.19.118-v7+/4.19.97-v7+ on:

  • Raspberry Pi 400
  • Raspberry Pi 4 B
  • Raspberry Pi Zero W
  • Raspberry Pi 3 B+
  • Raspberry Pi 2 B

Manual installation

To build, you have to retrieve source and run make, do following:

For Raspberry Pi OS kernel 5.10.17, please clone the v5.6.1 branch:

sudo apt update
sudo apt install -y bc git dkms build-essential raspberrypi-kernel-headers
git clone -b v5.6.1 https://github.com/fastoe/RTL8812BU_for_Raspbian
cd RTL8812BU_for_Raspbian
make
sudo make install
sudo reboot

For Raspberry Pi OS kernel 5.4 & previous versions:

sudo apt update
sudo apt install -y bc git dkms build-essential raspberrypi-kernel-headers
git clone https://github.com/fastoe/RTL8812BU_for_Raspbian
cd RTL8812BU_for_Raspbian
make
sudo make install
sudo reboot

If fails to compile like /lib/modules/5.x.x-v7+/build: No such file or directory. Stop:

pi@raspberrypi:~/RTL8812BU_for_Raspbian $ make
make ARCH=arm CROSS_COMPILE= -C /lib/modules/5.4.51-v7+/build M=/home/pi/RTL8812BU_for_Raspbian  modules
make[1]: *** /lib/modules/5.4.51-v7+/build: No such file or directory.  Stop.
make: *** [Makefile:2284: modules] Error 2

please run the rpi-source command to install the kernel headers for kernel:

sudo apt install -y bc git flex bison libssl-dev libncurses5-dev
sudo wget https://raw.githubusercontent.com/RPi-Distro/rpi-source/master/rpi-source -O /usr/local/bin/rpi-source && sudo chmod +x /usr/local/bin/rpi-source && /usr/local/bin/rpi-source -q --tag-update
rpi-source

then, re-make again.

Known Issues

Below are a few known bugs,

  • Always required authentication without connect on 5GHz band
  • Short disconnects every few seconds on 5GHz band

the above problems are caused by power saving. First, make sure that the power supply of your Raspberry Pi can provide 3A current, then we can disable the 8812bu WiFi adapter power saving.

modprobe -r 88x2bu
modprobe 88x2bu rtw_power_mgnt=0 rtw_ips_mode=0 rtw_enusbss=0
echo "options 88x2bu rtw_power_mgnt=0 rtw_ips_mode=0 rtw_enusbss=0" | sudo tee /etc/modprobe.d/88x2bu.conf

When the current is around 100mA, it never disconnects.

image

144mA @ full speed download (22MB/s).

image

Enjoy!

rtl8812bu_for_raspbian's People

Contributors

fastoe 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

Watchers

 avatar  avatar  avatar

rtl8812bu_for_raspbian's Issues

error redefinition of ‘struct sha256_state’ struct sha256_state

: note: this is the location of the previous definition
In file included from /home/pi/RTL8812BU_for_Raspbian/include/drv_types.h:79,
from /home/pi/RTL8812BU_for_Raspbian/core/rtw_cmd.c:17:
/home/pi/RTL8812BU_for_Raspbian/include/rtw_security.h:257: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/RTL8812BU_for_Raspbian/include/osdep_service_linux.h:48,
from /home/pi/RTL8812BU_for_Raspbian/include/osdep_service.h:50,
from /home/pi/RTL8812BU_for_Raspbian/include/drv_types.h:27,
from /home/pi/RTL8812BU_for_Raspbian/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/RTL8812BU_for_Raspbian/core/rtw_cmd.o] Error 1
make[1]: *** [Makefile:1808: /home/pi/RTL8812BU_for_Raspbian] Error 2
make[1]: Leaving directory '/home/pi/linux-6af8ae321a801a4e20183454c65eb0d23069d8ac'
make: *** [Makefile:2290: modules] Error 2

Compiling error

Error:
/root/RTL8812BU_for_Raspbian/core/rtw_br_ext.c:20:11: fatal error: net/ipx.h: No such file or directory
20 | #include <net/ipx.h>

Raspberry Pi Zero W

Have you had any luck with this on the Pi Zero W? I was hoping to get 5ghz on it via this driver.

Monitor mode enabled then gets disabled automatically

followed the instructions but get this error when I use sudo airmon-ng start wlan1:

PHY Interface Driver Chipset

phy0 wlan0 brcmfmac Broadcom 43430
phy3 wlan1 rtl88x2bu TP-Link Archer T3U [Realtek RTL8812BU]
(monitor mode enabled)

Error setting channel: command failed: Device or resource busy (-16)
Error -16 likely means your card was set back to station mode by something.
Removing non-monitor wlan1 interface...
(monitor mode disabled)

any ideas?
p.s: I have also tried sudo airmon-ng check kill, but to no avail
p.p.s:
sudo ip link set wlan1 down
sudo iw wlan1 set monitor none
also doesnt work...

Any chance of updating for latest kernel Linux raspberrypi 5.10.23-v7+ ?

I have tried to install this driver on most of mi RPI but since the current kernel is Linux raspberrypi 5.10.23-v7+ it fails.

I havent done a lot of creations of drivers so i do not have the know how. Mainly been doing ASM coding in the past so that will not help a lot here.

Any chance you could update the support for this driver ? Would be much appreciated.

Cannot compile

I followed the guide, updating the kernel headers and running the rpi-source command, but when I go to make, I get this

make ARCH=arm CROSS_COMPILE= -C /lib/modules/6.1.21-v8+/build M=/home/oreemm/RTL8812BU_for_Raspbian modules
make[1]: Entering directory '/home/oreemm/linux-0afb5e98488aed7017b9bf321b575d0177feb7ed'
CC [M] /home/oreemm/RTL8812BU_for_Raspbian/core/rtw_cmd.o
In file included from ./include/asm-generic/int-ll64.h:11,
from ./arch/arm/include/uapi/asm/types.h:5,
from ./include/uapi/linux/types.h:5,
from ./include/linux/types.h:6,
from /home/oreemm/RTL8812BU_for_Raspbian/include/basic_types.h:75,
from /home/oreemm/RTL8812BU_for_Raspbian/include/drv_types.h:26,
from /home/oreemm/RTL8812BU_for_Raspbian/core/rtw_cmd.c:17:
./include/uapi/asm-generic/int-ll64.h:12:10: fatal error: asm/bitsperlong.h: No such file or directory
12 | #include <asm/bitsperlong.h>
| ^~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [scripts/Makefile.build:250: /home/oreemm/RTL8812BU_for_Raspbian/core/rtw_cmd.o] Error 1
make[1]: *** [Makefile:2012: /home/oreemm/RTL8812BU_for_Raspbian] Error 2
make[1]: Leaving directory '/home/oreemm/linux-0afb5e98488aed7017b9bf321b575d0177feb7ed'
make: *** [Makefile:2284: modules] Error 2

make on RPI4B return error

make ARCH=arm CROSS_COMPILE= -C /lib/modules/5.10.17-v7l+/build M=/home/pi/RTL8812BU_for_Raspbian modules
make[1]: Entering directory '/usr/src/linux-headers-5.10.17-v7l+'
CC [M] /home/pi/RTL8812BU_for_Raspbian/core/rtw_cmd.o
In file included from /home/pi/RTL8812BU_for_Raspbian/include/drv_conf.h:17,
from /home/pi/RTL8812BU_for_Raspbian/include/drv_types.h:25,
from /home/pi/RTL8812BU_for_Raspbian/core/rtw_cmd.c:17:
/home/pi/RTL8812BU_for_Raspbian/include/autoconf.h:183: warning: "CONFIG_RTW_SW_LED" redefined
#define CONFIG_RTW_SW_LED

: note: this is the location of the previous definition
In file included from /home/pi/RTL8812BU_for_Raspbian/include/drv_types.h:79,
from /home/pi/RTL8812BU_for_Raspbian/core/rtw_cmd.c:17:
/home/pi/RTL8812BU_for_Raspbian/include/rtw_security.h:257: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/RTL8812BU_for_Raspbian/include/osdep_service_linux.h:48,
from /home/pi/RTL8812BU_for_Raspbian/include/osdep_service.h:5,
from /home/pi/RTL8812BU_for_Raspbian/include/drv_types.h:27,
from /home/pi/RTL8812BU_for_Raspbian/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/RTL8812BU_for_Raspbian/core/rtw_cmd.o] Error 1
make[1]: *** [Makefile:1804: /home/pi/RTL8812BU_for_Raspbian] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.10.17-v7l+'
make: *** [Makefile:2290: modules] Error 2

error: redefinition of ‘struct sha256_state’

$ make
make ARCH=arm CROSS_COMPILE= -C /lib/modules/5.10.63-v7+/build M=/media/pi/Seagate-6TB/Backups/Linux_Drivers/RTL8812BU_for_Raspbian modules
make[1]: Entering directory '/usr/src/linux-headers-5.10.63-v7+'
CC [M] /media/pi/Seagate-6TB/Backups/Linux_Drivers/RTL8812BU_for_Raspbian/core/rtw_cmd.o
In file included from /media/pi/Seagate-6TB/Backups/Linux_Drivers/RTL8812BU_for_Raspbian/include/drv_conf.h:17,
from /media/pi/Seagate-6TB/Backups/Linux_Drivers/RTL8812BU_for_Raspbian/include/drv_types.h:25,
from /media/pi/Seagate-6TB/Backups/Linux_Drivers/RTL8812BU_for_Raspbian/core/rtw_cmd.c:17:
/media/pi/Seagate-6TB/Backups/Linux_Drivers/RTL8812BU_for_Raspbian/include/autoconf.h:183: warning: "CONFIG_RTW_SW_LED" redefined
#define CONFIG_RTW_SW_LED

: note: this is the location of the previous definition
In file included from /media/pi/Seagate-6TB/Backups/Linux_Drivers/RTL8812BU_for_Raspbian/include/drv_types.h:79,
from /media/pi/Seagate-6TB/Backups/Linux_Drivers/RTL8812BU_for_Raspbian/core/rtw_cmd.c:17:
/media/pi/Seagate-6TB/Backups/Linux_Drivers/RTL8812BU_for_Raspbian/include/rtw_security.h:257: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:87,
from ./include/net/addrconf.h:50,
from /media/pi/Seagate-6TB/Backups/Linux_Drivers/RTL8812BU_for_Raspbian/include/osdep_service_linux.h:48,
from /media/pi/Seagate-6TB/Backups/Linux_Drivers/RTL8812BU_for_Raspbian/include/osdep_service.h:50,
from /media/pi/Seagate-6TB/Backups/Linux_Drivers/RTL8812BU_for_Raspbian/include/drv_types.h:27,
from /media/pi/Seagate-6TB/Backups/Linux_Drivers/RTL8812BU_for_Raspbian/core/rtw_cmd.c:17:
./include/crypto/sha.h:84:8: note: originally defined here
struct sha256_state {
^~~~~~~~~~~~
make[2]: *** [scripts/Makefile.build:280: /media/pi/Seagate-6TB/Backups/Linux_Drivers/RTL8812BU_for_Raspbian/core/rtw_cmd.o] Error 1
make[1]: *** [Makefile:1825: /media/pi/Seagate-6TB/Backups/Linux_Drivers/RTL8812BU_for_Raspbian] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.10.63-v7+'
make: *** [Makefile:2290: modules] Error 2

debian cant make

root@OMV:# cd RTL8812BU/
root@OMV:
/RTL8812BU# make
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.16.0-0.bpo.4-amd64/build M=/root/RTL8812BU modules
make[1]: *** /lib/modules/5.16.0-0.bpo.4-amd64/build: No such file or directory. Stop.
make: *** [Makefile:2506: modules] Error 2

kernal:5.16.0-0.bpo.4-amd64

error: ‘struct cfg80211_ops’ has no member named ‘mgmt_frame_register’

error: ‘struct cfg80211_ops’ has no member named ‘mgmt_frame_register’
.mgmt_frame_register = cfg80211_rtw_mgmt_frame_register,
^~~~~~~~~~~~~~~~~~~
/home/pi/RTL8812BU_for_Raspbian/os_dep/linux/ioctl_cfg80211.c:9919:25: error: initialization of ‘int (*)(struct wiphy *, struct wireless_dev , u64)’ {aka ‘int ()(struct wiphy *, struct wireless_dev , long long unsigned int)’} from incompatible pointer type ‘void ()(struct wiphy *, struct wireless_dev , u16, bool)’ {aka ‘void ()(struct wiphy *, struct wireless_dev *, short unsigned int, _Bool)’} [-Werror=incompatible-pointer-types]
.mgmt_frame_register = cfg80211_rtw_mgmt_frame_register,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/pi/RTL8812BU_for_Raspbian/os_dep/linux/ioctl_cfg80211.c:9919:25: note: (near initialization for ‘rtw_cfg80211_ops.mgmt_tx_cancel_wait’)
/home/pi/RTL8812BU_for_Raspbian/os_dep/linux/ioctl_cfg80211.c: In function ‘cfg80211_rtw_change_iface’:
/home/pi/RTL8812BU_for_Raspbian/os_dep/linux/ioctl_cfg80211.c:2399:10: warning: this statement may fall through [-Wimplicit-fallthrough=]
is_p2p = _TRUE;
/home/pi/RTL8812BU_for_Raspbian/os_dep/linux/ioctl_cfg80211.c:2401:2: note: here
case NL80211_IFTYPE_STATION:
^~~~
/home/pi/RTL8812BU_for_Raspbian/os_dep/linux/ioctl_cfg80211.c:2423:10: warning: this statement may fall through [-Wimplicit-fallthrough=]
is_p2p = _TRUE;
/home/pi/RTL8812BU_for_Raspbian/os_dep/linux/ioctl_cfg80211.c:2425:2: note: here
case NL80211_IFTYPE_AP:
^~~~
cc1: some warnings being treated as errors

Why are you deleting issues 😡. Problem still remains???

I opened an issue yesterday. There were about five issues opened. Other users in the past month reported the same issue. I logged in today to see if there were any updates. You delete all the issues. Why 😡? The problem still remains.
I sent a message on Amazon with the full details. The response I received was:

Hi, clone the v5.6.1 branch and make:

sudo apt update
sudo apt install -y bc git dkms build-essential raspberrypi-kernel-headers
git clone -b v5.6.1 https://github.com/fastoe/RTL8812BU_for_Raspbian
cd RTL8812BU_for_Raspbian
make
sudo make install
sudo reboot

That's what I had done PREVIOUSLY per your README.md file just like another user wrote in their issue. The problem still remains!

If you flash Raspberry PI lite and you DO NOT follow your instructions and DO NOT do an apt update it works. But when you do an apt upgrade Raspberry Pi has a new kernel in their repository. It installs version 5.10.11-v71+ which makes the dongle inoperable.

If you try to install the software OR you try a fresh install following your instructions you receive this error when you run make.

make[2]: *** [scripts/Makefile.build:279: /home/pi/RTL8812BU_for_Raspbian-master/core/rtw_cmd.o] Error 1 make[1]: *** [Makefile:1808: /home/pi/RTL8812BU_for_Raspbian-master] Error 2 make[1]: Leaving directory '/usr/src/linux-headers-5.10.11-v7l+' make: *** [Makefile:2290: modules] Error 2

Not working on my Raspberry Pi 4 after RPI-UPDATE

Distributor ID: Raspbian
Description: Raspbian GNU/Linux 10 (buster)
Release: 10
Codename: buster

Linux raspberrypi 5.10.17-v7l+ #1421 SMP Thu May 27 14:00:13 BST 2021 armv7l GNU/Linux

Following all the instructions ends in error 1 & 2.

`make[1]: Entering directory '/usr/src/linux-headers-5.10.17-v7l+'
CC [M] /root/RTL8812BU_for_Raspbian/core/rtw_cmd.o
In file included from /root/RTL8812BU_for_Raspbian/include/drv_conf.h:17,
from /root/RTL8812BU_for_Raspbian/include/drv_types.h:25,
from /root/RTL8812BU_for_Raspbian/core/rtw_cmd.c:17:
/root/RTL8812BU_for_Raspbian/include/autoconf.h:183: warning: "CONFIG_RTW_SW_LED" redefined
#define CONFIG_RTW_SW_LED

: note: this is the location of the previous definition
In file included from /root/RTL8812BU_for_Raspbian/include/drv_types.h:79,
from /root/RTL8812BU_for_Raspbian/core/rtw_cmd.c:17:
/root/RTL8812BU_for_Raspbian/include/rtw_security.h:257: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 /root/RTL8812BU_for_Raspbian/include/osdep_service_linux.h:48,
from /root/RTL8812BU_for_Raspbian/include/osdep_service.h:50,
from /root/RTL8812BU_for_Raspbian/include/drv_types.h:27,
from /root/RTL8812BU_for_Raspbian/core/rtw_cmd.c:17:
./include/crypto/sha.h:84:8: note: originally defined here
struct sha256_state {
^~~~~~~~~~~~
make[2]: *** [scripts/Makefile.build:279: /root/RTL8812BU_for_Raspbian/core/rtw_cmd.o] Error 1
make[1]: *** [Makefile:1804: /root/RTL8812BU_for_Raspbian] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.10.17-v7l+'
make: *** [Makefile:2290: modules] Error 2
root@raspberrypi:/RTL8812BU_for_Raspbian#
root@raspberrypi:
/RTL8812BU_for_Raspbian# sudo make install
install -p -m 644 88x2bu.ko /lib/modules/5.10.17-v7l+/kernel/drivers/net/wireless/
install: cannot stat '88x2bu.ko': No such file or directory
`

No such file or directory

Followed the simple instructions on the Linux install guide. Doesn't work.
Found the simple instructions in these three issues. Doesn't work.
I purchased this adapter for simple installation on my Pi. Please help.

pi@raspberrypi:~/RTL8812BU_for_Raspbian $ make make ARCH=arm CROSS_COMPILE= -C /lib/modules/5.10.11-v7+/build M=/home/pi/RTL8812BU_for_Raspbian modules make[1]: *** /lib/modules/5.10.11-v7+/build: No such file or directory. Stop. make: *** [Makefile:2284: modules] Error 2

ubuntu raspi 5.15.0-1026-raspi not compile

I get this on 22.04 LTS Ubuntu for raspi

make
make ARCH=arm CROSS_COMPILE= -C /lib/modules/5.15.0-1026-raspi/build M=/home/silentm/LayeredSolutions/wifi/RTL8812BU_for_Raspbian-master modules
make[1]: Entering directory '/usr/src/linux-headers-5.15.0-1026-raspi'
CC [M] /home/silentm/LayeredSolutions/wifi/RTL8812BU_for_Raspbian-master/core/rtw_cmd.o
gcc: error: unrecognized argument in option ‘-mabi=apcs-gnu’
gcc: note: valid arguments to ‘-mabi=’ are: ilp32 lp64
gcc: error: unrecognized command-line option ‘-mapcs’
gcc: error: unrecognized command-line option ‘-mno-sched-prolog’
gcc: error: unrecognized command-line option ‘-msoft-float’
make[2]: *** [scripts/Makefile.build:297: /home/silentm/LayeredSolutions/wifi/RTL8812BU_for_Raspbian-master/core/rtw_cmd.o] Error 1
make[1]: *** [Makefile:1906: /home/silentm/LayeredSolutions/wifi/RTL8812BU_for_Raspbian-master] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.15.0-1026-raspi'
make: *** [Makefile:2290: modules] Error 2

No Idea what to do.

Jerry

Will it work for other arm64 dev board (odroid n2+) ?

Have You tested or been informed if this driver can be built for other dev board with arm64. I have an odroid N2+. In theory as ARM architecture is the same and so is the OS, it should work without any modifications, right?

Not working on my raspberry

My kernel version is 5.4.59-v7+
The error appears when executing "make"

Guille M
hace 23 minutos
Doesnt work for e :(
The error comes when executing make after the first error:

: note: this is the location of the previous definition
LD [M] /home/pi/RTL8812BU_for_Raspbian/88x2bu.o
Building modules, stage 2.
MODPOST 1 modules
ERROR: "__sanitizer_cov_trace_cmp4" [/home/pi/RTL8812BU_for_Raspbian/88x2bu.ko] undefined!
ERROR: "__sanitizer_cov_trace_cmp8" [/home/pi/RTL8812BU_for_Raspbian/88x2bu.ko] undefined!
ERROR: "__sanitizer_cov_trace_pc" [/home/pi/RTL8812BU_for_Raspbian/88x2bu.ko] undefined!
ERROR: "__sanitizer_cov_trace_const_cmp4" [/home/pi/RTL8812BU_for_Raspbian/88x2bu.ko] undefined!
ERROR: "__sanitizer_cov_trace_const_cmp2" [/home/pi/RTL8812BU_for_Raspbian/88x2bu.ko] undefined!
ERROR: "__sanitizer_cov_trace_const_cmp1" [/home/pi/RTL8812BU_for_Raspbian/88x2bu.ko] undefined!
ERROR: "__sanitizer_cov_trace_const_cmp8" [/home/pi/RTL8812BU_for_Raspbian/88x2bu.ko] undefined!
ERROR: "__sanitizer_cov_trace_switch" [/home/pi/RTL8812BU_for_Raspbian/88x2bu.ko] undefined!
ERROR: "__sanitizer_cov_trace_cmp2" [/home/pi/RTL8812BU_for_Raspbian/88x2bu.ko] undefined!
ERROR: "__sanitizer_cov_trace_cmp1" [/home/pi/RTL8812BU_for_Raspbian/88x2bu.ko] undefined!
make[2]: * [scripts/Makefile.modpost:94: __modpost] Error 1
make[1]: * [Makefile:1622: modules] Error 2
make[1]: se sale del directorio '/home/pi/linux-f88b9bc93293b061ee68690edaa6d0f934a89dac'
make: * [Makefile:2290: modules] Error 2

Getting errors trying to install RTL8812BU_ for raspberry pi

Hey this is my Kernel version 5.4.0-1050-raspi.
after the "make" command, I get these errors I went to rpi-source as the second option.
Any suggestions would be very appreciated, thanks in advance.
De4ngelo.

ubuntu@ubuntu:/RTL8812BU_for_Raspbian$ make
make ARCH=arm CROSS_COMPILE= -C /lib/modules/5.4.0-1050-raspi/build M=/home/ubuntu/RTL8812BU_for_Raspbian modules
make[1]: Entering directory '/usr/src/linux-headers-5.4.0-1050-raspi'
CC [M] /home/ubuntu/RTL8812BU_for_Raspbian/core/rtw_cmd.o
gcc: error: unrecognized argument in option ‘-mabi=apcs-gnu’
gcc: note: valid arguments to ‘-mabi=’ are: ilp32 lp64
gcc: error: unrecognized command line option ‘-mapcs’
gcc: error: unrecognized command line option ‘-mno-sched-prolog’
gcc: error: unrecognized command line option ‘-msoft-float’
make[2]: *** [scripts/Makefile.build:270: /home/ubuntu/RTL8812BU_for_Raspbian/core/rtw_cmd.o] Error 1
make[1]: *** [Makefile:1765: /home/ubuntu/RTL8812BU_for_Raspbian] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.4.0-1050-raspi'
make: *** [Makefile:2290: modules] Error 2
ubuntu@ubuntu:
/RTL8812BU_for_Raspbian$ sudo make install
install -p -m 644 88x2bu.ko /lib/modules/5.4.0-1050-raspi/kernel/drivers/net/wireless/
install: cannot stat '88x2bu.ko': No such file or directory
make: *** [Makefile:2296: install] Error 1
ubuntu@ubuntu:/RTL8812BU_for_Raspbian$ sudo apt install -y bc git flex bison libssl-dev libncurses5-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
bc is already the newest version (1.07.1-2build1).
bison is already the newest version (2:3.5.1+dfsg-1).
flex is already the newest version (2.6.4-6.2).
libncurses5-dev is already the newest version (6.2-0ubuntu2).
git is already the newest version (1:2.25.1-1ubuntu3.2).
libssl-dev is already the newest version (1.1.1f-1ubuntu2.12).
The following packages were automatically installed and are no longer required:
fonts-font-awesome fonts-open-sans hamradio-files python3-distro-info wsjtx-doc
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 81 not upgraded.
ubuntu@ubuntu:
/RTL8812BU_for_Raspbian$ sudo wget https://raw.githubusercontent.com/RPi-Distro/rpi-source/master/rpi-source -O /usr/local/bin/rpi-source && sudo chmod +x /usr/local/bin/rpi-source && /usr/local/bin/rpi-source -q --tag-update
--2022-03-22 00:12:04-- https://raw.githubusercontent.com/RPi-Distro/rpi-source/master/rpi-source
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.111.133, 185.199.109.133, 185.199.108.133, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.111.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 14223 (14K) [text/plain]
Saving to: ‘/usr/local/bin/rpi-source’

/usr/local/bin/rpi-source 100%[=========================================================>] 13.89K --.-KB/s in 0.01s

2022-03-22 00:12:05 (1.16 MB/s) - ‘/usr/local/bin/rpi-source’ saved [14223/14223]

ubuntu@ubuntu:~/RTL8812BU_for_Raspbian$ rpi-source

*** SoC: BCM2711
ERROR:
Can't find a source for this kernel

On OSMC

Hi fastoe,

Just a comment: maybe you can add on the readme that it also works perfectly on OSMC.
The only change is how to install the headers:
apt-cache search osmc | grep headers
gives you the exact version of headers to install, in my case rbp2-headers-5.10.78-2-osmc

Thank you!

Nacho

Does not compile on Linux raspberrypi 5.15.32-v7l+ // net/ipx.h is flagged as not found

###Does not compile on Linux raspberrypi 5.15.32-v7l+ // net/ipx.h is flagged as not found

Error message:
./include/net/inet_connection_sock.h: In function ‘inet_csk_reqsk_queue_is_full’:
./include/net/inet_connection_sock.h:282:38: warning: comparison of integer expressions of different signedness: ‘int’ and ‘u32’ {aka ‘const unsigned int’} [-Wsign-compare]
282 | return inet_csk_reqsk_queue_len(sk) >= sk->sk_max_ack_backlog;
| ^~
/home/user/RTL8812BU_for_Raspbian/core/rtw_br_ext.c: At top level:
/home/user/RTL8812BU_for_Raspbian/core/rtw_br_ext.c:20:11: fatal error: net/ipx.h: Datei oder Verzeichnis nicht gefunden
20 | #include <net/ipx.h>

Kernel used:
Linux raspberrypi 5.15.32-v7l+ #1538 SMP Thu Mar 31 19:39:41 BST 2022 armv7l GNU/Linux

branch 5.6.1 and 5.8.7 were tested, please advice.

Make failing on redefinition of 'struct sha256_state'

Trying to make on an RPI3:

`make ARCH=arm CROSS_COMPILE= -C /lib/modules/5.10.52-v7+/build M=/home/pi/RTL8812BU_for_Raspbian modules
make[1]: Entering directory '/home/pi/linux-4e5d621498df7fce8b2cf90ac6bb7b2efbdbec5e'
CC [M] /home/pi/RTL8812BU_for_Raspbian/core/rtw_cmd.o
In file included from /home/pi/RTL8812BU_for_Raspbian/include/drv_conf.h:17,
from /home/pi/RTL8812BU_for_Raspbian/include/drv_types.h:25,
from /home/pi/RTL8812BU_for_Raspbian/core/rtw_cmd.c:17:
/home/pi/RTL8812BU_for_Raspbian/include/autoconf.h:183: warning: "CONFIG_RTW_SW_LED" redefined
#define CONFIG_RTW_SW_LED

: note: this is the location of the previous definition
In file included from /home/pi/RTL8812BU_for_Raspbian/include/drv_types.h:79,
from /home/pi/RTL8812BU_for_Raspbian/core/rtw_cmd.c:17:
/home/pi/RTL8812BU_for_Raspbian/include/rtw_security.h:257:8: error: redefinition of \u2018struct sha256_state\u2019
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:87,
from ./include/net/addrconf.h:50,
from /home/pi/RTL8812BU_for_Raspbian/include/osdep_service_linux.h:48,
from /home/pi/RTL8812BU_for_Raspbian/include/osdep_service.h:50,
from /home/pi/RTL8812BU_for_Raspbian/include/drv_types.h:27,
from /home/pi/RTL8812BU_for_Raspbian/core/rtw_cmd.c:17:
./include/crypto/sha.h:84:8: note: originally defined here
struct sha256_state {
^~~~~~~~~~~~
make[2]: *** [scripts/Makefile.build:280: /home/pi/RTL8812BU_for_Raspbian/core/rtw_cmd.o] Error 1
make[1]: *** [Makefile:1824: /home/pi/RTL8812BU_for_Raspbian] Error 2
make[1]: Leaving directory '/home/pi/linux-4e5d621498df7fce8b2cf90ac6bb7b2efbdbec5e'
make: *** [Makefile:2290: modules] Error 2

`

After install the driver, Raspberry pi still unable to recongnize the USB device

I had followed your instrustion installed the driver successfully. The output shown as below:

: note: this is the location of the previous definition
CC [M] /home/pi/RTL8812BU_for_Raspbian/platform/platform_ops.o
CC [M] /home/pi/RTL8812BU_for_Raspbian/core/rtw_mp.o
In file included from /home/pi/RTL8812BU_for_Raspbian/include/drv_conf.h:17,
from /home/pi/RTL8812BU_for_Raspbian/include/drv_types.h:25,
from /home/pi/RTL8812BU_for_Raspbian/core/rtw_mp.c:16:
/home/pi/RTL8812BU_for_Raspbian/include/autoconf.h:183: warning: "CONFIG_RTW_SW_LED" redefined
#define CONFIG_RTW_SW_LED

: note: this is the location of the previous definition
LD [M] /home/pi/RTL8812BU_for_Raspbian/88x2bu.o
Building modules, stage 2.
MODPOST 1 modules
WARNING: "__sanitizer_cov_trace_cmp4" [/home/pi/RTL8812BU_for_Raspbian/88x2bu.ko] undefined!
WARNING: "__sanitizer_cov_trace_cmp8" [/home/pi/RTL8812BU_for_Raspbian/88x2bu.ko] undefined!
WARNING: "__sanitizer_cov_trace_pc" [/home/pi/RTL8812BU_for_Raspbian/88x2bu.ko] undefined!
WARNING: "__sanitizer_cov_trace_const_cmp4" [/home/pi/RTL8812BU_for_Raspbian/88x2bu.ko] undefined!
WARNING: "__sanitizer_cov_trace_const_cmp2" [/home/pi/RTL8812BU_for_Raspbian/88x2bu.ko] undefined!
WARNING: "__sanitizer_cov_trace_const_cmp1" [/home/pi/RTL8812BU_for_Raspbian/88x2bu.ko] undefined!
WARNING: "__sanitizer_cov_trace_const_cmp8" [/home/pi/RTL8812BU_for_Raspbian/88x2bu.ko] undefined!
WARNING: "__sanitizer_cov_trace_switch" [/home/pi/RTL8812BU_for_Raspbian/88x2bu.ko] undefined!
WARNING: "__sanitizer_cov_trace_cmp2" [/home/pi/RTL8812BU_for_Raspbian/88x2bu.ko] undefined!
WARNING: "__sanitizer_cov_trace_cmp1" [/home/pi/RTL8812BU_for_Raspbian/88x2bu.ko] undefined!
CC /home/pi/RTL8812BU_for_Raspbian/88x2bu.mod.o
LD [M] /home/pi/RTL8812BU_for_Raspbian/88x2bu.ko
make[1]: leave directory“/home/pi/linux-f16e91dad2af9d57aef477cc1f522040353849f5”
pi@raspberrypi:/RTL8812BU_for_Raspbian $ sudo make install
install -p -m 644 88x2bu.ko /lib/modules/4.19.97-v7+/kernel/drivers/net/wireless/
/sbin/depmod -a 4.19.97-v7+
pi@raspberrypi:
/RTL8812BU_for_Raspbian $ sudo reboot

The output above seen right, right?
But I still not able to get the second wlan interface:

pi@raspberrypi:/etc/network $ lsusb
Bus 001 Device 004: ID 0483:5750 STMicroelectronics
Bus 001 Device 005: ID 0bda:b812 Realtek Semiconductor Corp.
Bus 001 Device 006: ID 0424:7800 Standard Microsystems Corp.
Bus 001 Device 003: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 002: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
pi@raspberrypi:/etc/network $ sudo iwconfig
wlan0 IEEE 802.11 ESSID:"Manal_Aruba"
Mode:Managed Frequency:5.18 GHz Access Point: BC:9F:E4:F9:95:12
Bit Rate=433.3 Mb/s Tx-Power=31 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:on
Link Quality=70/70 Signal level=-16 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:10 Invalid misc:0 Missed beacon:0

eth0 no wireless extensions.

lo no wireless extensions.

Any chance connecting 60 stations?

Hello,

I have tried recompiling the driver allowing for more stations, but the interface sometimes goes down and the stations try a reconnect.

The warning for no more room is triggered and a kernel event is logged.

Am I doing the right move?

This is with rpi 2 zero w with the lastest kernel.

Oct  5 12:06:54 raspberrypi kernel: [ 1551.927200] WARNING: CPU: 2 PID: 400 at /home/pi/RTL8812BU_for_Raspbian/core/rtw_wlan_util.c:1204 rtw_get_camid+0xe0/0xe8 [88x2bu]
Oct  5 12:06:54 raspberrypi kernel: [ 1551.928503] Modules linked in: cmac algif_hash aes_arm_bs crypto_simd cryptd algif_skcipher af_alg bnep hci_uart btbcm bluetooth ecdh_generic ecc 8021q garp stp llc snd_soc_hdmi_codec 88x2bu(O) vc4 cec brcmfmac drm_kms_helper brcmutil snd_soc_core snd_compress sha256_generic snd_pcm_dmaengine snd_pcm snd_timer snd cfg80211 syscopyarea sysfillrect sysimgblt fb_sys_fops rfkill i2c_bcm2835 raspberrypi_hwmon bcm2835_v4l2(C) videobuf2_vmalloc bcm2835_codec(C) bcm2835_isp(C) v4l2_mem2mem bcm2835_mmal_vchiq(C) videobuf2_dma_contig videobuf2_memops videobuf2_v4l2 videobuf2_common videodev vc_sm_cma(C) mc fixed uio_pdrv_genirq uio drm drm_panel_orientation_quirks backlight fuse ip_tables x_tables ipv6
Oct  5 12:06:54 raspberrypi kernel: [ 1551.929211] CPU: 2 PID: 400 Comm: RTW_CMD_THREAD Tainted: G        WC O      5.15.32-v7+ #1538
Oct  5 12:06:54 raspberrypi kernel: [ 1551.929232] Hardware name: BCM2835
Oct  5 12:06:54 raspberrypi kernel: [ 1551.929241] Backtrace:
Oct  5 12:06:54 raspberrypi kernel: [ 1551.929254] [<80a3cb94>] (dump_backtrace) from [<80a3cddc>] (show_stack+0x20/0x24)
Oct  5 12:06:54 raspberrypi kernel: [ 1551.929295]  r7:000004b4 r6:80d175cc r5:00000000 r4:60000013
Oct  5 12:06:54 raspberrypi kernel: [ 1551.929304] [<80a3cdbc>] (show_stack) from [<80a41314>] (dump_stack_lvl+0x70/0x94)
Oct  5 12:06:54 raspberrypi kernel: [ 1551.929333] [<80a412a4>] (dump_stack_lvl) from [<80a41350>] (dump_stack+0x18/0x1c)
Oct  5 12:06:54 raspberrypi kernel: [ 1551.929364]  r7:000004b4 r6:00000009 r5:7f651520 r4:7f767a58
Oct  5 12:06:54 raspberrypi kernel: [ 1551.929372] [<80a41338>] (dump_stack) from [<8011f908>] (__warn+0xfc/0x114)
Oct  5 12:06:54 raspberrypi kernel: [ 1551.929400] [<8011f80c>] (__warn) from [<80a3d394>] (warn_slowpath_fmt+0x70/0xd8)
Oct  5 12:06:54 raspberrypi kernel: [ 1551.929429]  r7:000004b4 r6:7f767a58 r5:80f05008 r4:00000000
Oct  5 12:06:54 raspberrypi kernel: [ 1551.929437] [<80a3d328>] (warn_slowpath_fmt) from [<7f651520>] (rtw_get_camid+0xe0/0xe8 [88x2bu])
Oct  5 12:06:54 raspberrypi kernel: [ 1551.930645]  r9:81792000 r8:81792540 r7:00000000 r6:81792540 r5:81792000 r4:00000020
Oct  5 12:06:54 raspberrypi kernel: [ 1551.930656] [<7f651440>] (rtw_get_camid [88x2bu]) from [<7f65159c>] (rtw_camid_alloc+0x74/0x12c [88x2bu])
Oct  5 12:06:54 raspberrypi kernel: [ 1551.932822]  r7:00000000 r6:00000000 r5:9c84b000 r4:9ca18664
Oct  5 12:06:54 raspberrypi kernel: [ 1551.932831] [<7f651528>] (rtw_camid_alloc [88x2bu]) from [<7f64bda8>] (set_stakey_hdl+0x7c/0x1fc [88x2bu])
Oct  5 12:06:54 raspberrypi kernel: [ 1551.934996]  r10:9c84bf30 r9:7f77d000 r8:7f64bd2c r7:9c84bf50 r6:84d20200 r5:9c84b000
Oct  5 12:06:54 raspberrypi kernel: [ 1551.935008]  r4:84d35100 r3:00000000
Oct  5 12:06:54 raspberrypi kernel: [ 1551.935016] [<7f64bd2c>] (set_stakey_hdl [88x2bu]) from [<7f61febc>] (rtw_cmd_thread+0x174/0x45c [88x2bu])
Oct  5 12:06:54 raspberrypi kernel: [ 1551.937176]  r9:7f77d000 r8:7f64bd2c r7:9c84bf50 r6:84f20000 r5:9c84b000 r4:84d35100
Oct  5 12:06:54 raspberrypi kernel: [ 1551.937187] [<7f61fd48>] (rtw_cmd_thread [88x2bu]) from [<80145580>] (kthread+0x178/0x194)
Oct  5 12:06:54 raspberrypi kernel: [ 1551.938297]  r10:84f20000 r9:843759cc r8:00000000 r7:9c84b000 r6:7f61fd48 r5:86245000
Oct  5 12:06:54 raspberrypi kernel: [ 1551.938308]  r4:86226fc0
Oct  5 12:06:54 raspberrypi kernel: [ 1551.938315] [<80145408>] (kthread) from [<801000d4>] (ret_from_fork+0x14/0x20)
Oct  5 12:06:54 raspberrypi kernel: [ 1551.938341] Exception stack(0x84f21fb0 to 0x84f21ff8)
Oct  5 12:06:54 raspberrypi kernel: [ 1551.938357] 1fa0:                                     00000000 00000000 00000000 00000000
Oct  5 12:06:54 raspberrypi kernel: [ 1551.938375] 1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
Oct  5 12:06:54 raspberrypi kernel: [ 1551.938389] 1fe0: 00000000 00000000 00000000 00000000 00000013 00000000
Oct  5 12:06:54 raspberrypi kernel: [ 1551.938407]  r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:80145408
Oct  5 12:06:54 raspberrypi kernel: [ 1551.938417]  r4:86245000
Oct  5 12:06:54 raspberrypi kernel: [ 1551.938467] ---[ end trace 02fec763f377b2f2 ]---

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.