Thank you for the explanation @minute . I have read up a bit and written it together to make it easier for others to get started. I was not very familiar with the Linux kernel. The level is a bit high for beginners, but the learning curve is much higher
:
Here is what I have done to get my USB Wi-Fi adapter with Ralink RT5572 chip (Amazon.de Link) to work:
# Install required packages
sudo apt install libssl-dev bc iw
# Create dirs
mkdir -p /lib/modules
mkdir -p /lib/firmware
# Clone MNT Reform system image repo
git clone https://source.mnt.re/reform/reform-system-image.git
cd reform2-imx8mq
# Download Linux kernel, patch and compile
./mkkernel.sh
# Change original configuration
cd linux
make menuconfig
Enable Ralink devices
and Ralink driver support
under Device Drivers > Network device support > Wireless LAN
.
Then, build the kernel and modules:
# Compile
make -j4 Image modules
# Copy kernel
sudo cp arch/arm64/boot/Image /<ROOT-of-SD-CARD-or-RESCUE>/
# Copy modules
sudo cp lib/crc-ccitt.ko /lib/modules/
sudo cp drivers/net/wireless/ralink/rt2x00/*.ko /lib/modules/
# Download firmware
sudo curl "https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/rt2870.bin" -o "/lib/firmware/rt2870.bin"
# Reboot
sudo reboot
After a reboot, you should be able to insmod
the related modules:
sudo insmod /lib/modules/crc-ccitt.ko
sudo insmod /lib/modules/rt2x00lib.ko
sudo insmod /lib/modules/rt2800lib.ko
sudo insmod /lib/modules/rt2x00usb.ko
sudo insmod /lib/modules/rt2800usb.ko
After that dmesg
should not show any errors and ip a
should show wlan0
.
Check with uname -a
if the date matches today. If not, you are still using the old kernel.
Now you can test:
sudo iw wlan0 scan
To load the modules automatic after a reboot, do the following:
# Create dir with kernel version
sudo mkdir -p /lib/modules/$(uname -r)
# Link modules to kernel version
sudo ln -s /lib/modules/*.ko /lib/modules/$(uname -r)
# Generate modules.dep and map files
sudo depmod -a
# Edit /etc/modules, add rt2800usb
echo "rt2800usb" | sudo tee -a /etc/modules
Done. After a reboot ip a
should show wlan0
again.
With the WLE200NX I always had the following error (I blurred the MAC of my AP.):
[ 3327.499278] wlp1s0: disassociated from â–“â–“:â–“â–“:â–“â–“:â–“â–“:â–“â–“:â–“â–“ (Reason: 1=UNSPECIFIED)
I cannot reproduce the connection failure. It just happened irregularly but frequently.
I have no problems with the USB Wi-FI adapter so far. I will further observe it.