My Raspberry Pi 4 was getting terrible wifi reception and the cheapest way I could figure to improve it was to buy a cheap wifi adapter off of amazon.
I bought an "AX5400M" wifi 6e usb adapter with external antennas, hooked it up and... nothing.
lsusb showed the device with an ID of 0bda:c832 and dmesg showed it was being recognized as a wifi adapter, but it wasn't actually accessible.
Some googling indicated this chipset is _very_ new and there is practically no support for it anywhere, but someone emailed realtek and got a linux driver for it.
Re: Realtek RTL8832CU compatibility (Linux Wireless)
Well, you can't just build a kernel module on your libreelec box because the build toolchain isn't installed and there's no way to install it, so here's what I did to build a new libreelec image with the new kernel module pre-installed.
Prerequisites are some disk space and docker. I did this on my linux desktop. These were the primary docs I used :
https://wiki.libreelec.tv/development/build-basics
First, pull down the libreelec repository.
Then you will need to create a build package for the driver I found above. I placed this file into my repo at the location http://LibreELEC.tv/packages/linux-drivers/rtw8852cu/package.mk
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2009-2016 Stephan Raue ([email protected])
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="rtw8852cu"
PKG_VERSION="0d4e209"
PKG_SHA256="279e3578b301e0207369aded10cad24c416cdef5562562a432e427ae5ea8358f"
PKG_LICENSE="GPL"
PKG_SITE="https://github.com/lwfinger/rtw8852cu"
PKG_URL="https://github.com/lwfinger/rtw8852cu/archive/${PKG_VERSION}.tar.gz"
PKG_LONGDESC="Realtek rtw8852cu Linux driver"
PKG_IS_KERNEL_PKG="yes"
pre_make_target() {
unset LDFLAGS
}
make_target() {
make V=1 \
ARCH=${TARGET_KERNEL_ARCH} \
KSRC=$(kernel_path) \
CROSS_COMPILE=${TARGET_KERNEL_PREFIX} \
CONFIG_POWER_SAVING=n
}
makeinstall_target() {
mkdir -p ${INSTALL}/$(get_full_module_dir)/${PKG_NAME}
cp *.ko ${INSTALL}/$(get_full_module_dir)/${PKG_NAME}
}
Display More
PKG_VERSION is the short hash from the commit you want to use.
Even though this repo had no releases, I found you can still download a tar.gz of the contents using the format https://github.com/lwfinger/rtw8852cu/archive/0d4e209.tar.gz (again, the short sha of the commit for the filename). I got the PKG_SHA256 by downloading that file with curl and running 'sha256 0d4e209.tar.gz'. If you want to build this exact module, you probably want to check to see if there's a newer commit on the driver. When I made this file the most recent commit was only an hour prior so it may still be under development.
Okay, now that I have my build package, I also had to edit my additional_drivers directives in two places to get the module to be automatically loaded.
I learned this from this thread : Assistance required recompiling LibreELEC with rtl88x2bu driver
The two files to edit are distributions/LibreELEC/options and since I'm running a Raspberry Pi, projects/RPi/options.
At the end of each of these files, add the following line :
That's a +=, so it will append your module to whatever that string presently holds.
My build configuration is now complete, so it's time to actually build the image. From the LibreELEC.tv directory, run the following command :
docker run --rm --log-driver none -v `pwd`:/build -w /build -it -e PROJECT=RPi -e DEVICE=RPi4 -e ARCH=arm libreelec make image
This will run for a while and then place a .img.gz image into the http://LibreELEC.tv/target directory that you can burn in your normal way.
I'm surprised since it was my first time building LibreELEC but it worked first time and now my wifi reception is great.
Hope this helps someone!