Trouble installing tp link tl-wn821N V5 on 16.04

I am trying to install the USB wifi adapter: tp-link TL-WN821N V5.

I found a driver for the V5 version but it won't compile. In the manual of the Linux driver it is said that the driver is for: 14.04.01 with GCC v4.8.2. My Linux edition is Ubuntu 16.04 with GCC v5.3.1.

I’ve run lsusb but my USB adapter wasn't listed:

Bus 001 Device 004: ID 2357:0107
Bus 001 Device 003: ID 0781:5406 SanDisk Corp. Cruzer Micro U3
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 046d:c52e Logitech, Inc. MK260 Wireless Combo Receiver
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

I've run lsusb with and without the adapter plugged and without the adapter the line

The adapter works on Win 7 after installing the appropriate driver.

Bus 001 Device 004: ID 2357:0107

was missing.


Solution 1:

You are in luck as I made a commit on github that enables that device. We will use Mange's github as he included the commit and has dkms support so the driver will automatically get rebuilt for a kernel update.

You will need to have Secure Boot disabled if your computer is equipped with that feature

sudo apt-get install build-essential linux-headers-generic dkms git
git clone https://github.com/Mange/rtl8192eu-linux-driver.git
sudo dkms add ./rtl8192eu-linux-driver
sudo dkms install rtl8192eu/1.0

Reboot

If you do not have an active internet connection download https://github.com/Mange/rtl8192eu-linux-driver/archive/master.zip Transfer the file to the Ubuntu install, then extract it to the desktop. Then in terminal

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

Reboot

EDIT to add:

Now that you have installed it using make, I would suggest

cd Desktop/rtl8192eu-linux-driver
make clean

Before you install dkms with sudo apt-get install dkms and install the driver using the dkms commands