[SOLVED] TL-WN821N V5 Wireless USB Adapter

Getting your soundcard to work, using Debian on non-i386 hardware, etc

[SOLVED] TL-WN821N V5 Wireless USB Adapter

Postby luguercio » 2017-12-11 17:59

Hi, i've trying to make this device work on debian testing without success. I've read this entry on debian wiki: https://wiki.debian.org/ath9k_htc, but doesn't work.

Here is the output of lsusb:
Code: Select all
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 2357:0107 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


And this is the output of dmesg when i connect the adapter (at least that's what it says last after connecting the adapter and running dmesg):
Code: Select all
[  275.876444] usb 1-3: new high-speed USB device number 3 using xhci_hcd
[  276.016832] usb 1-3: New USB device found, idVendor=2357, idProduct=0107
[  276.016837] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  276.016840] usb 1-3: Product: 802.11n NIC
[  276.016842] usb 1-3: Manufacturer: Realtek
[  276.016845] usb 1-3: SerialNumber: 00e04c000001


Thanks in advance!
Last edited by luguercio on 2017-12-21 23:36, edited 2 times in total.
luguercio
 
Posts: 38
Joined: 2009-10-02 16:50

Re: TL-WN821N V5 Wireless USB Adapter

Postby Segfault » 2017-12-11 18:10

DuckDuck ...

^^ Any of this didn't help?
Segfault
 
Posts: 664
Joined: 2005-09-24 12:24

Re: TL-WN821N V5 Wireless USB Adapter

Postby sunrat » 2017-12-11 23:32

luguercio wrote:Hi, i've trying to make this device work on debian testing without success. I've read this entry on debian wiki: https://wiki.debian.org/ath9k_htc, but doesn't work.

Only the early versions used Atheros chips (and were much easier to get working). ath9k_htc is for the Atheros chips. This has a Realtek chip and needs rtl8192eu driver and is a pain to set up and not 100% reliable. Mine doesn't initialise on bootup but is ok after unplugging and plugging in again. :roll:
Get the driver from here and install with dkms - https://github.com/Mange/rtl8192eu-linux-driver

I answered the same question at MX forum a couple of days ago. Read it for more detailed instructions - https://forum.mxlinux.org/viewtopic.php?f=107&t=43411
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!
User avatar
sunrat
 
Posts: 2356
Joined: 2006-08-29 09:12
Location: Melbourne, Australia

Re: TL-WN821N V5 Wireless USB Adapter

Postby shep » 2017-12-12 10:07

Vendors are notorious for changing chipsets and I note that the OP's TL-WN821N is version V5 while the instructions in the above post are for V4.

I would recommend that you ID the chipset using Debian howto ID a usb device. Also be aware that some Realtek usb wireless devices have drivers in the stock kernel. See this Debian rtl818x wiki web page.

Lastly, rtl8192u firmware needs to be manually installed
RTL8192U-based devices only: firmware is required to be manually supplied:
# apt-get install unzip && exit
$ wget ftp://ftp2.dlink.com/PRODUCTS/DWA-130/R ... _LINUX.ZIP
$ unzip DWA-130_REVC_DRIVERS_0.06_LINUX.ZIP
$ su
# mkdir /lib/firmware/RTL8192U
# cp rtl8192u_linux_2.6.0006.1031.2008/firmware/RTL8192U/* /lib/firmware/RTL8192U


Not sure if this covers the rtl8192eu version
shep
 
Posts: 209
Joined: 2011-03-15 15:22

Re: TL-WN821N V5 Wireless USB Adapter

Postby sunrat » 2017-12-12 11:31

shep wrote:Vendors are notorious for changing chipsets and I note that the OP's TL-WN821N is version V5 while the instructions in the above post are for V4.

True dat.

I would recommend that you ID the chipset using Debian howto ID a usb device. Also be aware that some Realtek usb wireless devices have drivers in the stock kernel. See this Debian rtl818x wiki web page.

OP already gave chipset ID in lsusb. This one is particularly shy as all it will tell you is ID 2357:0107 . One of the results in the DDG search suggested by Segfault says the Github driver I linked is the correct one for that ID - https://github.com/pvaret/rtl8192cu-fix ... -280778397

Lastly, rtl8192u firmware needs to be manually installed
RTL8192U-based devices only: firmware is required to be manually supplied:
# apt-get install unzip && exit
$ wget ftp://ftp2.dlink.com/PRODUCTS/DWA-130/R ... _LINUX.ZIP
$ unzip DWA-130_REVC_DRIVERS_0.06_LINUX.ZIP
$ su
# mkdir /lib/firmware/RTL8192U
# cp rtl8192u_linux_2.6.0006.1031.2008/firmware/RTL8192U/* /lib/firmware/RTL8192U


Not sure if this covers the rtl8192eu version

Only firmware-realtek needs to be installed from non-free repo. Use the stretch-backports one.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!
User avatar
sunrat
 
Posts: 2356
Joined: 2006-08-29 09:12
Location: Melbourne, Australia

Re: TL-WN821N V5 Wireless USB Adapter

Postby luguercio » 2017-12-12 14:47

sunrat wrote:
shep wrote:Vendors are notorious for changing chipsets and I note that the OP's TL-WN821N is version V5 while the instructions in the above post are for V4.

True dat.

I would recommend that you ID the chipset using Debian howto ID a usb device. Also be aware that some Realtek usb wireless devices have drivers in the stock kernel. See this Debian rtl818x wiki web page.

OP already gave chipset ID in lsusb. This one is particularly shy as all it will tell you is ID 2357:0107 . One of the results in the DDG search suggested by Segfault says the Github driver I linked is the correct one for that ID - https://github.com/pvaret/rtl8192cu-fix ... -280778397

Lastly, rtl8192u firmware needs to be manually installed
RTL8192U-based devices only: firmware is required to be manually supplied:
# apt-get install unzip && exit
$ wget ftp://ftp2.dlink.com/PRODUCTS/DWA-130/R ... _LINUX.ZIP
$ unzip DWA-130_REVC_DRIVERS_0.06_LINUX.ZIP
$ su
# mkdir /lib/firmware/RTL8192U
# cp rtl8192u_linux_2.6.0006.1031.2008/firmware/RTL8192U/* /lib/firmware/RTL8192U


Not sure if this covers the rtl8192eu version

Only firmware-realtek needs to be installed from non-free repo. Use the stretch-backports one.

Thanks for your answer!, but sorry, im i little bit confused, what should i do?, what you said in your first post?.
luguercio
 
Posts: 38
Joined: 2009-10-02 16:50

Re: TL-WN821N V5 Wireless USB Adapter

Postby shep » 2017-12-12 17:54

sunrat wrote:Only firmware-realtek needs to be installed from non-free repo. Use the stretch-backports one.


This is not correct according to Debian Documentation sourced here.


Non-free firmware is required for all drivers, which can be provided by installing the firmware-realtek package. RTL8192U firmware is currently not packaged (588142).


According to the bug report, RTL8192U firmware lacks a proper license for Debian to redistribute the firmware.
shep
 
Posts: 209
Joined: 2011-03-15 15:22

Re: TL-WN821N V5 Wireless USB Adapter

Postby sunrat » 2017-12-12 21:22

shep wrote:
sunrat wrote:Only firmware-realtek needs to be installed from non-free repo. Use the stretch-backports one.


This is not correct according to Debian Documentation sourced here.

You're right it's not correct according to that wiki page. However that is for Wheezy and Jessie. The firmware (Realtek RTl8192EU firmware (rtlwifi/rtl8192eu_nic.bin)) is included in the Stretch and stretch-updates package. https://packages.debian.org/uk/stretch/firmware-realtek

luguercio wrote:Thanks for your answer!, but sorry, im i little bit confused, what should i do?, what you said in your first post?.

Yes.
I'm posting now using a TL-WN822N V4 which is also a rtl8192eu chip. As I said it's a bit tricky to get working but it does work after using the detailed method I posted at MX forum. The worst outcome is it won't work. Nothing to lose!

Copied here from MX forum for completeness:
- build and install the driver with dkms
- blacklist rtl8xxxu by creating a blacklist file in /etc/modprobe.d/
- reboot
- configure with password in NM
- profit!

Installing firmware-realtek not necessary in MX as it's included by default but needs to be installed in Debian.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!
User avatar
sunrat
 
Posts: 2356
Joined: 2006-08-29 09:12
Location: Melbourne, Australia

Re: TL-WN821N V5 Wireless USB Adapter

Postby stevepusser » 2017-12-12 22:41

Doesn't the driver in github include and install the firmware blob anyway? That's how most of those modified vendor drivers work.
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: GIMP 2.10.4, Pale Moon 27.9.4, wine-staging 3.12, MPC-QT 18.03, Linux kernel 4.17.8, Krita 4.1.1
User avatar
stevepusser
 
Posts: 9728
Joined: 2009-10-06 05:53

Re: TL-WN821N V5 Wireless USB Adapter

Postby shep » 2017-12-13 00:30

If the Stretch kernel includes support for rtl8192eu, it is likely that the kernel driver is available and will load once the firmware is installed. Using dkms to install a second driver, over the first, would seem to be prone to problems.
The other problem could be that the usbid is not recognized and will not attach to the proper driver, even if the driver is present in the kernel. The github driver likely installs the usbid and the firmware.
shep
 
Posts: 209
Joined: 2011-03-15 15:22

Re: TL-WN821N V5 Wireless USB Adapter

Postby luguercio » 2017-12-15 01:15

sunrat wrote:
luguercio wrote:Thanks for your answer!, but sorry, im i little bit confused, what should i do?, what you said in your first post?.

Yes.
I'm posting now using a TL-WN822N V4 which is also a rtl8192eu chip. As I said it's a bit tricky to get working but it does work after using the detailed method I posted at MX forum. The worst outcome is it won't work. Nothing to lose!

Hi, it does work, it lists all the networks, but when i enter the password, it asks again for the password. I'm using gnome network manager
luguercio
 
Posts: 38
Joined: 2009-10-02 16:50

Re: TL-WN821N V5 Wireless USB Adapter

Postby sunrat » 2017-12-15 02:11

luguercio wrote:Hi, it does work, it lists all the networks, but when i enter the password, it asks again for the password. I'm using gnome network manager

That's what mine did until I got the driver sorted.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!
User avatar
sunrat
 
Posts: 2356
Joined: 2006-08-29 09:12
Location: Melbourne, Australia

Re: TL-WN821N V5 Wireless USB Adapter

Postby luguercio » 2017-12-21 20:10

Ok, i just got the device to work! :D . The drivers were fine, and i installed them correctly, but i noticed that everytime i tried to connect to my network the device had a different MAC address. Looking on internet i found this: https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1681513.

So, just adding
Code: Select all
[device]
wifi.scan-rand-mac-address=no

to the /etc/NetworkManager/NetworkManager.conf file fixed the issue. Now im connected through the device, thanks all for helping! :)

Edit: yes, finally it was a bug in gnome network manager
luguercio
 
Posts: 38
Joined: 2009-10-02 16:50

Re: TL-WN821N V5 Wireless USB Adapter

Postby sunrat » 2017-12-21 21:39

Nice sleuthing! Please edit the title of your first post and add [SOLVED] so it may help other users.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!
User avatar
sunrat
 
Posts: 2356
Joined: 2006-08-29 09:12
Location: Melbourne, Australia


Return to Hardware

Who is online

Users browsing this forum: No registered users and 4 guests

fashionable