deady1000
Posts: 23
Joined: Fri Oct 06, 2017 4:47 pm

Driver installation impossible? RTL8812AU

Sat Oct 07, 2017 2:16 pm

Hello guys,

I can nowhere find a working tutorial for how to install the driver for rtl8812au (AC1200 Wireless Adapters).
Is there some working solution available?

Thank you

MrEngman
Posts: 3722
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK

Re: Driver installation impossible? RTL8812AU

Sat Oct 07, 2017 2:35 pm

deady1000 wrote:
Sat Oct 07, 2017 2:16 pm
Hello guys,

I can nowhere find a working tutorial for how to install the driver for rtl8812au (AC1200 Wireless Adapters).
Is there some working solution available?

Thank you
I compile the rtl8812u drivers for Raspbian and they are available for people to download and install.

I have a script that will download and install the driver. It will determine the Raspbian kernel version and select the appropriate driver version.

Download and install the script using commands

Code: Select all

sudo wget http://fars-robotics.net/install-wifi -O /usr/bin/install-wifi
sudo chmod +x /usr/bin/install-wifi
To see info on how to use the script use command

Code: Select all

sudo install-wifi -h
To download the driver for your current Raspbian kernel use command

Code: Select all

sudo install-wifi
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

Please post ALL technical questions on the forum. Please Do Not send private messages.

deady1000
Posts: 23
Joined: Fri Oct 06, 2017 4:47 pm

Re: Driver installation impossible? RTL8812AU

Sat Oct 07, 2017 3:10 pm

Dear MrEngman I found your tutorial earlier but this does not work with my Raspberry.
The real device is found @USB and drivers are downloaded well.

The adapter even can connect to a wifi but with iwconfig I can't start monitor mode because the driver is not detected properly.
When I for example use airmon-ng to check whats going on I see that driver is not running well.
login as: pi
[email protected]'s password:
Linux raspberrypi 4.9.53-v7+ #1040 SMP Fri Oct 6 14:19:18 BST 2017 armv7l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sat Oct 7 14:55:02 2017
[email protected]:~ $ sudo su
[email protected]:/home/pi# install-wifi

*** Raspberry Pi wifi driver installer by MrEngman.
*** Performing self-update
*** Relaunching after update

*** Raspberry Pi wifi driver installer by MrEngman.

Your current kernel revision = 4.9.53-v7+
Your current kernel build = #1040

Checking for a wifi module to determine the driver to install.

Your wifi module is Bus 001 Device 004: ID 0bda:8812 Realtek Semiconductor Corp. RTL8812AU 802.11a/b/g/n/ac WLAN Adapter

And it uses the 8812au driver.

Checking for a new 8812au wifi driver module for your current kernel.
There is a driver module available for this kernel revision.
Downloading the 8812au driver.
Installing the 8812au driver.

Installing driver module 8812au.ko.
Syncing changes to disk
A version of the 8812au driver is already loaded and running.
You will need to reboot to load the new driver, 8812au.ko.

# I rebooted

[email protected]:/home/pi# iwconfig
eth0 no wireless extensions.

wlan1 unassociated Nickname:"<[email protected]>"
Mode:Managed Frequency=2.412 GHz Access Point: Not-Associated
Sensitivity:0/0
Retry:off RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0


lo no wireless extensions.

wlan0 IEEE 802.11 ESSID:"XXXXXXXX"
Mode:Managed Frequency:2.437 GHz Access Point: 34:81:C4:3C:6B:67
Bit Rate=72.2 Mb/s Tx-Power=31 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:on
Link Quality=62/70 Signal level=-48 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

[email protected]:/home/pi# airmon-ng

PHY Interface Driver Chipset

phy1 wlan0 brcmfmac Broadcom 43430
phy0 wlan1 ?????? Realtek Semiconductor Corp. RTL8812AU 802.11a/b/g/n/ac WLAN Adapter

[email protected]:/home/pi# iwconfig wlan1 mode monitor
[email protected]:/home/pi# airmon-ng

PHY Interface Driver Chipset

phy1 wlan0 brcmfmac Broadcom 43430
phy0 wlan1 ?????? Realtek Semiconductor Corp. RTL8812AU 802.11a/b/g/n/ac WLAN Adapter

[email protected]:/home/pi# iwconfig wlan1
wlan1 unassociated Nickname:"<[email protected]>"
Mode:Auto
Frequency=2.412 GHz Access Point: Not-Associated
Sensitivity:0/0
Retry:off RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

The adapter can work in usual "managed mode" but not in "monitor mode".
It always goes into "Auto mode" which is quite useless.

Furthermore the driver 8812au (how its detected on my laptop) is not detected --> "??????" (see Airmon-ng)

Nevertheless I would like to thank you for your work.
Please keep up doing such a good job.
Other driver installations were not even compiling properly.

deady1000
Posts: 23
Joined: Fri Oct 06, 2017 4:47 pm

Re: Driver installation impossible? RTL8812AU

Sun Oct 08, 2017 12:45 pm

I still have no clue whats the problem but when I enter "lshw -class network" it says that the working driver is "driver=rtl8821au".
Logical name is wlx00c0ca95e545 instead of wlan0 or wlan1.

Code: Select all

[email protected]:/home/XXX# lshw -class network
  *-network:0
       description: Ethernet interface
       physical id: 2
       logical name: enxb827eb2cbd88
       serial: b8:27:eb:2c:bd:88
       size: 10Mbit/s
       capacity: 100Mbit/s
       capabilities: ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autone                                                                                                                                                             gotiation
       configuration: autonegotiation=on broadcast=yes driver=smsc95xx driverver                                                                                                                                                             sion=22-Aug-2005 duplex=half firmware=smsc95xx USB 2.0 Ethernet link=no multicas                                                                                                                                                             t=yes port=MII speed=10Mbit/s
  *-network:1
       description: Wireless interface
       physical id: 3
       bus info: [email protected]:1.2
       logical name: wlx00c0ca95e545
       serial: 00:c0:ca:95:e5:45
       capabilities: ethernet physical wireless
       configuration: broadcast=yes driver=rtl8821au multicast=yes wireless=unas                                                                                                                                                             sociated
  *-network:2
       description: Wireless interface
       physical id: 4
       logical name: wlan0
       serial: b8:27:eb:79:e8:dd
       capabilities: ethernet physical wireless
       configuration: broadcast=yes driver=brcmfmac driverversion=7.45.41.26 fir                                                                                                                                                             mware=01-4527cfab ip=192.168.2.15 multicast=yes wireless=IEEE 802.11
Airmon-ng still can't even see the Adapter:

Code: Select all

[email protected]:/home/XXX# airmon-ng


Interface       Chipset         Driver

wlan0           Unknown         brcmfmac - [phy0]
wlan0 is RPis onboard adapter... RTL8812AU is missing here.

Is there someone who knows how I can get RTL8812AU to work on Raspberry?
If not I will have to return the adapter to the vendor.

Too bad.

MrEngman
Posts: 3722
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK

Re: Driver installation impossible? RTL8812AU

Sun Oct 08, 2017 2:38 pm

Don't know what your problem is, other than you want to use it in monitor mode, but the 8812au driver works fine on all my Pi ever since I started using it, B1, B+, 2B, 3B, 0, 0W.

Never seen lshw before but installed it on my Pi 0 W and it shows
[email protected]:~ $ sudo lshw -class network
*-network:0
description: Wireless interface
physical id: 2
logical name: wlan0
serial: b8:27:eb:cc:7e:89
capabilities: ethernet physical wireless
configuration: broadcast=yes driver=brcmfmac driverversion=7.45.41.46 firmware=01-f8a78378 ip=192.168.1.19 multicast=yes wireless=IEEE 802.11
*-network:1
description: Wireless interface
physical id: 3
bus info: [email protected]:1
logical name: wlan1
serial: 74:da:38:2a:d3:86
capabilities: ethernet physical wireless
configuration: broadcast=yes driver=rtl8821au ip=192.168.1.6 multicast=yes wireless=IEEE 802.11bgn
Currently running Raspbian Stretch 4.9.53+ #1040. Installed image 2017-09-07-raspbian-stretch-lite then ran rpi-update, apt-get update/upgrade and my install-wifi script to install the wifi driver and installed lshw which seems somewhat pointless as similar info is shown using ifconfig or iwconfig.
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

Please post ALL technical questions on the forum. Please Do Not send private messages.

deady1000
Posts: 23
Joined: Fri Oct 06, 2017 4:47 pm

Re: Driver installation impossible? RTL8812AU

Sun Oct 08, 2017 2:52 pm

MrEngman wrote:
Sun Oct 08, 2017 2:38 pm
Don't know what your problem is, other than you want to use it in monitor mode, but the 8812au driver works fine on all my Pi ever since I started using it, B1, B+, 2B, 3B, 0, 0W.
Thank you for your reply.

My problem is that I can't get into monitor mode.
Is it possible or not?

Could you please test
iwconfig wlan1 mode monitor
iwconfig

and show output?
Is it in "Auto" or "Monitor"?

Mine always just gets into Auto-Mode and monitor does not work.

Airmon-ng also does not see the adapter/driver.

Just to get that clear.
You say that when I install a fresh Raspbian, RPI-Update, apt-get update/upgrade, Install-wifi-script then I can get it into monitor mode?
Will try it again then...

MrEngman
Posts: 3722
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK

Re: Driver installation impossible? RTL8812AU

Sun Oct 08, 2017 3:09 pm

deady1000 wrote:
Sun Oct 08, 2017 2:52 pm
You say that when I install a fresh Raspbian, RPI-Update, apt-get update/upgrade, Install-wifi-script then I can get it into monitor mode?
No, I did not say I used in in monitor mode. I have no idea if it could work in monitor mode. Probably not as you have found.
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

Please post ALL technical questions on the forum. Please Do Not send private messages.

deady1000
Posts: 23
Joined: Fri Oct 06, 2017 4:47 pm

Re: Driver installation impossible? RTL8812AU

Sun Oct 08, 2017 3:34 pm

Ok I came a little closer. MAYBE.
I connected the RTL8812AU to my smartphone hotspot.
Suddenly I could see the RTL8812AU in airmon-ng (Adapter started blinking blue, not kept black as before).

Code: Select all

[email protected]:~# airmon-ng


Interface       Chipset         Driver

wlx00c0ca95e545         Unknown         rtl8821au - [phy2]
wlan0           Unknown         brcmfmac - [phy0]
So now I can see it in Airmon-ng and it appears that it now uses this driver.
When I now do:

Code: Select all

airmon-ng start wlx00c0ca95e535
(which is a damn long command - any possibility to rename it??)

-->

Code: Select all

Found 6 processes that could cause trouble.
If airodump-ng, aireplay-ng or airtun-ng stops working after
a short period of time, you may want to kill (some of) them!

PID     Name
589     avahi-daemon
630     avahi-daemon
655     NetworkManager
775     wpa_supplicant
790     dhclient
3741    dhclient
Process with PID 3741 (dhclient) is running on interface wlx00c0ca95e545
Process with PID 790 (dhclient) is running on interface wlan0


Interface       Chipset         Driver

wlx00c0ca95e545         Unknown         rtl8821au - [phy2]
wlan0           Unknown         brcmfmac - [phy0]
Then iwconfig says that wlx00c0ca95e545 still is in managed mode.
So nothing happened.

When I type

Code: Select all

airmon-ng check kill
to kill the processes which maybe obstruct the mode change

--> RTL8812AU disconnects from smartphone hotspot and disappears in Airmon-ng :cry:
MrEngman wrote: No, I did not say I used in in monitor mode. I have no idea if it could work in monitor mode. Probably not as you have found.

:( :( :(

Image

MrEngman
Posts: 3722
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK

Re: Driver installation impossible? RTL8812AU

Sun Oct 08, 2017 4:21 pm

The long name you see for your wifi is how Raspbian Stretch originally named network devices. It was changed in the new updates so why you still see it like that I'm not sure. I think there is an option in raspi-config that will enable you to get the name back to wlanx, etc.

I had a look at the driver source github and it looks like it can operate in monitor mode but may have some problems. There are a couple of issues here https://github.com/diederikdehaas/rtl8812AU/issues regarding monitor mode.

Tried these commands and they look OK

Code: Select all

sudo iwconfig wlan1 mode monitor
sudo iwconfig wlan1 mode auto
and don't give any errors.
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

Please post ALL technical questions on the forum. Please Do Not send private messages.

User avatar
DougieLawson
Posts: 34114
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: Driver installation impossible? RTL8812AU

Sun Oct 08, 2017 4:25 pm

There's an option in sudo raspi-config to disable predictable interface names and go back to wlanX,
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

2012-18: 1B*5, 2B*2, B+, A+, Z, ZW, 3Bs*3, 3B+

Any DMs sent on Twitter will be answered next month.

deady1000
Posts: 23
Joined: Fri Oct 06, 2017 4:47 pm

Re: Driver installation impossible? RTL8812AU

Sun Oct 08, 2017 11:01 pm

Ok I was running Ubuntu Mate today.
Now with a fresh Raspbian I could change it in the config as you said.

I made a clean install of all updates and installed the wifi driver but still I cant get monitor mode to work.
MrEngman wrote:Tried these commands and they look OK

Code: Select all

sudo iwconfig wlan1 mode monitor
sudo iwconfig wlan1 mode auto
and don't give any errors.
No there wont be errors but when you check "iwconfig" you will see that the adapter goes into "AUTO" and not "MONITOR".
So basically nothing really happens.

When I do this on my laptop it goes into "MONITOR".
Thats the difference.

By the way. Now with airmon-ng the adapter directly appears but again without the driver specs.
It says "??????" again.

This is so annoying. Nothing is working... Guess I'll have to return the adapter.
I can't be the only person who wants to use a raspberry pi with rtl8812au in monitor mode. :|

deady1000
Posts: 23
Joined: Fri Oct 06, 2017 4:47 pm

Re: Driver installation impossible? RTL8812AU

Tue Oct 10, 2017 3:18 pm

I just returned the AWUS036ACH and bought AWUS052NH with Ralink RT3572 Chipset.
Hopefully this is better supported.

Thank you

Schorschi
Posts: 205
Joined: Thu Nov 22, 2012 9:38 pm

Re: Driver installation impossible? RTL8812AU

Tue Apr 10, 2018 6:52 pm

Just for reference... Got the driver in install-wifi (version 4.3.14) to work with RTL8811AU chip wifi dongle. This is even on kernel 4.14.33(-v7+) no less. But any newer version of the driver source, say 4.3.20 for example, the RTL8812AU driver does not see the RTL8811AU chip. Not have I found any of the GitHub sources to work that newer than 4.3.14 from ether the RTL8812AU or RTL8811AU driver sets.

FogHorn
Posts: 1
Joined: Thu Jul 26, 2018 1:33 am

Re: Driver installation impossible? RTL8812AU

Thu Jul 26, 2018 1:37 am

MrEngman, thank you for your script. It worked perfectly for me on my Model B Rev 2 with the latest raspbian installed. Bravo!

letshin
Posts: 2
Joined: Thu Sep 13, 2018 8:44 pm

Re: Driver installation impossible? RTL8812AU

Thu Sep 13, 2018 8:46 pm

Hi, I've trying installing the RTL8812AU driver using your script, MrEngman, but have faced this error:
install -p -m 644 8812au.ko /lib/modules/4.14.62-v7+/kernel/drivers/net/wireless
depmod: FATAL: Module index: bad character '\ufffd'=0xe1 - only 7-bit ASCII is supported:
qpp_ddfl\ufffdte
Loading and running the 8812au driver, 8812au.ko.
modprobe: FATAL: Module 8812au not found in directory /lib/modules/4.14.62-v7+
Could anyone help please?

MrEngman
Posts: 3722
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK

Re: Driver installation impossible? RTL8812AU

Fri Sep 14, 2018 6:40 am

letshin wrote:
Thu Sep 13, 2018 8:46 pm
Hi, I've trying installing the RTL8812AU driver using your script, MrEngman, but have faced this error:
install -p -m 644 8812au.ko /lib/modules/4.14.62-v7+/kernel/drivers/net/wireless
depmod: FATAL: Module index: bad character '\ufffd'=0xe1 - only 7-bit ASCII is supported:
qpp_ddfl\ufffdte
Loading and running the 8812au driver, 8812au.ko.
modprobe: FATAL: Module 8812au not found in directory /lib/modules/4.14.62-v7+
Could anyone help please?
Hi letshin,

I install that driver on all my different Pi (Pi 0, P0W, B+, 2B, 3B, 3B+) with my script and I don't see any problems so I'm sure it is not an issue with the driver or my script.

When a driver is installed it needs to be registered and this is done using the depmod command. It updates a number of files as far as I know to create a list of available modules/drivers the kernel is able to use and it is possible one of the files it is trying to update may be corrupt.

One other thing is the value 'qpp_ddfl\ufffdte' it is showing. I don't know what this is but could it be a corrupt file? I don't know, but if it is is it this that is causing your issue. You could try searching for 'qpp_ddfl' or 'ufffdte' in the modules directory to see if they exist and deleting them if they do.

Then try running command sudo depmod -a again to see if it works.
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

Please post ALL technical questions on the forum. Please Do Not send private messages.

letshin
Posts: 2
Joined: Thu Sep 13, 2018 8:44 pm

Re: Driver installation impossible? RTL8812AU

Sat Sep 15, 2018 9:46 am

Thanks. There was a corrupted folder as you suspected. I'll just write down what I did here in case someone has a similar issue.

I searched for non-ASCII characters:

LC_ALL=C find . -name '*[! -~]*'

Then deleting the offending file and all directories, rerunning sudo depmod -v returned no errors, and I was then able to load the module with sudo modprobe -r 8812au.

MattInNNJ
Posts: 1
Joined: Sat Sep 22, 2018 7:58 pm

Re: Driver installation impossible? RTL8812AU

Sat Sep 22, 2018 8:08 pm

Getting this error message. Everything seems to look ok on my end. Any help is greatly appreciated!

"[email protected]:~ $ sudo wget http://fars-robotics.net/install-wifi -O /usr/bin/i nstall-wifi
--2018-09-22 15:52:05-- http://fars-robotics.net/install-wifi
Resolving fars-robotics.net (fars-robotics.net)... 212.23.8.80
Connecting to fars-robotics.net (fars-robotics.net)|212.23.8.80|:80... connected .
HTTP request sent, awaiting response... 200 OK
Length: 17088 (17K) [text/plain]
Saving to: ‘/usr/bin/install-wifi’

/usr/bin/install-wi 100%[===================>] 16.69K 80.2KB/s in 0.2s

2018-09-22 15:52:19 (80.2 KB/s) - ‘/usr/bin/install-wifi’ saved [17088/17088]

[email protected]:~ $ sudo chmod +x /usr/bin/install-wifi
[email protected]:~ $ sudo install-wifi -h

*** Raspberry Pi wifi driver installer by MrEngman.
*** Performing self-update
!!! Failed to download update for install-wifi!
!!! Make sure you have ca-certificates installed and that the time is set correctly
[email protected]:~ $ date
Sat Sep 22 15:54:09 EDT 2018
"

Doriangrey
Posts: 1
Joined: Tue Oct 16, 2018 8:10 am

Re: Driver installation impossible? RTL8812AU

Tue Oct 16, 2018 8:13 am

Had anyone luck with this Network adapter?
I am Facing the exact same problem and tried different things.

Im having all the time

Code: Select all

[email protected]:/home/pi# airmon-ng

PHY Interface Driver Chipset

phy1 wlan0 brcmfmac Broadcom 43430
phy0 wlan1 ?????? Realtek Semiconductor Corp. RTL8812AU 802.11a/b/g/n/ac WLAN Adapter

Hootie81
Posts: 1
Joined: Thu Oct 18, 2018 8:25 am

Re: Driver installation impossible? RTL8812AU

Thu Oct 18, 2018 8:32 am

MrEngman,
Thanks for the driver, works a treat!

Im trying to increase the speed of my AP and need to know the ht_capab and vht_capab flags enabled in the driver to put in hostapd.conf

And idea where i could find them? i have seen a post somewhere that the ht ones are listed with "iw list" but the vht ones he had to find in source code.

Thanks,

MrEngman
Posts: 3722
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK

Re: Driver installation impossible? RTL8812AU

Thu Oct 18, 2018 9:44 pm

Hootie81 wrote:
Thu Oct 18, 2018 8:32 am
MrEngman,
Thanks for the driver, works a treat!

Im trying to increase the speed of my AP and need to know the ht_capab and vht_capab flags enabled in the driver to put in hostapd.conf

And idea where i could find them? i have seen a post somewhere that the ht ones are listed with "iw list" but the vht ones he had to find in source code.

Thanks,
Hi Hootie81,

Sorry, but I don't think I can help. I compile several wifi drivers but knowing the internals of the drivers and how they work is a totally different matter. I tried command iw list and it outputs a load of data but whether that is useful I don't know.

If it helps the source I use is from https://github.com/diederikdehaas/rtl8812AU
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

Please post ALL technical questions on the forum. Please Do Not send private messages.

Return to “Raspbian”