Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

INFO: Raspberry Pi Driver Compatibility #16

Closed
PieGuy314 opened this issue Nov 9, 2020 · 29 comments
Closed

INFO: Raspberry Pi Driver Compatibility #16

PieGuy314 opened this issue Nov 9, 2020 · 29 comments

Comments

@PieGuy314
Copy link

Can report successfully building and running the current driver on the following Raspberry Pi/OS versions:

Raspberry Pi 4B (armv8) - DietPi 64-bit, PiOS 32-bit

Raspberry Pi 3B (armv8) - DietPi 32-bit, DietPi 64-bit

Raspberry Pi 2B (armv7) - PiOS 32-bit

Raspberry Pi A+ (armv6) - PiOS 32-bit

  • Swapfile increased to 512MB for compilation.
  • Compilation time circa 4 hrs!

Also have a Pi Zero - but will get to that when time permits and update this post accordingly.

Can also state that AP mode, packet injection and USB3.0 mode work as expected on a Pi 4B running 32-bit PiOS.

@morrownr
Copy link
Owner

morrownr commented Nov 9, 2020

PieGuy314,

I really appreciate the report. It is good to see things working well on the various versions of the Raspberry Pi. I am going to start using my Pi 4B in a way that I can test this and my other drivers. As soon as I can, I will start moving the Pi support and packet injection support to my other drivers: github.com/morrow

So, 4 hours on the A+. Cool. Glad it didn't error out.

Thanks, Nick

@PieGuy314
Copy link
Author

So, 4 hours on the A+. Cool. Glad it didn't error out.

It did the first time (didn't crash but ground to a halt). Was watching the memory usage the second (load avg > 8 with no swap space left). Third time lucky.

Managed to compile the driver on the Pi Zero (circa 45 mins). Insufficient power to drive the Pi and adapter without a powered USB hub. Kinda makes it too clunky for any practicable use.

Have now finally fixed all of the issues and niggles I was having with the Pi 3B I run shairport-sync on to stream tunes via my hi-fi.

Have a couple of FriendlyElec ARM SBC's that could benefit from some 88x2bu love. Guess that's my next project.

Thanks for the good work you've done in getting this driver up to date.

Regards, -- Ade

@PieGuy314
Copy link
Author

PieGuy314 commented Nov 10, 2020

BTW, Tested Hardware:

https://smile.amazon.co.uk/gp/product/B08523KPP9/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1

https://smile.amazon.co.uk/gp/product/B084WBTTN6/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1

The first one is an absolute bargain! Less than 1/3 of the price of the latter. No difference in performance.

(Bought the more expensive one first, knowing what chipset I was buying. But took a risk on the second, knowing that it was likely a chipset that had a level of linux support. Then stumbled upon morrownr's repo that made things easy with newer kernels.

@morrownr
Copy link
Owner

The TP-Link adapter is already listed as supported but I will add the other to the README if that is okay with you. I am nearly ready to start testing on my RasPi 4B but I have a question: Did you use an external powered USB 3 extender or did you plug directly into the Pi? I'm concerned about having enough power available.

@morrownr
Copy link
Owner

I now have an 8812bu based usb wifi adapter running on my RasPi 4B. It was good to step through the installation instructions myself. I gave it a try after only installing dkms as dkms requires the headers to be installed but I found out that "bc" is not installed and is required. This adventure is causing me to rethink how the installation is spelled out in the README. I need the process to be consistent, easy and dependable.

This device is working really well on the Pi. I'm not seeing any power issues so I think the 8812bu is not using a lot of power which is good.

@PieGuy314
Copy link
Author

I thought I'd listed the packages the build process depends on in another thread. The only board that wasn't able to drive the adaptor without a powered hub was the Pi Zero - but that could have been down to the funky enclosure it's in.

@morrownr
Copy link
Owner

You did list the packages for the RasPi:

sudo apt-get install -y raspberrypi-kernel-headers bc build-essential

I am modifying to see what happens. I am not happy with the current installation instructions in the README. It needs to be simplified. I'm thinking a script for each option is the only way to make this work:

  1. x86-64 - Ubuntu/Mint
  2. ARM-32 - Raspberry Pi OS
  3. ARM-64 - Raspberry Pi OS
  4. x86-32 - Raspberry Pi OS
  5. ARM-64 - Ubuntu Desktop and Server for Raspberry Pi
  6. ARM-32 - Ubuntu Server for Raspberry Pi

Do you see the problem?

We also need to add a section before installation that lists options for connecting a system to the internet without their 88x2bu adapter being available. Ethernet is an option but it is hard to move desktop systems. Tethering is an option but we need a good simple section that provides instructions for many options to connect to the internet in order to install this driver. Would you mind taking the lead on preparing a document that outlines the instructions for the various options?

@PieGuy314
Copy link
Author

From a personal perspective, I'm not keen on the thought of a multitude of build scripts. You've listed a few options but ignored a plethora of other systems/architectures. The 'dkms-install.sh' and 'dkms-remove.sh' save time and need little maintenance. I personally feel that editing the Makefile should be left to the user. The key for me is the documentation. It might be worth documenting how to disable the Pi's built in wifi, but in all honesty, that's already documented elsewhere. The additions you've made to 'README.md' make sense. I'd leave them as they stand and wait for questions that people raise. Just my 2c.

-- Ade

@morrownr
Copy link
Owner

PieGuy314,

I think you are making sense so I am going to work on other things like making sure this driver works well on the next LTS version of the kernel (5.10). I do think a short note to point out how to disable the onboard wifi for the 3B and later would be a good idea. I also think a short primer on how to get a system connected to the internet via alternate means could be useful so if you run onto any good articles, please pass the info on.

FYI: I tested the new Ubuntu 20.10 ARM 64 Desktop distro yesterday. It lasted 30 minutes on an sd card and it was time to image something else. In my opinion, it is truly bad. The bad starts with the Gnome interface. I don't like that interface. I have tried to like it but I don't. My main OS here is Mint Cinnamon. Gnome is also slow. You can put lipstick on a pig but it is still a pig and Gnome is a pig. I'm not going to support that distro.

Cheers.

@PieGuy314
Copy link
Author

Only two GUI's I use - MacOS and a hacked Chromebook running Debian/Gnome (ie. Chromium, Nautilus, Terminal). Pretty much everything else is CLI via ssh. Installing OS's is usually via editing the boot info and/or a serial-USB gadget.

Spent too long today trying to get the driver to compile on a FriendlyElec ZeroPi (Allwinner H3 Cortex-A7 1.2 GHz | 4 cores | ARMv7). $9.99 4-core ARMv7l that way outperforms the Pi Zero. The included Makefile is inclined towards using cross-compilation for a lot of ARM based chipsets and I'm still trying to figure out why it stubbornly refuses to compile on a standalone system. But that's a project for the weekend.

BTW, to disable onboard wifi on the Raspberry Pi, download and compile the new driver with it enabled. Edit /boot/config.txt and append:

dtoverlay=disable-wifi

Poweroff. Plug in your 88x2bu adaptor. Reboot.
.

@morrownr
Copy link
Owner

What kinds of problems are you seeing compiling on that FriendlyElec board?

@morrownr
Copy link
Owner

iperf3 results using this driver on a Pi 4B:

[ ID] Interval Transfer Bitrate Retr Cwnd
[ 5] 0.00-1.01 sec 47.9 MBytes 399 Mbits/sec 0 2.13 MBytes
[ 5] 1.01-2.00 sec 68.8 MBytes 581 Mbits/sec 0 2.38 MBytes
[ 5] 2.00-3.00 sec 66.2 MBytes 556 Mbits/sec 0 2.57 MBytes
[ 5] 3.00-4.00 sec 66.2 MBytes 556 Mbits/sec 0 2.72 MBytes
[ 5] 4.00-5.00 sec 62.5 MBytes 524 Mbits/sec 0 3.08 MBytes
[ 5] 5.00-6.00 sec 70.0 MBytes 587 Mbits/sec 0 3.08 MBytes
[ 5] 6.00-7.00 sec 66.2 MBytes 556 Mbits/sec 0 3.08 MBytes
[ 5] 7.00-8.00 sec 67.5 MBytes 566 Mbits/sec 0 3.08 MBytes
[ 5] 8.00-9.02 sec 65.0 MBytes 536 Mbits/sec 0 3.08 MBytes
[ 5] 9.02-10.00 sec 66.2 MBytes 566 Mbits/sec 0 3.08 MBytes

That is an average of 542 Mbits/sec. Smokin'. I noticed a pretty good bump in speed with the current default version of this driver. All indications are that this is a pretty good driver. I'm also impressed with the EDUP adapter that I use. That Pi 4B can really push the bits out of that USB 3 port.

FYI: I rewrote the installation part of the README and have been testing it. It is now 100% from the terminal (CLI) and all installation instructions are in one section.

@PieGuy314
Copy link
Author

PieGuy314 commented Nov 14, 2020

What kinds of problems are you seeing compiling on that FriendlyElec board?

Nothing that's not to be expected in hindsight. The OS's on a lot of these boards are usually cross compiled on x86 based systems. Subsequently, the Makefile reflects a similar build environment geared around cross-compilation. This is quite sensible.

I'd built the OS I was running via cross-compilation. The sensible approach is to rebuild it with the the driver included.

@GoldenTK
Copy link

GoldenTK commented Nov 27, 2020

I'm getting following error on my Raspberry Pi 4B:

pi@raspberrypi:~/src/88x2bu $ sudo ./install-driver.sh 
dkms appears to be installed.
Copying driver source files to: /usr/src/rtl88x2bu-5.8.7.4
Copying 88x2bu.conf to: /etc/modprobe.d

Creating symlink /var/lib/dkms/rtl88x2bu/5.8.7.4/source ->
                 /usr/src/rtl88x2bu-5.8.7.4

DKMS: add completed.
dkms add was successful.

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...
'make' all KVER=5.4.79-v8+ -j3...................................................(bad exit status: 2)
Error! Bad return status for module build on kernel: 5.4.79-v8+ (aarch64)
Consult /var/lib/dkms/rtl88x2bu/5.8.7.4/build/make.log for more information.
An error occurred while running: dkms build
pi@raspberrypi:~/src/88x2bu $ cat /var/lib/dkms/rtl88x2bu/5.8.7.4/build/make.log
DKMS make.log for rtl88x2bu-5.8.7.4 for kernel 5.4.79-v8+ (aarch64)
Fri Nov 27 20:07:50 GMT 2020
make ARCH=arm64 CROSS_COMPILE= -C /lib/modules/5.4.79-v8+/build M=/var/lib/dkms/rtl88x2bu/5.8.7.4/build  modules
make[1]: Entering directory '/home/pi/linux-9797f1a4938c20139b00a25de93cc99efb5c291b'
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/core/rtw_cmd.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/core/rtw_security.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/core/rtw_debug.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/core/rtw_io.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/core/rtw_ioctl_query.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/core/rtw_ioctl_set.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/core/rtw_ieee80211.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/core/rtw_mlme.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/core/rtw_mlme_ext.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/core/rtw_mi.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/core/rtw_wlan_util.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/core/rtw_vht.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/core/rtw_pwrctrl.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/core/rtw_rf.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/core/rtw_chplan.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/core/rtw_recv.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/core/rtw_sta_mgt.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/core/rtw_ap.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/core/mesh/rtw_mesh.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/core/mesh/rtw_mesh_pathtbl.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/core/mesh/rtw_mesh_hwmp.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/core/rtw_xmit.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/core/rtw_p2p.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/core/rtw_rson.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/core/rtw_tdls.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/core/rtw_br_ext.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/core/rtw_iol.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/core/rtw_sreset.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/core/rtw_btcoex_wifionly.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/core/rtw_btcoex.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/core/rtw_beamforming.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/core/rtw_odm.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/core/rtw_rm.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/core/rtw_rm_fsm.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/core/rtw_rm_util.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/core/efuse/rtw_efuse.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/os_dep/osdep_service.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/os_dep/linux/os_intfs.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/os_dep/linux/usb_intf.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/os_dep/linux/usb_ops_linux.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/os_dep/linux/ioctl_linux.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/os_dep/linux/xmit_linux.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/os_dep/linux/mlme_linux.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/os_dep/linux/recv_linux.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/os_dep/linux/ioctl_cfg80211.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/os_dep/linux/rtw_cfgvendor.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/os_dep/linux/wifi_regd.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/os_dep/linux/rtw_android.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/os_dep/linux/rtw_proc.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/os_dep/linux/rtw_rhashtable.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/os_dep/linux/ioctl_mp.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/hal_intf.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/hal_com.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/hal_com_phycfg.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/hal_phy.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/hal_dm.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/hal_dm_acs.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/hal_btcoex_wifionly.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/hal_btcoex.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/hal_mp.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/hal_mcc.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/hal_hci/hal_usb.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/led/hal_led.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/led/hal_usb_led.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/rtl8822b/rtl8822b_halinit.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/rtl8822b/rtl8822b_mac.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/rtl8822b/rtl8822b_cmd.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/rtl8822b/rtl8822b_phy.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/rtl8822b/rtl8822b_ops.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/rtl8822b/hal8822b_fw.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/rtl8822b/usb/rtl8822bu_halinit.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/rtl8822b/usb/rtl8822bu_halmac.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/rtl8822b/usb/rtl8822bu_io.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/rtl8822b/usb/rtl8822bu_xmit.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/rtl8822b/usb/rtl8822bu_recv.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/rtl8822b/usb/rtl8822bu_led.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/rtl8822b/usb/rtl8822bu_ops.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/efuse/rtl8822b/HalEfuseMask8822B_USB.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/hal_halmac.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/halmac/halmac_api.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/halmac/halmac_dbg.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/halmac/halmac_88xx/halmac_bb_rf_88xx.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/halmac/halmac_88xx/halmac_cfg_wmac_88xx.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/halmac/halmac_88xx/halmac_common_88xx.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/halmac/halmac_88xx/halmac_efuse_88xx.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/halmac/halmac_88xx/halmac_flash_88xx.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/halmac/halmac_88xx/halmac_fw_88xx.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/halmac/halmac_88xx/halmac_gpio_88xx.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/halmac/halmac_88xx/halmac_init_88xx.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/halmac/halmac_88xx/halmac_mimo_88xx.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/halmac/halmac_88xx/halmac_usb_88xx.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/halmac/halmac_88xx/halmac_8822b/halmac_cfg_wmac_8822b.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/halmac/halmac_88xx/halmac_8822b/halmac_common_8822b.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/halmac/halmac_88xx/halmac_8822b/halmac_gpio_8822b.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/halmac/halmac_88xx/halmac_8822b/halmac_init_8822b.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/halmac/halmac_88xx/halmac_8822b/halmac_phy_8822b.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/halmac/halmac_88xx/halmac_8822b/halmac_pwr_seq_8822b.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/halmac/halmac_88xx/halmac_8822b/halmac_usb_8822b.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/phydm/phydm_debug.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/phydm/phydm_antdiv.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/phydm/phydm_soml.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/phydm/phydm_smt_ant.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/phydm/phydm_antdect.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/phydm/phydm_interface.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/phydm/phydm_phystatus.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/phydm/phydm_hwconfig.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/phydm/phydm.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/phydm/phydm_dig.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/phydm/phydm_pathdiv.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/phydm/phydm_rainfo.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/phydm/phydm_dynamictxpower.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/phydm/phydm_adaptivity.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/phydm/phydm_cfotracking.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/phydm/phydm_noisemonitor.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/phydm/phydm_beamforming.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/phydm/phydm_direct_bf.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/phydm/phydm_dfs.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/phydm/txbf/halcomtxbf.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/phydm/txbf/haltxbfinterface.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/phydm/txbf/phydm_hal_txbf_api.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/phydm/phydm_adc_sampling.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/phydm/phydm_ccx.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/phydm/phydm_psd.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/phydm/phydm_primary_cca.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/phydm/phydm_cck_pd.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/phydm/phydm_rssi_monitor.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/phydm/phydm_auto_dbg.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/phydm/phydm_math_lib.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/phydm/phydm_api.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/phydm/phydm_pow_train.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/phydm/phydm_lna_sat.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/phydm/phydm_pmac_tx_setting.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/phydm/phydm_mp.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/phydm/phydm_cck_rx_pathdiv.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/phydm/halrf/halrf.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/phydm/halrf/halrf_debug.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/phydm/halrf/halphyrf_ce.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/phydm/halrf/halrf_powertracking_ce.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/phydm/halrf/halrf_powertracking.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/phydm/halrf/halrf_kfree.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/phydm/halrf/halrf_psd.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/phydm/rtl8822b/halhwimg8822b_bb.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/phydm/rtl8822b/halhwimg8822b_mac.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/phydm/halrf/rtl8822b/halrf_8822b.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/phydm/rtl8822b/phydm_hal_api8822b.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/phydm/halrf/rtl8822b/halhwimg8822b_rf.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/phydm/halrf/rtl8822b/halrf_iqk_8822b.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/phydm/halrf/rtl8822b/halrf_rfk_init_8822b.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/phydm/rtl8822b/phydm_regconfig8822b.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/phydm/rtl8822b/phydm_rtl8822b.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/phydm/txbf/haltxbf8822b.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/btc/halbtc8822bwifionly.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/btc/halbtc8822b1ant.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/hal/btc/halbtc8822b2ant.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/platform/platform_ops.o
  CC [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/core/rtw_mp.o
  LD [M]  /var/lib/dkms/rtl88x2bu/5.8.7.4/build/88x2bu.o
  Building modules, stage 2.
  MODPOST 1 modules
ERROR: "__const_udelay" [/var/lib/dkms/rtl88x2bu/5.8.7.4/build/88x2bu.ko] undefined!
ERROR: "__arch_copy_from_user" [/var/lib/dkms/rtl88x2bu/5.8.7.4/build/88x2bu.ko] undefined!
ERROR: "_raw_spin_unlock" [/var/lib/dkms/rtl88x2bu/5.8.7.4/build/88x2bu.ko] undefined!
ERROR: "__rcu_read_lock" [/var/lib/dkms/rtl88x2bu/5.8.7.4/build/88x2bu.ko] undefined!
ERROR: "__rcu_read_unlock" [/var/lib/dkms/rtl88x2bu/5.8.7.4/build/88x2bu.ko] undefined!
ERROR: "cpu_hwcap_keys" [/var/lib/dkms/rtl88x2bu/5.8.7.4/build/88x2bu.ko] undefined!
ERROR: "csum_ipv6_magic" [/var/lib/dkms/rtl88x2bu/5.8.7.4/build/88x2bu.ko] undefined!
ERROR: "__warn_printk" [/var/lib/dkms/rtl88x2bu/5.8.7.4/build/88x2bu.ko] undefined!
ERROR: "_mcount" [/var/lib/dkms/rtl88x2bu/5.8.7.4/build/88x2bu.ko] undefined!
ERROR: "arm64_const_caps_ready" [/var/lib/dkms/rtl88x2bu/5.8.7.4/build/88x2bu.ko] undefined!
ERROR: "__udelay" [/var/lib/dkms/rtl88x2bu/5.8.7.4/build/88x2bu.ko] undefined!
ERROR: "preempt_schedule_notrace" [/var/lib/dkms/rtl88x2bu/5.8.7.4/build/88x2bu.ko] undefined!
ERROR: "__arch_copy_to_user" [/var/lib/dkms/rtl88x2bu/5.8.7.4/build/88x2bu.ko] undefined!
make[2]: *** [scripts/Makefile.modpost:94: __modpost] Error 1
make[1]: *** [Makefile:1645: modules] Error 2
make[1]: Leaving directory '/home/pi/linux-9797f1a4938c20139b00a25de93cc99efb5c291b'
make: *** [Makefile:2421: modules] Error 2

Do you know what could go wrong?

@morrownr
Copy link
Owner

Where is PieGuy when we need him?

GoldenTK, are you running the 64 bit Raspberry Pi OS?

@GoldenTK
Copy link

Yes, I’m using latest Raspberry Pi OS Lite 64bit.

@PieGuy314
Copy link
Author

PieGuy314 commented Nov 28, 2020

Where is PieGuy when we need him?

GoldenTK, are you running the 64 bit Raspberry Pi OS?

I'd hazard a guess it is PiOS-64-bit given the kernel version. There's a reason it's still in Beta. I opted for DietPi a while ago for 64-bit support. Way less bleeding edge. And supports 88x2bu! (64-bit Ubuntu for Raspberry Pi should also work.)

These appear to be kernel/linker related issues. I doubt the driver will need modification.

@morrownr
Copy link
Owner

GoldenTK, I was testing today with my RasPi 4B with the RPi OS 32 bit with the 5.10 rc5 kernel. Worked like a charm. I have not tested with the 64 bit version of RPI OS yet. I'm going to go with what PieGuy said in that the log did not look like a driver code issue but rather a dev environment problem as it looked like all of the object files compiled fine and then the process fell apart when it was time to put everything together. I've compiled a few drivers in my time and I can't say that I've seen this before. If you have an extra sd card, you might flash some alternatives to see what happens. My best bet is that RPI OS 64 bit is in testing because it is not ready.

The section of the Makefile that supports ARM64 is standard except for one line that was recommended by another visitor:

EXTRA_CFLAGS += -fno-stack-protector

You could search for and delete that line to see what happens. You should probably run $ sudo ./remove-driver.sh to clean things up before trying another compile. Keep us updated.

@GoldenTK
Copy link

GoldenTK commented Nov 28, 2020

Yeah, that was the problem with Raspberry Pi OS, I installed DietPi and driver is working as expected, we can add Rocketek WL1200AT to supported devices list. Thanks for help @morrownr and @PieGuy314.

@PieGuy314
Copy link
Author

The section of the Makefile that supports ARM64 is standard except for one line that was recommended by another visitor:

EXTRA_CFLAGS += -fno-stack-protector

You could search for and delete that line to see what happens. You should probably run $ sudo ./remove-driver.sh to clean things up before trying another compile. Keep us updated.

Not recommended. The compiler with fail with an 'undefined reference to __stack_chk_fail' error. The solution is to define __stack_chk_fail(void)' as an additional function somewhere in the codebase or, alternatively, specify 'EXTRA_CFLAGS += -fno-stack-protector' in the makefile. The outcome is similar.

@GoldenTK
Copy link

GoldenTK commented Nov 28, 2020

Btw, do you know how to run dual band connection as an access-point? I can see only one wlan0 interface.

@morrownr
Copy link
Owner

https://wiki.gentoo.org/wiki/Hostapd

Hopefully that helps.

@ClaudioCimarelli
Copy link

Yeah, that was the problem with Raspberry Pi OS, I installed DietPi and driver is working as expected, we can add Rocketek WL1200AT to supported devices list. Thanks for help @morrownr and @PieGuy314.

@GoldenTK I am having this issue using DietPI v6.31.2, kernel DietPi 5.4.51-v8+, ARM64, raspberry pi 3B. Could you tell me how did you make it work and on which version (kernel, os, rpi model)? Many thanks

@KSofen
Copy link

KSofen commented Dec 29, 2024

The config options in the Makefile are for I386. Do I have to edit the Makefile to compile the driver for a Raspberry Pi 4? Does compiling this on the RP4 just handle this issue?

CONFIG_PLATFORM_I386_PC = y CONFIG_PLATFORM_RTL8198D = n CONFIG_PLATFORM_ANDROID_X86 = n CONFIG_PLATFORM_ANDROID_INTEL_X86 = n CONFIG_PLATFORM_NV_TK1 = n CONFIG_PLATFORM_NV_TK1_UBUNTU = n CONFIG_PLATFORM_ARM_SUNxI = n CONFIG_PLATFORM_RTK1319 = n CONFIG_PLATFORM_RTK16XXB = n CONFIG_PLATFORM_AML_S905 = n CONFIG_PLATFORM_AML_S905_L3A = n CONFIG_PLATFORM_HUANGLONG = n CONFIG_PLATFORM_ARM_ROCKCHIP = n

Any of this need editing or changing or adding something to work?

@morrownr
Copy link
Owner

Hi @KSofen

Do I have to edit the Makefile to compile the driver for a Raspberry Pi 4?

No

Does compiling this on the RP4 just handle this issue?

Yes, I put autodetection routines in the Makefile and install-driver.sh to make things easy... hopefully easy. Realtek really makes their USB support difficult.

FYI: I work at another repo to help get good standards compliant WiFi 5 drivers for Realtek in the kernel:

https://github.com/lwfinger/rtw88

Work at that site goes upstream to the Linux Mainline kernel when ready. The rtl88x2bu driver, rtw_8822bu, has been steadily improved over the last year but you won't see the improvements until your distro gets to kernel 6.12 or later. What you can do is install from the link directly above. We can use testers, especially AP mode testers.

@KSofen
Copy link

KSofen commented Dec 29, 2024

Everything seemed to compile properly but wlan1 did not appear when I ran iwconfig after a reboot. I'd really like to use it as an AP since it's faster than the RP4's built-in radio. I have an RP4 setup as an AdGuard DNS, Wireguard server, and wireless bridge combo. I'd really like a driver that would work with OpenWrt.

@morrownr
Copy link
Owner

I'd really like a driver that would work with OpenWrt.

The rtw88 drivers were added to OpenWRT with 24.10 rc4.

@KSofen
Copy link

KSofen commented Dec 30, 2024

I did notice that in rc4 - but they don't work for the rtl8852bu chip - there's something different about that chip or the Fenvi AX1800 USB wireless dongle. The old driver from you and the new one you pointed me to in this thread compiled and installed just fine - but as far as Debian Linux (and rc4 OpenWrt) are concerned, nothing it recognizes is connected.

It's not a good dongle and I've spend a good deal of time screwing with it. I really have to give up and move on. Thanks so much for all your efforts anyway. You're right in that Realtek does not make it easy.

@morrownr
Copy link
Owner

but they don't work for the rtl8852bu chip

That is a WiFi 6 chipset.

It's not a good dongle and I've spend a good deal of time screwing with it.

Here is a message that I have pinned at issues in USB-WiFi:

morrownr/USB-WiFi#449

If you are looking for a good adapter:

https://github.com/morrownr/USB-WiFi

Recommend you read menu items 1 and 2. You really don't have to buy adapters based on Realtek chips. The Plug and Play List has many really good adapters that work with in-kernel drivers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants