1

I've just bought TP-LINK TL-WN823N (v2) external wifi usb adapter and it works on Windows.

I'm trying to figure out how to install it on my Ubuntu. I went to http://www.tp-link.com/us/download/TL-WN823N.html#Driver and downloaded the driver for Linux. Then I tried to run sudo make inside the Driver folder, and it fails:

$>sudo make
"******************************************"
"NO SKRC,we will use default KSRC"
"******************************************"
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.13.0-32-generic/build M=/home/unicornslayer/Driver  modules
make[1]: Entering directory '/usr/src/linux-headers-4.13.0-32-generic'
e"******************************************"
"NO SKRC,we will use default KSRC"
"******************************************"
  CC [M]  /home/unicornslayer/Driver/core/rtw_cmd.o
In file included from /home/unicornslayer/Driver/include/drv_types.h:95:0,
                 from /home/unicornslayer/Driver/core/rtw_cmd.c:22:
/home/unicornslayer/Driver/include/hal_com.h:413:13: error: ‘file_path’ redeclared as different kind of symbol
 extern char file_path[PATH_LENGTH_MAX];
             ^
In file included from ./include/linux/seq_file.h:10:0,
                 from ./include/linux/pinctrl/consumer.h:17,
                 from ./include/linux/pinctrl/devinfo.h:21,
                 from ./include/linux/device.h:24,
                 from ./include/linux/dmaengine.h:20,
                 from ./include/linux/netdevice.h:38,
                 from /home/unicornslayer/Driver/include/osdep_service_linux.h:35,
                 from /home/unicornslayer/Driver/include/osdep_service.h:45,
                 from /home/unicornslayer/Driver/include/drv_types.h:32,
                 from /home/unicornslayer/Driver/core/rtw_cmd.c:22:
./include/linux/fs.h:2805:14: note: previous declaration of ‘file_path’ was here
 extern char *file_path(struct file *, char *, int);
              ^
In file included from /home/unicornslayer/Driver/include/drv_types.h:65:0,
                 from /home/unicornslayer/Driver/core/rtw_cmd.c:22:
/home/unicornslayer/Driver/core/rtw_cmd.c: In function ‘btinfo_evt_dump’:
/home/unicornslayer/Driver/include/rtw_debug.h:187:19: error: void value not ignored as it ought to be
  #define _seqdump seq_printf
                   ^
/home/unicornslayer/Driver/include/rtw_debug.h:242:7: note: in expansion of macro ‘_seqdump’
    if(_seqdump(sel, fmt, ##arg)) /*rtw_warn_on(1)*/; \
       ^
/home/unicornslayer/Driver/core/rtw_cmd.c:3293:2: note: in expansion of macro ‘DBG_871X_SEL_NL’
  DBG_871X_SEL_NL(sel, "cid:0x%02x, len:%u\n", info->cid, info->len);
  ^
/home/unicornslayer/Driver/include/rtw_debug.h:187:19: error: void value not ignored as it ought to be
  #define _seqdump seq_printf
                   ^
/home/unicornslayer/Driver/include/rtw_debug.h:242:7: note: in expansion of macro ‘_seqdump’
    if(_seqdump(sel, fmt, ##arg)) /*rtw_warn_on(1)*/; \
       ^
/home/unicornslayer/Driver/core/rtw_cmd.c:3296:3: note: in expansion of macro ‘DBG_871X_SEL_NL’
   DBG_871X_SEL_NL(sel, "byte2:%s%s%s%s%s%s%s%s\n"
   ^
/home/unicornslayer/Driver/include/rtw_debug.h:187:19: error: void value not ignored as it ought to be
  #define _seqdump seq_printf
                   ^
/home/unicornslayer/Driver/include/rtw_debug.h:242:7: note: in expansion of macro ‘_seqdump’
    if(_seqdump(sel, fmt, ##arg)) /*rtw_warn_on(1)*/; \
       ^
/home/unicornslayer/Driver/core/rtw_cmd.c:3308:3: note: in expansion of macro ‘DBG_871X_SEL_NL’
   DBG_871X_SEL_NL(sel, "retry_cnt:%u\n", info->retry_cnt);
   ^
/home/unicornslayer/Driver/include/rtw_debug.h:187:19: error: void value not ignored as it ought to be
  #define _seqdump seq_printf
                   ^
/home/unicornslayer/Driver/include/rtw_debug.h:242:7: note: in expansion of macro ‘_seqdump’
    if(_seqdump(sel, fmt, ##arg)) /*rtw_warn_on(1)*/; \
       ^
/home/unicornslayer/Driver/core/rtw_cmd.c:3311:3: note: in expansion of macro ‘DBG_871X_SEL_NL’
   DBG_871X_SEL_NL(sel, "rssi:%u\n", info->rssi);
   ^
/home/unicornslayer/Driver/include/rtw_debug.h:187:19: error: void value not ignored as it ought to be
  #define _seqdump seq_printf
                   ^
/home/unicornslayer/Driver/include/rtw_debug.h:242:7: note: in expansion of macro ‘_seqdump’
    if(_seqdump(sel, fmt, ##arg)) /*rtw_warn_on(1)*/; \
       ^
/home/unicornslayer/Driver/core/rtw_cmd.c:3314:3: note: in expansion of macro ‘DBG_871X_SEL_NL’
   DBG_871X_SEL_NL(sel, "byte5:%s%s\n"
   ^
scripts/Makefile.build:308: recipe for target '/home/unicornslayer/Driver/core/rtw_cmd.o' failed
make[2]: *** [/home/unicornslayer/Driver/core/rtw_cmd.o] Error 1
Makefile:1550: recipe for target '_module_/home/unicornslayer/Driver' failed
make[1]: *** [_module_/home/unicornslayer/Driver] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.13.0-32-generic'
Makefile:1696: recipe for target 'modules' failed
make: *** [modules] Error 2

I tried to install the driver through Windows Wireless Drivers application and it seems from dmesg that it doesn't work:

[  522.042037] usb 2-1.1: new high-speed USB device number 6 using ehci-pci
[  522.167320] usb 2-1.1: New USB device found, idVendor=2357, idProduct=0109
[  522.167326] usb 2-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  522.167329] usb 2-1.1: Product: 802.11n NIC 
[  522.167332] usb 2-1.1: Manufacturer: Realtek 
[  522.167335] usb 2-1.1: SerialNumber: 00e04c000001
[  522.254021] usb 2-1.1: reset high-speed USB device number 6 using ehci-pci
[  522.372986] ndiswrapper (import:232): unknown symbol: ntoskrnl.exe:'IoCsqInsertIrp'
[  522.373004] ndiswrapper (import:232): unknown symbol: ntoskrnl.exe:'IoCsqRemoveNextIrp'
[  522.373014] ndiswrapper (import:232): unknown symbol: ntoskrnl.exe:'IoCsqInitialize'
[  522.373225] ndiswrapper (load_sys_files:200): couldn't prepare driver 'netrtwlanu_xp_coinst'
[  522.375002] ndiswrapper (load_wrap_driver:103): couldn't load driver netrtwlanu_xp_coinst; check system log for messages from 'loadndisdriver'

Here are some commands I've run:

$>rfkill list all
0: hci0: Bluetooth
    Soft blocked: no
    Hard blocked: no
1: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: no
2: brcmwl-0: Wireless LAN
    Soft blocked: no
    Hard blocked: yes

.

$>sudo lshw -C network
  *-network               
       description: Ethernet interface
       product: NetLink BCM57785 Gigabit Ethernet PCIe
       vendor: Broadcom Corporation
       physical id: 0
       bus info: pci@0000:02:00.0
       logical name: enp2s0f0
       version: 10
       serial: b8:70:f4:ae:a6:b6
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi msix pciexpress bus_master cap_list rom ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=tg3 driverversion=3.137 firmware=sb latency=0 link=no multicast=yes port=twisted pair
       resources: irq:16 memory:d1830000-d183ffff memory:d1840000-d184ffff memory:9fb00000-9fb007ff
  *-generic
       description: Wireless interface
       product: Illegal Vendor ID
       vendor: Illegal Vendor ID
       physical id: 0
       bus info: pci@0000:03:00.0
       logical name: wlp3s0
       version: ff
       serial: e8:39:df:f6:ba:f0
       width: 32 bits
       clock: 66MHz
       capabilities: bus_master vga_palette cap_list ethernet physical wireless
       configuration: broadcast=yes driver=wl0 driverversion=6.30.223.271 (r587334) latency=255 maxlatency=255 mingnt=255 multicast=yes wireless=IEEE 802.11
       resources: irq:17 memory:d1900000-d1903fff
  *-network
       description: Ethernet interface
       physical id: 3
       logical name: enp0s29u1u2
       serial: ee:e9:39:65:01:dd
       capabilities: ethernet physical
       configuration: broadcast=yes driver=rndis_host driverversion=22-Aug-2005 firmware=RNDIS device ip=192.168.42.187 link=yes multicast=yes

.

$>lspci | grep -i net
02:00.0 Ethernet controller: Broadcom Corporation NetLink BCM57785 Gigabit Ethernet PCIe (rev 10)
03:00.0 Network controller: Broadcom Corporation BCM43225 802.11b/g/n (rev ff)

.

$>lsusb
Bus 002 Device 005: ID 0458:6001 KYE Systems Corp. (Mouse Systems) GF3000F Ethernet Adapter
Bus 002 Device 004: ID 17ef:7436 Lenovo 
Bus 002 Device 006: ID 2357:0109  
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 04fc:2800 Sunplus Technology Co., Ltd 
Bus 001 Device 003: ID 0a5c:219a Broadcom Corp. 
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

If I unplug the external adapter, the 2357:0109 field disappears.

$>ifconfig
enp0s29u1u2 Link encap:Ethernet  HWaddr ee:e9:39:65:01:dd  
          inet addr:192.168.42.187  Bcast:192.168.42.255  Mask:255.255.255.0
          inet6 addr: fe80::c40d:26ec:37db:94d/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:6841 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6755 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:4928868 (4.9 MB)  TX bytes:1922765 (1.9 MB)

enp2s0f0  Link encap:Ethernet  HWaddr b8:70:f4:ae:a6:b6  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:16 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:685 errors:0 dropped:0 overruns:0 frame:0
          TX packets:685 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:61365 (61.3 KB)  TX bytes:61365 (61.3 KB)

wlp3s0    Link encap:Ethernet  HWaddr e8:39:df:f6:ba:f0  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:17 

.

$>iwconfig
wlp3s0    IEEE 802.11  ESSID:off/any  
          Mode:Managed  Access Point: Not-Associated   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:off

enp0s29u1u2  no wireless extensions.

lo        no wireless extensions.

enp2s0f0  no wireless extensions.

.

$>iwlist scan
wlp3s0    No scan results

enp0s29u1u2  Interface doesn't support scanning.

lo        Interface doesn't support scanning.

enp2s0f0  Interface doesn't support scanning.

.

$>lsb_release -d
Description:    Ubuntu 16.04.3 LTS
$>uname -mr
4.13.0-32-generic x86_64

Ethernet works fine.

2 Answers2

3

First of all, the driver file that you linked specifically says: Linux (kernel 2.6.18 ~ 3.10.10). You are running the much newer 4.13.0-xx. The file you downloaded will never compile.

Next, we see that you installed ndiswrapper to try to get the device working. Please remove it.

sudo apt purge ndiswrapper*

You may install the driver for your device with:

sudo apt-get update
sudo apt-get install git
git clone https://github.com/Mange/rtl8192eu-linux-driver.git
cd rtl8192eu-linux-driver
sudo dkms add .
sudo dkms install rtl8192eu/1.0
sudo modprobe 8192eu

Finally, we see that your internal Broadcom device is not working because of a hardware block; that is, the switch or key combination is set to disable wireless. It is somewhat likely that the USB will also be blocked, in which case, you'll need to find and switch the wireless switch and, if you wish to use the USB, blacklist the driver for the internal wireless.

EDIT: In order to prevent possible conflicts with the internal device, I suggest that we blacklist the driver:

sudo -i
echo "blacklist wl"  >>  /etc/modprobe.d/blacklist.conf
echo "blacklist rtl8xxxu"  >>  /etc/modprobe.d/blacklist.conf
exit

Any improvement? If you need to paste a dmesg, I suggest: http://paste.ubuntu.com and give us the link.

chili555
  • 60,188
  • You're a wizard! I was killing myself for like a whole day now. I'm very curious, how did you know that rtl8192eu would work? – Emil Terman Jan 27 '18 at 20:22
  • Even tho it works, the dmesg seems to not like something: https://gist.github.com/anonymous/588d6208c868aae217f8569b92771b5b – Emil Terman Jan 27 '18 at 20:44
  • I knew that I could google the usb.id 2357:0109 and Ubuntu and find the answer. Please see my edit in a few moments. – chili555 Jan 27 '18 at 21:11
  • 1
    I will make a prediction echo "blacklist rtl8xxxu" | sudo tee -a /etc/modprobe.d/blacklist.conf – Jeremy31 Jan 27 '18 at 21:14
  • Excellent catch, @Jeremy31 I shall edit my edit. – chili555 Jan 27 '18 at 22:07
  • @chili555 I don't seem to notice any real difference: https://paste.ubuntu.com/26475947/. I added that stuff to blacklist, rebooted just in case, checked the dmesg, reconnected few times the usb adapter, but with the same results. Then I added rtl8192eu and rtl8192u and rebooted to be sure. (Removed afterwards). – Emil Terman Jan 28 '18 at 09:25
0

I just downloaded a recent driver from the manufacterer's page https://www.tp-link.com/us/support/download/tl-wn823n/#Driver .

I installed the driver using the following commands in a terminal:

cd [unzip-directory]  
sudo make clean  
sudo make  
sudo make install  

After reboot, the adapter works fine.

Martin

Martin
  • 121