Realtek 8812au Drivers for Raspberry Pi 2

The problem with the Raspberry Pi 2 is that it’s a great device, but it lacks wireless capability.  Additionally, from what I’ve read, the Pi 3 has a problem with connecting to wireless at distances because of the antenna (or lack of).  The venture started because I wanted to install OctoPi for my 3D Printer and have that control everything.  Not having a Pi 3, I decided to use one of my old Realtek wireless antennas to get wireless access.  Most linux distributions don’t support the 8812au out of the box and getting this installed was proving to be a huge pain, but once I found the right drivers, the installation was pretty simple.

First, had to identify the device:


Bus 001 Device 004: ID 0bda:0811 Realtek Semiconductor Corp.

On a Debian or Raspian build, you need to update you kernel and install the kernel headers.

# apt-get update && apt-get install rasperrypi-kernel raspberrypi-kernel-headers

Then install dkms so that it can rebuild the drivers if you update.

# apt-get install dkms build-essential

Now, we have to get the right driver.  The one that worked for me was the gnab drivers on github.

mkdir drivers/ &&; cd drivers/
git clone -b v4.3.21
cd rtl8812au
sed -i ‘s/CONFIG_PLATFORM_I386_PC = y/CONFIG_PLATFORM_I386_PC = n/g’ Makefile
make CROSS_COMPILE=arm-linux-gnueabihf- ARCH=arm
make install
cp 8812au.ko /lib/modules/`uname -r`/kernel/drivers/net/wireless
depmod -a
modprobe 8812au

Then for the DKMS piece:

dkms add -m 8812au -v 4.3.21
dkms build -m 8812au -v 4.3.21
dkms install -m 8812au -v 4.3.21

To remove the driver:

dkms remove -m 8812au -v 4.3.21 --all

My Stab at Google OnHub

We all suffer from crappy wireless reception in our homes.  These days, too many people have WiFi and the airwaves are nothing shy of a horrible RF traffic jam.  After doing some research, I decided to invest in the Google OnHub router.  There were only a few things that I was looking for in the configuration; port forwarding being the top of my priority list.  Google advertises that their product is a top of the line router… “Better. Faster. Router.” Although I don’t argue the fact that it’s an amazing piece of hardware, there are just a few things that you would expect in a router.

For starters; the setup was stupid simple.  Simply plug it in, download the app and follow the very simple instructions.  After about 10 minutes of updates and a few things to fill out, you are all set.  There is on website to access, no 192.168.0(or 1).1, or other complicated setup procedures.  If you want to change any of the settings, you simply can’t.  It was designed so that your grandma could plug it in and get it working.  Everything is in the cloud.  The downfall is that, if you lose internet, you lose the ability to control your router…. even if you are home.

Here is where I realized that things weren’t right.  My IP address for the internal network was  ????  86?  What is that?  You can’t change it.  My OCD was having a hard time dealing with that.  Not a deal breaker though, I just had to go change ALL of my static IP assigned devices on the network to reflect the proper IP.  And then I got to the port forwarding.  So, I might be a bit lost here, but; if you have the ability to port forward, that would mean that you’s probably like to access something inside of your network from the outside (like a webserver, NAS drive, security cameras, etc.)  For me, it was the web server.  I get all of the port forwarding setup (which is weird, because the network inherently has DHCP, and the only way to have static is to setup DHCP IP reservations).  Again, not a problem, easily accomplished with finding the device name and assigning an IP reservation to it.  Once that’s done, you can configure port forwarding.  Here is the catch.  NAT loopback isn’t supported on the OnHub device.  It took me a minute to realize what they’ve done here.  Google has allowed port forwarding but disabled the ability for you to access your public IP address from within your own private network.  (let that sink in).  One of the MOST basic features of an stupid common and cheap router… NAT Loopback.  So, in a nutshell, if you want to setup an awesome NAS drive, Plex Media server, in home security cameras, web server, or any other DDNS related hardware that would require your external IP address from within your network; you can’t.  I’m sure I could try and access via a proxy server, but why?  If I can’t access my own network from within my network, then that makes this awesome piece of hardware useless.

The plus side to this piece of hardware is that you can set it in bridge mode.  After all of this, I disabled the wireless signals on my old Asus router and bridged the OnHub to be my wireless antenna.  It’s not the best setup because I have two routers right now, but until Google fixes this, I don’t see a good future for the OnHub in my house.