Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[SOLVED] TL-WN821N V5 Wireless USB Adapter

Need help with peripherals or devices?
Post Reply
Message
Author
luguercio
Posts: 38
Joined: 2009-10-02 16:50

[SOLVED] TL-WN821N V5 Wireless USB Adapter

#1 Post by luguercio »

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.

Segfault
Posts: 993
Joined: 2005-09-24 12:24
Has thanked: 5 times
Been thanked: 17 times

Re: TL-WN821N V5 Wireless USB Adapter

#2 Post by Segfault »

DuckDuck ...

^^ Any of this didn't help?

User avatar
sunrat
Administrator
Administrator
Posts: 6412
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 461 times

Re: TL-WN821N V5 Wireless USB Adapter

#3 Post by sunrat »

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!

shep
Posts: 423
Joined: 2011-03-15 15:22

Re: TL-WN821N V5 Wireless USB Adapter

#4 Post by shep »

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

User avatar
sunrat
Administrator
Administrator
Posts: 6412
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 461 times

Re: TL-WN821N V5 Wireless USB Adapter

#5 Post by sunrat »

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!

luguercio
Posts: 38
Joined: 2009-10-02 16:50

Re: TL-WN821N V5 Wireless USB Adapter

#6 Post by luguercio »

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?.

shep
Posts: 423
Joined: 2011-03-15 15:22

Re: TL-WN821N V5 Wireless USB Adapter

#7 Post by shep »

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.

User avatar
sunrat
Administrator
Administrator
Posts: 6412
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 461 times

Re: TL-WN821N V5 Wireless USB Adapter

#8 Post by sunrat »

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
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: TL-WN821N V5 Wireless USB Adapter

#9 Post by stevepusser »

Doesn't the driver in github include and install the firmware blob anyway? That's how most of those modified vendor drivers work.
MX Linux packager and developer

shep
Posts: 423
Joined: 2011-03-15 15:22

Re: TL-WN821N V5 Wireless USB Adapter

#10 Post by shep »

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.

luguercio
Posts: 38
Joined: 2009-10-02 16:50

Re: TL-WN821N V5 Wireless USB Adapter

#11 Post by luguercio »

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

User avatar
sunrat
Administrator
Administrator
Posts: 6412
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 461 times

Re: TL-WN821N V5 Wireless USB Adapter

#12 Post by sunrat »

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!

luguercio
Posts: 38
Joined: 2009-10-02 16:50

Re: TL-WN821N V5 Wireless USB Adapter

#13 Post by luguercio »

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/+sour ... ug/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

User avatar
sunrat
Administrator
Administrator
Posts: 6412
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 461 times

Re: TL-WN821N V5 Wireless USB Adapter

#14 Post by sunrat »

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!

Post Reply