Install Driver for TP-Link TL-WN823N in Raspberry Pi 2 Model B

Recently I brought TP-Link TL-WN823N wireless USB adapter to connect my Raspberry Pi over wireless network. Mine is Raspberry Pi 2 Model B, so not having built in wireless capability. I chose it over Edimax EW-7811Un because of its 300 Mbps speed, both were available on with similar price.

It did not get detected out of box when plugged into my laptop running Ubuntu 16.04. The driver available at TP-Link website could not be installed because it was for older version of kernel. However, I could easily find driver over Googling and it worked fine.

Then I tried to make it work on my Raspberry Pi 2 model B. As expected it did not get detected. I searched over Internet for driver installation. I could see many postings around installing driver for Raspberry Pi but most of them were outdated and did not work for me. Finally I could find a way to install driver after searching further and trying many methods.

First, create directory to keep the driver source files in a common place if you don't have it already.

mkdir drivers && cd drivers

Install Prerequisites

I used latest Raspbian Jessie released on 5th of July 2017. For me it required only to install kernel header files as shown below.

sudo apt-get install raspberrypi-kernel-headers

Get Driver Source

Get the driver source files hosted at github repo The driver source seems like for D-Link DWA-131, which is having same chipset, rtl8192eu, as my TP-Link TL-WN823N v2.

We have to clone realtek-4.4.x branch, which is for Linux kernel 4.4. However it worked for my Raspbian having kernel version 4.9.35.

git clone --branch realtek-4.4.x

Build and Install Driver from Source

Now we can build and install the driver.

cd rtl8192eu-linux-driver/
sudo dkms add .
sudo dkms install rtl8192eu/1.0

If everything went well, then WiFi adapter should get detected once you restarted networking service or rebooted Pi.