TP-Link Archer T9UH on Manjaro Linux (Arch Linux)

TP-Link Archer T9UH on Manjaro Linux (Arch Linux)

07 Nov 2019, 01:14pm TZ +05:30
linux, manjaro, WiFi
tips

It was a Deepawali 2019 purchase for October. But finally arrived in November.

TP-Link Archer T9UH an Excellent low cost AC1900 Dual Band (2.4GHz and 5GHz) WiFi USB 3.0 Dongle

Mine was a V2 version, which I realized later.

TP-Link Archer T9UH WiFi Dual Band USB 3.0 Dongle
Fig: TP-Link Archer T9UH WiFi Dual Band USB 3.0 Dongle
Source: TP-Link Archer T9UH

Let’s look how it faired for me! - without loosing my sleep of it.

May be it might help you in some way.

I had poor WiFi connection on my old Thinkpad W540. Ya, Its a Thinkpad. And, yes I am a fan of the old IBM Thinkpads.

In the past I had test out many TP-Link dongles.

There were not many working ones on Arch or even Linux.

One user had suggested on the forums of Manjaro about this. Hence my immediate impatient purchase. Well to my dismay it was not plug-n-play.

So, I found the way around and got it working. Let’s look at how to make this WiFi USB 3.0 dongle to work.

Here is the Product Page for TP-Link Archer T9UH :

https://www.tp-link.com/in/home-networking/adapter/archer-t9uh/

In the support section we find a guide of linux. This was of no use since they don’t provide the driver source.

I really liked the performance of TP-Link Archer T9UH USB3.0 Dual Band WiFi USB Dongle. Here is a review of the TP-Link WiFi Dongles :

So, I decided to dig a bit deeper.

Note: In my case I had the V2 version of the dongle.

Found the Driver #

After a bit of digging(References below), I found the desired AUR package.

https://aur.archlinux.org/packages/rtl88xxau-aircrack-dkms-git/

Well, this is a Driver hence we have some preparations that are in order.

1. Compiler and toolchain #

First, We need to have gcc installed and a tail of tools to help compile drivers.

1
sudo pacman -S gcc make binutils dkms

Recently I learned that we can do an repository update and install in same command.

Use this new command instead.

1
sudo pacman -Syyu gcc make binutils dkms

Note: The dkms would help to dynamically load the new module. Even though its not compiled into the kernel.

2. Kernel Headers #

Well, people might call it DARK Vooodo magic whenever use kernel word.

But, thats not always true.

We compiling a Module a.k.a Driver for Windows folks.

Hence we need the OS Header files.

Lets first find out our kernel:

1
2
$ uname -a
Linux myw540 4.19.81-1-MANJARO #1 SMP PREEMPT Tue Oct 29 12:49:04 UTC 2019 x86_64 GNU/Linux

This does identify my Manjaro Linux but where is the kernel !!

Here you go:- 4.19.81-1-MANJARO

The LTS Kernel in November of 2019 = 4.19.81.

I use the LTS Kernels only.

There is alternative way or GUI-way.

  1. Open Manjaro Settings from menu
  2. Select Kernel
  3. Here you can find the running kernel version.

Manjaro Settings window
Fig: Manjaro Settings Window
Source: My Thinkpad W540 Manjaro Install

Manjaro Kernel actively running
Fig: Manjaro Settings -> Kernel Window
Source: My Thinkpad W540 Manjaro Install

Let’s install the Headers :

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
$ sudo pacman -Syyu linux-headers

:: Synchronizing package databases...
 core                                     149.9 KiB   172 KiB/s 00:01 [#######################################] 100%
 extra                                   1772.0 KiB   808 KiB/s 00:02 [#######################################] 100%
 community                                  5.3 MiB  1485 KiB/s 00:04 [#######################################] 100%
 multilib                                 184.4 KiB  3.60 MiB/s 00:00 [#######################################] 100%
:: There are 10 providers available for linux-headers:
:: Repository core
   1) linux316-headers  2) linux414-headers  3) linux419-headers  4) linux44-headers  5) linux49-headers
   6) linux52-headers  7) linux53-headers  8) linux54-headers
:: Repository community
   9) linux419-rt-headers  10) linux52-rt-headers

Enter a number (default=1): 3
:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...

Packages (1) linux419-headers-4.19.81-1

Total Download Size:    8.46 MiB
Total Installed Size:  43.68 MiB

:: Proceed with installation? [Y/n] y

....

This would install the required Linux Headers.

3. Install AUR Package #

After a bit of hit and trial I found this package does the best.

https://aur.archlinux.org/packages/rtl88xxau-aircrack-dkms-git/

So, let’s do our usual steps:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15

git clone https://aur.archlinux.org/rtl88xxau-aircrack-dkms-git.git

...

cd rtl88xxau-aircrack-dkms-git

...

makepkg -s

...

sudo pacman -U rtl88xxau-aircrack-dkms-git-*.pkg.tar.xz

Note: This package generation might require dkms install in case it was missed earlier.

Now Reboot your PC and the TP-Link Archer T9UH WiFi USB 3.0 Dongle will become plug-and-play.

In fact if you carefully following earlier - we have installed rtl88xxau-aircrack-dkms-git. Well thats aircrack-ng kernel.

Aircrack-ng kernel module for Realtek 88XXau (USB adapters only) network cards (8811au, 8812au, 8814au and 8821au chipsets) with monitor mode and injection support

Its an “Aircrack-ng kernel module”. You know what that brings in ;-) All types of Packet injection and penetration testing action is now enabled.

The Dark lord smiles down upon us !! May the Black hat be with you …

I don’t know much of the Security Theater. Those who have friends in this domain ask them about aircrack-ng. Best of luck with that !

Note: This installation works for TP-LINK Archer T4U V2. For older V1 use the References below.

References #

  1. In case you have TP-Link Archer T9UH V1 : Then this one is better
  2. This one actually lead me to this solution
  3. This one works for Ubuntu If you need -