RPi | Install Edimax EW-7811UAC (rtl8812AU) driver

For Raspberry Pi, requires user driver/module compile:
https://github.com/Fourdee/DietPi/issues/759#issuecomment-279476920

Hi, for the current kernel the above linked driver and tutorial no longer works.
I used this one to make it work using the latest version of DietPi on an RPI 3 (as root):

https://github.com/aircrack-ng/rtl8812au

However, the instructions there are not quite in sequence. IIRC this is what I did:

  1. Install Git, DKMS:
apt-get install dkms git -y
  1. Install kernel headers:
apt-get install build-essential libelf-dev raspberrypi-kernel-headers
  1. Reboot (was in my case necessary for the compiler to find the headers)

  2. Download driver:

git clone -b v5.6.4.2 https://github.com/aircrack-ng/rtl8812au.git
cd rtl*
  1. Edit Makefile to compile for your platform, for me this was:
sed -i 's/CONFIG_PLATFORM_I386_PC = y/CONFIG_PLATFORM_I386_PC = n/g' Makefile
sed -i 's/CONFIG_PLATFORM_ARM_RPI = n/CONFIG_PLATFORM_ARM_RPI = y/g' Makefile
  1. Compilation and installation using DKMS:
make dkms_install

I hope this saves you a few searches (as Google pointed me here)!

OFC I fail at this step :roll_eyes:

  1. Edit Makefile to compile for your platform, for me this was:

sed -i ‘s/CONFIG_PLATFORM_I386_PC = y/CONFIG_PLATFORM_I386_PC = n/g’ Makefile
sed -i ‘s/CONFIG_PLATFORM_ARM_RPI = n/CONFIG_PLATFORM_ARM_RPI = y/g’ Makefile

>
\
<br>
```text
"sed: can't read Makefile: No such file or directory"

I am using RPi2 board.

root@DietPi:~/rtl8812au# uname -a
Linux DietPi 5.10.63-v7+ #1459 SMP Wed Oct 6 16:41:10 BST 2021 armv7l GNU/Linux

Did you have done step 4, download the git branch and changed directory to get inside?

The Makefile is there: https://github.com/aircrack-ng/rtl8812au/blob/v5.6.4.2/Makefile

Is this still required with latest RPi kernel? :thinking:

I have my DietPi distro updated to latest. It doesn’t recognize the adapter.

Started fresh. This time I didn’t make it past cloning. :frowning:

dietpi@DietPi:~$ sudo git clone -b v5.6.4.2 https://github.com/aircrack-ng/rtl88 12au.git
Cloning into ‘rtl8812au’…
fatal: unable to access ‘https://github.com/aircrack-ng/rtl8812au.git/’: Could n ot resolve host: github.com
dietpi@DietPi:~$
dietpi@DietPi:~$ sudo git clone -b v5.6.4.2 https://github.com/aircrack-ng/rtl8812au.git
Cloning into ‘rtl8812au’…
^Z
[1]+ Stopped sudo git clone -b v5.6.4.2 https://github.com/aircrack-ng/rtl8812au.git
dietpi@DietPi:~$ sudo git clone -b v5.6.4.2 https://github.com/aircrack-ng/rtl8812au.git
fatal: destination path ‘rtl8812au’ already exists and is not an empty directory.
dietpi@DietPi:~$

you would need to remove the directory created during first try. As well you had a DNS resolution issue as your system was not able to resolve global GitHub url.

I didn’t have to delete that directory. Reboot seems to have solved that. And a reboot of my modem solved DNS trouble. Thank you.

For next newbie like me. This works. I followed advice to the letter. Logged as user: dietpi. I just had to put sudo in front of everything, but CD command, in order to have right privileges. :wink: :roll_eyes: :sunglasses:

probably easier to use user root for such compiling task