Issues compiling rtl8812 wifi drivers

So I’ve been having some issues getting an ALFA AC1200 wifi card to work - I specifically wanted 5Ghz wifi to minimize interference on the 2.4Ghz band.

The card I chose was the AWUS036ACH adapter - which contains the realtek 8812au chipset.

After some googling, I came across GitHub - gnab/rtl8812au: Realtek 802.11n WLAN Adapter Linux driver - an rtl8812 driver that supports RPi. Following their instructions:

git clone https://github.com/gnab/rtl8812au.git
cd rtl8812au
sudo nano Makefile

Then I edit thus:

52: - CONFIG_PLATFORM_I386_PC = y
52: + CONFIG_PLATFORM_I386_PC = n

58: - CONFIG_PLATFORM_ARM_RPI = n
58: + CONFIG_PLATFORM_ARM_RPI = y

Then to compile the driver:

sudo make clean
sudo make

The driver throws a couple of warnings during compilation, but compiles well enough - giving me an 8812au.ko module. However, when I try and insmod the new driver, I get:

pi@pi ~/src/wifi/rtl8812au $ sudo insmod 8812au.ko
Error: could not insert module 8812au.ko: Invalid module format

Does anyone have a working driver, or any tips as to what I might be getting wrong? Loosing my cool with this one!

Thanks,
Mike

Quick update - I also tried sudo make install:

pi@pi ~/src/rtl8812au $ sudo make install
install -p -m 644 8812au.ko  /lib/modules/3.18.9-rt5-v7+/kernel/drivers/net/wireless/
/sbin/depmod -a 3.18.9-rt5-v7+

This completes without error - but no sign of the wlan interface!

Better update - thanks to @CodeChief for the working 8812.ko module in his ‘building a module’ post.

then:

sudo cp 8812au.ko /lib/modules/$(uname -r)/kernel/drivers/net/wireless
sudo depmod
sudo reboot

and Boom! Thanks guys!

1 Like

Fixed here.