How to get a Netgear A6100 WiFi USB adapter to work on a Raspberry Pi.

… or how to get unsupported stuff to work on Linux.

Every now and then, you are likely to find yourself with an unsupported gadget or two.

In my case I needed a wifi adapter for my new Raspberry Pi 2. Rather than consult the lists and order one online (the right thing to do) I let my impatience get the better of me and grabbed a Netgear A6100 while passing through local electronics store.

Netgear is a well known brand, should be supported, Raspberry Pi’s support all manner of devices out of the box, dont they?

Unfortunately the Netgear A6100 did not work, and a little research showed this particular device was not on the supported WiFi gadgets list.  Hmm…

Rather than dropping it in the unused bits box and waiting for a supported device to arrive, this seems like the perfect opportunity to get another strange and perverse contraption to work.

The need – a Raspbian Linux device driver for the Netgear A6100 WiFi USB adapter


After a little googling, I found that a Netgear A6100 needs the Realtek rtl8812au driver.  There are copies of the source available on github.  In order to build a device driver you first need to have the source code for your running kernel.  This is where the fun starts :).

Before we start, a few useful resources

  • Linux Kernel in a Nutshell contains a great introduction to building the Linux kernel and device drivers from source and explains many of the concepts you will need to get started.  The book was written by Greg Kroah-Hartman one half of the Linux stable release team. This can save you a lot of time.
  • The Raspberry Pi Foundation Kernel Building and Configuring the Kernel pages give you the specifics you will need to build a Raspberry Pi kernel and device drivers.
  • There is a concise description of how to compile the Raspberry Pi kernel at
  • It is useful to grab the example Hello World loadable kernel module.  If you can get this to work then you are more than half way there.

Building and installing the kernel

Before you can build a device driver a copy of the kernel source is needed.  This needs to be the same version as the operating system you are running or the driver will not load.  You can either search for the source to your current kernel, or build and install a new kernel.

The Raspberry Pi is underpowered compared to a typical Intel based workstation.  If you plan to rebuild the kernel frequently then cross compiling on a more powerful system may be a better choice.

The instructions here are for rebuilding a new kernel directly on the Raspberry Pi.

It is a good idea to build your Linux kernel from a user account, and not the root account.  The additional permissions of the root account are not needed until you are ready to install the kernel.

The Raspberry Pi comes with two different chipsets, one for the earlier models A, B and B+, and one for the newer Raspberry Pi 2.  Some of the steps are slightly different depending on which model you are building for.

Login under your pi account, download the latest linux kernel source from the GitHub and install any required additional software:

$ git clone --depth=1
$ cd linux
$ sudo apt-get install bc ncurses-dev

Configure the kernel.  It is best to start with the default configuration and modify it if needed.

To load the default configuration for Raspberry Pi models A, B, B+
$ make bcmrpi_defconfig

To load the default configuration for the Raspberry Pi 2
$ make bcm2709_defconfig

Alternately you could copy the current running kernels configuration if it is available.
$ gunzip -d -c /proc/config.gz >.config

You may need to modify the configuration to remove an unneeded module.  In my case one of the ADSL drivers did not build correctly so I removed it.  Another reason to do this is to trim down the running kernel to just the components you need.

$ make menuconfig
Search for and disable any modules you don't want.

The make -j n switch can be used to build the kernel in parallel, saving time.  Usually you would set n to two times the number of processors.  For example on a Raspberry Pi 2 you could use -j 8.

Time to build the kernel

$ make -j 8
$ make -j 8 modules

And finally to install the kernel you will need access to the root account

$ sudo make modules_install
$ sudo make install

For Raspberry Pi models A, B, B+
$ sudo cp arch/arm/boot/Image /boot/kernel.img     
For the Raspberry Pi 2
$ sudo cp arch/arm/boot/Image /boot/kernel7.img

Reboot your Raspberry Pi and check with uname -r that you are running the version you expect.

Building and loading the Hello World example module is a great way to test that everything is in order before moving on to build the driver.

Building the Netgear A6100 device driver

A quick search on GitHub should bring up a couple of rtl8812au drivers.  One example:

Copy the driver
$ git clone

You will need to make sure that the version you downloaded supports the A6100 device.

Insert the A6100 dongle 
$ dmesg     
[ 3.607714] usb 1-1.4: Product: 802.11ac WLAN Adapter 
[ 3.615123] usb 1-1.4: Manufacturer: Realtek 

This shows that the device is recognised by the hardware.

$ lsusb
Bus 001 Device 004: ID 0846:9052 NetGear, Inc.

The ID numbers are used by the operating system to locate the required device driver.  By searching the driver source code for this ID you can confirm that it supports your device.

$ grep -i -R USB_DEVICE rtl8812au | grep 0846 
rtl8812au/os_dep/linux/usb_intf.c: {USB_DEVICE(0x0846, 0x9052),.driver_info = RTL8821}, /* Netgear - A6100 */

Now that we know we have the right driver source, it is time to build and test the driver.

$ make
$ sudo insmod 8812au.ko

If this is successful your new wireless interface will be visible to ifconfig or wpa_gui, the WiFi config application.

Install the module by copying it to its new home and updating the kernel dependencies.  Sometimes the make file can do this for you, however you can do this by hand with:

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

You should now be able to configure your new Netgear A6100 WiFi adapter.  The instructions can be found here.

IMG_0053One happily working gadget

Fool me once, shame on you, fool me twice, …

A few days after purchasing the Netgear A6100 I was shopping in a different store and noticed the Edimax USB adapters.

Hmm… Edimax was on the supported list …

I will post an update when I find a way to get the Edimax AC450 to work.

Because it just had to be built!