Ubuntu – TL-WN722N is not recognized

16.04atherosdriversnetworkingnic

I'm relatively new to Linux. I'm running Ubuntu GNOME (4.8.0-36-generic) on my laptop (Dell Inspiron 5520 15R). I've bought TP-LINK TL-WN722N usb wireless adapter with Atheros AR9271 chipset but my computer doesn't recognize the device. I tried the device on Windows (on the same laptop) and it works perfectly fine out-of-the-box.

Here's the output of lsusb

Bus 002 Device 003: ID 8087:07da Intel Corp. 
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 004: ID 0c45:644a Microdia 
Bus 001 Device 003: ID 0bda:0129 Realtek Semiconductor Corp. RTS5129 Card Reader Controller
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 003: ID 2357:010c  
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

I unplugged the device, as root, ran journalctl -fa and plugged the device in. The following showed up in the log:

May 06 17:03:30 nashjr kernel: usb 3-1: new high-speed USB device number 5 using xhci_hcd
May 06 17:03:30 nashjr kernel: usb 3-1: New USB device found, idVendor=2357, idProduct=010c
May 06 17:03:30 nashjr kernel: usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
May 06 17:03:30 nashjr kernel: usb 3-1: Product: 802.11n NIC
May 06 17:03:30 nashjr kernel: usb 3-1: Manufacturer: Realtek
May 06 17:03:30 nashjr kernel: usb 3-1: SerialNumber: 00E04C0001
May 06 17:03:30 nashjr mtp-probe[13260]: checking bus 3, device 5: "/sys/devices/pci0000:00/0000:00:14.0/usb3/3-1"
May 06 17:03:30 nashjr mtp-probe[13260]: bus: 3, device: 5 was not an MTP device
May 06 17:03:35 nashjr systemd[1]: Started CUPS Scheduler.

The output of sudo lshw -class network:

*-network               
       description: Ethernet interface
       product: RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:07:00.0
       logical name: enp7s0
       version: 05
       serial: e0:db:55:d0:13:7b
       size: 10Mbit/s
       capacity: 100Mbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=half firmware=rtl_nic/rtl8105e-1.fw latency=0 link=no multicast=yes port=MII speed=10Mbit/s
       resources: irq:26 ioport:2000(size=256) memory:c1404000-c1404fff memory:c1400000-c1403fff
  *-network
       description: Wireless interface
       product: Centrino Wireless-N 2230
       vendor: Intel Corporation
       physical id: 0
       bus info: pci@0000:08:00.0
       logical name: wlp8s0
       version: c4
       serial: 84:a6:c8:e2:3f:c4
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
       configuration: broadcast=yes driver=iwlwifi driverversion=4.8.0-36-generic firmware=18.168.6.1 ip=192.168.2.10 latency=0 link=yes multicast=yes wireless=IEEE 802.11
       resources: irq:31 memory:c1500000-c1501fff

The output of lspci:

00:00.0 Host bridge: Intel Corporation 3rd Gen Core processor DRAM Controller (rev 09)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor PCI Express Root Port (rev 09)
00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)
00:14.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller (rev 04)
00:16.0 Communication controller: Intel Corporation 7 Series/C216 Chipset Family MEI Controller #1 (rev 04)
00:1a.0 USB controller: Intel Corporation 7 Series/C216 Chipset Family USB Enhanced Host Controller #2 (rev 04)
00:1b.0 Audio device: Intel Corporation 7 Series/C216 Chipset Family High Definition Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation 7 Series/C216 Chipset Family PCI Express Root Port 1 (rev c4)
00:1c.1 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 2 (rev c4)
00:1d.0 USB controller: Intel Corporation 7 Series/C216 Chipset Family USB Enhanced Host Controller #1 (rev 04)
00:1f.0 ISA bridge: Intel Corporation HM77 Express Chipset LPC Controller (rev 04)
00:1f.2 SATA controller: Intel Corporation 7 Series Chipset Family 6-port SATA Controller [AHCI mode] (rev 04)
00:1f.3 SMBus: Intel Corporation 7 Series/C216 Chipset Family SMBus Controller (rev 04)
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Thames [Radeon HD 7500M/7600M Series] (rev ff)
07:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller (rev 05)
08:00.0 Network controller: Intel Corporation Centrino Wireless-N 2230 (rev c4)

The output of rfkill list all:

1: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: no
2: hci0: Bluetooth
    Soft blocked: no
    Hard blocked: no

So I downloaded backports-4.4.2-1 (That was the latest version I could find) and followed this tutorial for
How to install driver for TP-Link TL-WN722N on Ubuntu 14.04?

When I ran sudo make I got these errors at the end of the process:

/home/nashjr/Downloads/backports-4.4.2-1/net/wireless/nl80211.c: In function ‘nl80211_send_iface’:
/home/nashjr/Downloads/backports-4.4.2-1/net/wireless/nl80211.c:2405:6: error: implicit declaration of function ‘nla_put_u64’ [-Werror=implicit-function-declaration]
      nla_put_u64(msg, NL80211_ATTR_WDEV, wdev_id(wdev)) ||
      ^
cc1: some warnings being treated as errors
scripts/Makefile.build:289: recipe for target '/home/nashjr/Downloads/backports-4.4.2-1/net/wireless/nl80211.o' failed
make[6]: *** [/home/nashjr/Downloads/backports-4.4.2-1/net/wireless/nl80211.o] Error 1
scripts/Makefile.build:440: recipe for target '/home/nashjr/Downloads/backports-4.4.2-1/net/wireless' failed
make[5]: *** [/home/nashjr/Downloads/backports-4.4.2-1/net/wireless] Error 2
Makefile:1491: recipe for target '_module_/home/nashjr/Downloads/backports-4.4.2-1' failed
make[4]: *** [_module_/home/nashjr/Downloads/backports-4.4.2-1] Error 2
Makefile.build:6: recipe for target 'modules' failed
make[3]: *** [modules] Error 2
Makefile.real:88: recipe for target 'modules' failed
make[2]: *** [modules] Error 2
Makefile:40: recipe for target 'modules' failed
make[1]: *** [modules] Error 2
Makefile:30: recipe for target 'default' failed
make: *** [default] Error 2

So I decided to ignore them and continued. I ran sudo make defconfig-ath9k without any problems.

When I ran sudo make I got these errors again:

/home/nashjr/Downloads/backports-4.4.2-1/net/wireless/nl80211.c: In function ‘nl80211_send_iface’:
/home/nashjr/Downloads/backports-4.4.2-1/net/wireless/nl80211.c:2405:6: error: implicit declaration of function ‘nla_put_u64’ [-Werror=implicit-function-declaration]
      nla_put_u64(msg, NL80211_ATTR_WDEV, wdev_id(wdev)) ||
      ^
cc1: some warnings being treated as errors
scripts/Makefile.build:289: recipe for target '/home/nashjr/Downloads/backports-4.4.2-1/net/wireless/nl80211.o' failed
make[6]: *** [/home/nashjr/Downloads/backports-4.4.2-1/net/wireless/nl80211.o] Error 1
scripts/Makefile.build:440: recipe for target '/home/nashjr/Downloads/backports-4.4.2-1/net/wireless' failed
make[5]: *** [/home/nashjr/Downloads/backports-4.4.2-1/net/wireless] Error 2
Makefile:1491: recipe for target '_module_/home/nashjr/Downloads/backports-4.4.2-1' failed
make[4]: *** [_module_/home/nashjr/Downloads/backports-4.4.2-1] Error 2
Makefile.build:6: recipe for target 'modules' failed
make[3]: *** [modules] Error 2
Makefile.real:88: recipe for target 'modules' failed
make[2]: *** [modules] Error 2
Makefile:40: recipe for target 'modules' failed
make[1]: *** [modules] Error 2
Makefile:30: recipe for target 'default' failed
make: *** [default] Error 2

But in the tutorial I followed, it says this:

This time you should receive no errors. This may take some time to finish.

So something is definitely wrong and I don't know what.

Any help would be highly appreciated. Thanks.

Best Answer

New USB device found, idVendor=2357, idProduct=010c

In fact, your 2357:010C device is not the AR9271 version, it is a Realtek chipset: https://wikidevi.com/wiki/TP-LINK_TL-WN722N_v2

I suggest that you install the driver with:

sudo apt-get install git dkms
git clone https://github.com/lwfinger/rtl8188eu.git
sudo dkms add ./rtl8188eu
sudo dkms install 8188eu/1.0
sudo modprobe 8188eu

You will probably need to blacklist the driver for the internal device.

Related Question