Skip to main content

Junyi's Lab

Compile RTL8812AU / RTL8814AU for Raspberry Pi 4B

Table of Contents

This article is solely for recording the successful configuration processes for Raspberry Pi 4B.

The environment is only applicable to Raspberry Pi OS.

Other environments have not been tested!

# Install RTL8812AU Driver

sudo apt update
sudo apt install raspberrypi-kernel-headers build-essential dkms
git clone
cd rtl8812au
sed -i 's/CONFIG_PLATFORM_I386_PC = y/CONFIG_PLATFORM_I386_PC = n/g' Makefile
sudo chmod +x
sudo ./

sudo reboot # Reboot your system

# Install RTL8814AU Driver

sudo apt update
sudo apt-get install -y raspberrypi-kernel-headers bc build-essential dkms git
git clone
cd 8814au
sudo ./ # for 32-bit operating system only
sudo ./
sudo reboot

# Install Docker

wget -O
bash --mirror=Aliyun
sudo groupadd docker
sudo usermod -aG docker $USER
newgrp docker
# Logout, then login your current session
docker run hello-world

sudo apt install python3-pip
sudo pip3 install docker-compose
docker-compose --version

# Set up Bluetooth auto-connect

I need to automatically connect my Bluetooth keyboard, hence the following steps.

~# sudo bluetoothctl # Entering bluetooth mode
[bluetooth]# power on
[bluetooth]# agent on
[bluetooth]# pairable on
[bluetooth]# scan on
[bluetooth]# pair 34:88:5D:67:38:DF
sudo nano /etc/init.d/keyboard
sudo hcitool spinq # Start periodic inquiry
exit 0

Set up auto-start on system boots.

sudo chmod +x /etc/init.d/keyboard
sudo update-rc.d keyboard defaults
sudo service keyboard start

# Setup wireless connection


# Install the latest SMART Monitoring Tools

tar zxvf smartmontools-7.2.tar.gz
cd smartmontools-7.2
mkdir build && cd build
sudo make install

# Mounting Disks

ls -l /dev/disk/by-uuid/
sudo mount -t ext4 -U YOUR_UUID_HERE /mnt/seagate/storage