TP-Link Archer A1800 TX20U Plus on Raspberry

Do you need better Wi-Fi for your Raspberry Pi 3 Model B? The built-in Wi-Fi 4 (802.11n) is often too slow for modern tasks like high-definition streaming or high-volume data transfer.

The TP-Link Archer TX20U Plus (AX1800) depicted in Figure 1 offers strong performance for modern wireless networks. This external USB adapter offers superior range and speed capability. However, installing this modern Wi-Fi 6 hardware on an older Linux system like Raspberry Pi OS is not straightforward.

This guide provides a direct, step-by-step method how to compile the required drivers and configure the adapter. Note that due to current Linux driver limitations, the adapter will operate at Wi-Fi 5 (802.11ac) speeds, not the full Wi-Fi 6 standard. Even so, this is a massive performance boost for your Raspberry Pi 3B.

The Raspberry Pi 4 Model B already supports Wi-Fi 5 (802.11ac) natively, and the latest Raspberry Pi 5 even includes Wi-Fi 6 (802.11ax). Nevertheless, using TX20U Plus USB adapter can be highly beneficial for these models, as it provides a second Wi-Fi interface (NIC). This makes it ideal for advanced networking tasks such as creating a dedicated access point or a Wi-Fi bridge.

Figure 1 - TP-Link Archer TX20U Plus (AX1800)

Figure 2 summarizes the key parameters of the TP-Link Archer TX20U Plus (AX1800):

Figure 2 – Parameters of the TP-Link Archer TX20U Plus (AX1800)

1. Preventing USB Mode Switching and Driver Compilation

The installation process for the Archer TX20U Plus involves two critical steps before the adapter can be used:

  1. Forcing the device out of disk mode
  2. Compiling the custom Linux driver

1.1 Handling the USB Disk Mode

When connected to a USB port, the TP-Link AX1800 initially appears as a USB storage device containing the Windows driver. If the dmesg command output shows the device ID 0bda:1a2b, the adapter is currently mounted as a storage device (Figure 3).

You can verify this by checking the system messages:

$ sudo dmesg

Figure 3 - The TP-Link AX1800 appears to be a USB disk

To avoid this behavior, we must edit the udev rules. This rule instructs the system to execute the usb_modeswitch utility for this specific device.

Edit either file /usr/lib/udev/rules.d/40-usb_modeswitch.rules or /lib/udev/rules.d/40-usb_modeswitch.rules, depending on which one exists on your system. Add the following line before the last entry (Figure 4).

$ sudo vim /usr/lib/udev/rules.d/40-usb_modeswitch.rules

ATTR{idVendor}=="0bda", ATTR{idProduct}=="1a2b", RUN+="usb_modeswitch '/%k'"

Figure 4 - Editing File 40-usb_modeswitch.rules

1.2 Installing Dependencies and Compiling the Driver

Since there is no native kernel support for the Archer TX20U Plus chipset, we must compile a community-maintained driver.

The Linux wireless community owes special thanks to the late Larry Wayne Finger for his extensive contributions and maintenance of Realtek drivers.

First, install the necessary development dependencies:

$ sudo apt-get install make gcc linux-headers-$(uname -r) build-essential git bc

Next, clone the driver source code from the repository and navigate into the directory:

$ git clone https://github.com/lwfinger/rtl8852au.git
$ cd rtl8852au

Now, compile the driver, specifying the arm64 architecture for modern Raspberry Pi OS installations, and then install the new module:

$ make ARCH=arm64
$ sudo make install

The compiled driver 8852au.ko, is now successfully installed into the directory /lib/modules/$(uname -r)/kernel/drivers/net/wireless/realtek/rtw89/.

2. Loading the Driver and Verification

With the driver compiled and installed, we must now load it into the running Linux kernel.

Load the driver module:

$ sudo modprobe 8852au

Figure 5 - Checking if module 8852au is loaded in kernel

Reboot the Raspberry Pi after installing a new kernel module.

2.1 Verification and Speed Limitation

After the system restarts, the TP-Link adapter should be presented as a dedicated WLAN adapter. Confirm the successful driver load and interface recognition using dmesg:

$ sudo dmesg

Figure 6 - The TP-Link AX1800 as WLAN adapter 802.11ac

The output of lshw utility depicted in Figure 7 shows two wireless network interfaces that are recognized by the Debian OS.

The first interface, Interface:0, is the built-in, onboard Wi-Fi chip. It is a Broadcom product (43430) and is assigned the logical name wlan0. It uses the brcmfmac driver, which is standard for the internal Wi-Fi on many Raspberry Pi models.

The second interface is an external TP-link Archer AX1800 USB Wi-Fi adapter with  Realtek chipset. It is assigned the logical name wlan1 and utilizes the rtl8852au driver.

$ sudo lshw -c network

Figure 7 - Checking Wifi Interfaces with lshw

Important Limitation: Unfortunately, even though the adapter is 802.11ax (Wi-Fi 6) capable, the current Linux driver is limited to 802.11ac (Wi-Fi 5). This still provides a vast improvement in speed and stability over the built-in Wi-Fi 4 chip.

3. Wi-Fi Configuration

The built-in Raspberry Pi wireless NIC uses the interface name wlan0. Therefore, the TP-Link Wi-Fi Adapter will be assigned wlan1.

To connect your Raspberry Pi to your Wi-Fi network, create a new configuration file /etc/network/interfaces.d/wlan1. The example below uses the network name Redmi10 and password test123. Make sure to replace these with your actual network credentials.

$ sudo su

# ssid="Redmi10"
# wpa-psk="test123."

Create the configuration file for wlan1:

# echo "allow-hotplug wlan1" >> /etc/network/interfaces.d/wlan1
# echo "iface wlan1 inet dhcp" >> /etc/network/interfaces.d/wlan1
# echo "wpa-ssid $ssid" >> /etc/network/interfaces.d/wlan1
# echo "wpa-psk $wpa-psk" >> /etc/network/interfaces.d/wlan1

3.1 Activating the Interface

Once the network interface file is configured, activate the wlan1 interface to connect to your Wi-Fi network:

# ifup wlan1

Your Raspberry Pi 3B is now connected using the superior range and stability of the TP-Link Archer TX20U Plus.

Conclusion

By completing this process, you have successfully overcome the compatibility challenges of using a modern Wi-Fi 6 adapter on the Raspberry Pi 3B. Although constrained to 802.11ac speeds, the TP-Link Archer TX20U Plus delivers a great upgrade in wireless performance compared to the Pi's standard hardware.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.