***Tested and working method as of May 2023.***
First lets check for updates and install them in terminal by copying and pasting the following:
sudo apt update && sudo apt upgrade
***Terminal will probably ask to reboot, this is ok.***
sudo apt-get install dkms
sudo apt-get install raspberrypi-kernel-headers
git clone -b v5.6.4.2 https://github.com/aircrack-ng/rtl8812au.git
cd rtl*
sudo make dkms_install
The following error will probably occur.
To fix this we will need to edit the boot config by doing the following:
sudo su
cd /boot
nano config.txt
Add the following line just under [pi4]:
arm_64bit=0
Then hit “Ctrl + o, Enter” to write out the file.
Then hit “Ctrl + x” to exit the config file.
After exiting the config file we will need to reboot. This can be done by typing the following in terminal:
sudo reboot
Next install the driver by copying and pasting the following in terminal:
cd rtl8812au
sudo make dkms_remove
sudo make dkms_install
sudo reboot