4

This question already has an answer here:

I have recently purchased an Edimax EW7811UTC AC WiFi adapter for use with my Raspberry Pi 3b running Raspbian Jessie with Pixel desktop. This WiFi dongle uses the rtl8812au chipset and the driver for this chipset is not included in Raspbian releases. (It is included in distributions like OpenELEC)

Google is absolutely filled with people trying, troubleshooting and failing to get the driver downloaded or installed for chipsets like rtl8812au.

Where do I get the driver for this chipset and how do I install this driver after I've acquired it?

marked as duplicate by Ghanima Nov 12 '17 at 12:41

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • What happens when you connect it? – BantuTech May 30 '17 at 11:01
  • This question is not a duplicate, as the linked question encounters an error while installing a driver and is about an error in make during installation of the driver both OP and I are talking about. – Zimano Nov 12 '17 at 21:39
  • @Zimano is correct. This is not a duplicate. – Rob S. Nov 13 '17 at 16:30
7

After hours of reading threads and following guides here and there, the definitive guide that got the driver working was here. Following the steps listed in that post:

$ # install necessary software
$ sudo apt-get update
$ sudo apt-get install bc git

$ # download raspbian kernel sources, takes some minutes
$ sudo wget "https://raw.githubusercontent.com/notro/rpi-source/master/rpi-source" -O /usr/bin/rpi-source
$ sudo chmod 755 /usr/bin/rpi-source
$ rpi-source

$ # download the rtl8812au kernel driver and compile it, takes some minutes
$ git clone "https://github.com/gnab/rtl8812au"
$ cd rtl8812au
$ 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
$ make

$ # copy the driver and use it
$ sudo cp 8812au.ko /lib/modules/`uname -r`/kernel/drivers/net/wireless
$ sudo depmod -a
$ sudo modprobe 8812au

$ # check wlan0 interface appeared
$ ifconfig
$ iwconfig

The last comment says #check wlan0 interface appeared but if you still have the RPi on-board WiFi activated, the dongle will appear as wlan1. I recommend that you disable the on-board WiFi chip in order to save power and avoid causing interference if you'll be using a 2.4Ghz band.

These steps worked out flawlessly and soon after and I was connected to an ASUS AC1900 (802.11ac dual-band 5Ghz) router. As of the latest edit to this post I have been using the dongle for about 2 days for about 10 hours a day without problems.


Side note: There are many posts by MrEngman on the Raspberry Pi forums answering questions related to the Realtek WiFi chipset drivers and you'll encounter many 404'd Dropbox links to drivers and install-wifi shell scripts attributed to MrEngman. I didn't follow any of them as the information was too fragmented and he does not seem active anymore. When following any of his tips or hints, be sure to go to his site first and follow the information there; don't go forum diving in old threads. Especially when there's different drivers, kernels and versions at play.

  • If the 88x2 dongle you are trying to use happens to be an Archer T4U, make the following adjustments to the above scripts: Use wget to download the kernel driver from static.tp-link.com/2018/201810/20181018/… and change the platform to be CONFIG_PLATFORM_BCM2709. Driver name is 88x2bu instead of 8812au. Everything else should work as written. – svenyonson Jan 30 at 22:18
0

"In normal circumstances there is NEVER a need to run rpi-update as it always gets you to the leading edge firmware and kernel and because that may be a testing version it could leave your RPi unbootable". https://www.raspberrypi.org/forums/viewtopic.php?p=916911#p916911 Even the rpi-update documentation now warns "Even on Raspbian you should only use this with a good reason. This gets you the latest bleeding edge kernel/firmware."

The best and easiest way to handle this problem is as following

  1. sudo wget http://www.fars-robotics.net/install-wifi -O /usr/bin/install-wifi
    • Downloads the installation file
  2. sudo chmod +x /usr/bin/install-wifi
    • makes it executable
  3. Installation process
    • sudo install-wifi -c rpi-update
      - check for driver if rpi-update is run.
    • sudo rpi-update
      - if a driver is available you can run rpi-update to update firmware.
    • sudo install-wifi -u rpi-update
      - then update the driver for the new kernel installed by rpi-update.
    • sudo reboot
      - now reboot to update the kernel with the new wifi driver.
  • 3
    Please stop posting identical (first, second, this one is third) answers to multiple questions. Instead please answer once and mark the other questions as duplicates. – techraf Nov 12 '17 at 12:07

Not the answer you're looking for? Browse other questions tagged or ask your own question.