**SOLVED** TP-Link wifi adapter problem

New to Debian (Or Linux in general)? Ask your questions here!

**SOLVED** TP-Link wifi adapter problem

Postby alpage2 » 2019-07-27 12:50

After a fresh install of debian 10, I updated the system (via ethernet), downloaded the ralink firmware package and installed with dpkg.

On reboot, the firmware appears to have loaded, and networkmanager can see the local wifi networks, but stil it stubbornly refuses to connect to the wifi network, even when the password is saved into the connection details, and set for all to connect.

I'd be grateful for some help in getting wifi working.

Some output that may be useful:
Code: Select all
root@deb10:~# dmesg | grep rtl
[   16.491798] rtl8192cu: Chip version 0x11
[   16.580173] rtl8192cu: Board Type 0
[   16.580401] rtl_usb: rx_max_size 15360, rx_urb_num 8, in_ep 1
[   16.580497] rtl8192cu: Loading firmware rtlwifi/rtl8192cufw_TMSC.bin
[   16.724401] usb 1-2: firmware: direct-loading firmware rtlwifi/rtl8192cufw_TMSC.bin
[   16.830451] ieee80211 phy0: Selected rate control algorithm 'rtl_rc'
[   16.831068] usbcore: registered new interface driver rtl8192cu
[   16.939638] rtl8192cu 1-2:1.0 wlx10feed1a3ebd: renamed from wlan0
[   27.344646] rtl8192cu: MAC auto ON okay!
[   27.378650] rtl8192cu: Tx queue select: 0x05
[   28.001219] rtl8192cu: MAC auto ON okay!
[   28.035224] rtl8192cu: Tx queue select: 0x05
[   99.836090] rtl8192cu: MAC auto ON okay!
[   99.873732] rtl8192cu: Tx queue select: 0x05
[  126.110197] rtl8192cu: MAC auto ON okay!
[  126.143571] rtl8192cu: Tx queue select: 0x05


root@deb10:~# lsmod | grep rtl
#rtl8192cu              65536  0
rtl_usb                20480  1 rtl8192cu
rtl8192c_common        45056  1 rtl8192cu
rtlwifi                65536  3 rtl_usb,rtl8192c_common,rtl8192cu
mac80211              561152  3 rtl_usb,rtlwifi,rtl8192cu
cfg80211              487424  2 mac80211,rtlwifi
usbcore               188416  6 ehci_hcd,ohci_pci,rtl_usb,rtl8192cu,ohci_hcd,ehci_pci
root@deb10:~#

root@deb10:~# /usr/bin/nmcli device status
DEVICE           TYPE      STATE         CONNECTION         
enp0s4           ethernet  connected     Wired connection 1
wlx10feed1a3ebd  wifi      disconnected  --                 
lo               loopback  unmanaged     --                 
root@deb10:~#

Interface wlx10feed1a3ebd
   ifindex 3
   wdev 0x1
   addr d6:f1:d6:2d:8c:6d
   type managed
   wiphy 0
   txpower 20.00 dBm
root@deb10:~#


root@deb10:~# /usr/bin/ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: enp0s4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:0b:6a:1a:3e:dd brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.28/24 brd 192.168.0.255 scope global dynamic noprefixroute enp0s4
       valid_lft 83745sec preferred_lft 83745sec
    inet6 fd5d:9c7f:b5b4:0:1ce9:d1ab:e6a4:70c4/64 scope global temporary dynamic
       valid_lft 602507sec preferred_lft 83677sec
    inet6 fd5d:9c7f:b5b4:0:20b:6aff:fe1a:3edd/64 scope global mngtmpaddr noprefixroute
       valid_lft forever preferred_lft forever
    inet6 2a02:c7d:21e3:2f00:1ce9:d1ab:e6a4:70c4/64 scope global temporary dynamic
       valid_lft 5822sec preferred_lft 2221sec
    inet6 2a02:c7d:21e3:2f00:20b:6aff:fe1a:3edd/64 scope global dynamic mngtmpaddr noprefixroute
       valid_lft 5822sec preferred_lft 2221sec
    inet6 2a02:c7d:21e3:2f00:65ba:c4a2:bf9f:e4d6/64 scope global temporary dynamic
       valid_lft 4023sec preferred_lft 423sec
    inet6 fd5d:9c7f:b5b4:0:65ba:c4a2:bf9f:e4d6/64 scope global temporary dynamic
       valid_lft 602142sec preferred_lft 83312sec
    inet6 fe80::20b:6aff:fe1a:3edd/64 scope link noprefixroute
       valid_lft forever preferred_lft forever
3: wlx10feed1a3ebd: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether 2e:0c:d9:16:e5:1a brd ff:ff:ff:ff:ff:ff
root@deb10:~#

Is there any other output that you need?

Any help would be much appreciated.
Thanks in anticipation
Alan
Last edited by alpage2 on 2019-07-28 14:24, edited 1 time in total.
alpage2
 
Posts: 8
Joined: 2019-07-27 10:56

Re: TP-Link wifi adapter problem

Postby ruwolf » 2019-07-27 18:54

rfkill lists, enabling and disabling wireless devices:
Code: Select all
rfkill list
User avatar
ruwolf
 
Posts: 359
Joined: 2008-02-18 05:04
Location: Slovakia, Banovce nad Bebravou, Matice slovenskej 1260/4-7

Re: TP-Link wifi adapter problem

Postby alpage2 » 2019-07-28 07:26

Thanks, ruwolf

I'm trying that, but running into a different problem.

I installed rfkill with:
Code: Select all
apt install rfkill


which seemed to go fine. The rfkill man page displays fine, but when I enter:
Code: Select all
rfkill list

I get:
Code: Select all
root@deb10:~# rfkill list
rfkill: cannot open /dev/rfkill: No such file or directory
rfkill: cannot read /dev/rfkill: Bad file descriptor
root@deb10:~#


Advice to overcome that would be much appreciated.
Thanks
Alan
alpage2
 
Posts: 8
Joined: 2019-07-27 10:56

Re: TP-Link wifi adapter problem

Postby alpage2 » 2019-07-28 07:32

CORRECTION

I just realised after posting my problem with rfkill, that I had previously slipped the offending adapter ot of the machine. After restoring the adapter, I get:

Code: Select all
root@deb10:~# rfkill list
0: phy0: Wireless LAN
   Soft blocked: no
   Hard blocked: no
root@deb10:~#


Sorry for any confusion.

Next step?
Alan
alpage2
 
Posts: 8
Joined: 2019-07-27 10:56

Re: TP-Link wifi adapter problem

Postby Head_on_a_Stick » 2019-07-28 08:51

Let's try a manual approach:
Code: Select all
# ip link set wlx10feed1a3ebd up
# iw dev wlx10feed1a3ebd scan | grep SSID

Can you see your access point? Post any error messages.
User avatar
Head_on_a_Stick
 
Posts: 10346
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: TP-Link wifi adapter problem

Postby alpage2 » 2019-07-28 09:57

Many thanks - here is the bash session:

Code: Select all
root@deb10:~# ip link set wlx10feed1a3ebd up
root@deb10:~# iw dev wlx10feed1a3ebd scan | grep SSID
   SSID: SKYE943B
   SSID: Onestream-TNCAP664897
   SSID: SKYE943B
   SSID: BTWifi-X
   SSID: TALKTALK8F66C5
   SSID: BTWifi-with-FON
   SSID: BTHub5-FJ9Z
   SSID: AP_613501219
   SSID: SKYD4CCF
   SSID: SKYD4CCF
root@deb10:~#

So it can be seen - my router is SKYE943B
NetworkManager can also see it (it could, previously) but another attempt to connect just results in it disconnecting.

dmesg continues to say:
Code: Select all
[ 9799.431144] IPv6: ADDRCONF(NETDEV_UP): wlx10feed1a3ebd: link is not ready
[ 9882.679272] perf: interrupt took too long (3969 > 3947), lowering kernel.perf_event_max_sample_rate to 50250
[10072.610321] rtl8192cu: MAC auto ON okay!
[10072.649569] rtl8192cu: Tx queue select: 0x05
[10073.310350] IPv6: ADDRCONF(NETDEV_UP): wlx10feed1a3ebd: link is not ready
[10074.153607] wlx10feed1a3ebd: authenticate with a0:bd:cd:4a:12:f2
[10074.210736] wlx10feed1a3ebd: send auth to a0:bd:cd:4a:12:f2 (try 1/3)
[10074.213332] wlx10feed1a3ebd: authenticated
[10079.215117] wlx10feed1a3ebd: aborting authentication with a0:bd:cd:4a:12:f2 by local choice (Reason: 3=DEAUTH_LEAVING)
[10080.263722] wlx10feed1a3ebd: authenticate with 0c:f9:c0:79:e1:d6
[10080.357389] wlx10feed1a3ebd: send auth to 0c:f9:c0:79:e1:d6 (try 1/3)
[10080.360778] wlx10feed1a3ebd: authenticated
[10085.361540] wlx10feed1a3ebd: aborting authentication with 0c:f9:c0:79:e1:d6 by local choice (Reason: 3=DEAUTH_LEAVING)
[10085.522697] wlx10feed1a3ebd: authenticate with 0c:f9:c0:79:e1:d6
[10085.593457] wlx10feed1a3ebd: send auth to 0c:f9:c0:79:e1:d6 (try 1/3)
[10085.597420] wlx10feed1a3ebd: authenticated
[10090.598184] wlx10feed1a3ebd: aborting authentication with 0c:f9:c0:79:e1:d6 by local choice (Reason: 3=DEAUTH_LEAVING)
[10091.646412] wlx10feed1a3ebd: authenticate with a0:bd:cd:4a:12:f2
[10091.713426] wlx10feed1a3ebd: send auth to a0:bd:cd:4a:12:f2 (try 1/3)
[10091.715603] wlx10feed1a3ebd: authenticated
[10096.718023] wlx10feed1a3ebd: aborting authentication with a0:bd:cd:4a:12:f2 by local choice (Reason: 3=DEAUTH_LEAVING)
[10098.759949] IPv6: ADDRCONF(NETDEV_UP): wlx10feed1a3ebd: link is not ready
[10098.842325] rtl8192cu: MAC auto ON okay!
[10098.891432] rtl8192cu: Tx queue select: 0x05
[10099.515188] IPv6: ADDRCONF(NETDEV_UP): wlx10feed1a3ebd: link is not ready
root@deb10:~#


What else should I try?

Thanks for your patience.
Alan
alpage2
 
Posts: 8
Joined: 2019-07-27 10:56

Re: TP-Link wifi adapter problem

Postby Head_on_a_Stick » 2019-07-28 10:22

We can try a manual connection:
Code: Select all
# wpa_passphrase SKYE943B "$password" > /etc/wpa_supplicant/wpa_supplicant-wlx10feed1a3ebd.conf # replace $password with the actual password
# wpa_supplicant -B -c /etc/wpa_supplicant/wpa_supplicant-wlx10feed1a3ebd.conf -i wlx10feed1a3ebd
# dhclient wlx10feed1a3ebd

But if the connection still keeps dropping out then try https://adamscheller.com/systems-admini ... -fix-wifi/
User avatar
Head_on_a_Stick
 
Posts: 10346
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: TP-Link wifi adapter problem

Postby alpage2 » 2019-07-28 11:13

Thanks, Head-on-a-Stick

Here's the bash session:

Code: Select all
root@deb10:~# wpa_passphrase SKYE943B "$password" > /etc/wpa_supplicant/wpa_supplicant-wlx10feed1a3ebd.conf # where "$password" was replaced by the actual 10-character password
root@deb10:~# wpa_supplicant -B -c /etc/wpa_supplicant/wpa_supplicant-wlx10feed1a3ebd.conf -i wlx10feed1a3ebd
Successfully initialized wpa_supplicant
root@deb10:~# dhclient wlx10feed1a3ebd
root@deb10:~#


The wifi password is correctly entered into the NetworkManager, and is only 10 characters long (all upper case), and appeared to be successfully given to wpa_supplicant. However, the wifi still refuses to connect.

Many thanks for the help, anyway - I'll take a look at the link you provided - but feel free to come back with anything else.

Thanks again
Alan
alpage2
 
Posts: 8
Joined: 2019-07-27 10:56

Re: TP-Link wifi adapter problem

Postby Head_on_a_Stick » 2019-07-28 11:43

alpage2 wrote:appeared to be successfully given to wpa_supplicant

Check the link status with
Code: Select all
# iw dev wlx10feed1a3ebd link

But that particular device is known to be crappy under GNU/Linux so...
User avatar
Head_on_a_Stick
 
Posts: 10346
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: TP-Link wifi adapter problem

Postby alpage2 » 2019-07-28 13:01

Thanks - the output was:

Code: Select all
root@deb10:~# iw dev wlx10feed1a3ebd link
Not connected.
root@deb10:~#


The blog you linked to looks very promising, - I'll post back what happens.

Thanks again
Alan
alpage2
 
Posts: 8
Joined: 2019-07-27 10:56

Re: TP-Link wifi adapter problem

Postby alpage2 » 2019-07-28 14:23

**SOLVED**

DONE AND WORKING!

The blog had the answer, although it did not go quite according to the commands in the blog. Here are the hightlights, taken from the bash history, after the event:
The first command included a kernel-generic for the ubuntu users, which had to be removed.
Code: Select all
apt-get install --reinstall linux-headers-$(uname -r) build-essential dkms git
git clone https://github.com/pvaret/rtl8192cu-fixes.git
dkms add ./rtl8192cu-fixes && dkms install 8192cu/1.10 && depmod -a

failed due to wrong version - corrected 1.10 to 1.11:
Code: Select all
cp ./rtl8192cu-fixes/blacklist-native-rtl8192.conf /etc/modprobe.d/

To blacklist the existing failed drivers

Code: Select all
dkms add ./rtl8192cu-fixes && dkms install 8192cu/1.11 && depmod -a
modprobe 8192cu

Threw an error - couldn't find what it needed, but the correct command was in the README.md file
Code: Select all
less rtl8192cu-fixes/README.md


Followed the commands in the readme:
Code: Select all
dkms install 8192cu/1.11

Is what finally built the corrected driver.

Code: Select all
modprobe 8192cu

had a problem finding this, but a new boot image file had been created by the dkms command, and after a reboot, the wifi was working!!!

Many thanks all for the help - and a special thanks to Adam Scheller who had the answer to the faulty driver. It was a bit of a marathon, but it was worth it! :D
Alan
alpage2
 
Posts: 8
Joined: 2019-07-27 10:56

Re: **SOLVED** TP-Link wifi adapter problem

Postby sunrat » 2019-07-28 23:34

Nice work solving this!
Realtek chips seem to regularly have similar problems I think mainly because the available drivers don't work with newer kernels. Thankfully some of them are rebuilt by wise people to update their kernel compatibility and then posted on Github.
I had a similar problem with an rtl8192eu device for which the driver wouldn't work past kernel 4.4. Thankfully it was rebuilt and posted on Github. That one never did work reliably though, it would work for a few hours and drop connection regularly. I spent an inordinate amount of time researching and applying tweaks to no avail and it now sits in a box in a cupboard, replaced by a much more reliable Atheros-based device.
“ 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: 2753
Joined: 2006-08-29 09:12
Location: Melbourne, Australia

Re: **SOLVED** TP-Link wifi adapter problem

Postby alpage2 » 2019-07-29 07:24

Agreed - having read a bit more around this, Atheros looks like the best choice for a quiet life!! :wink:
Alan
alpage2
 
Posts: 8
Joined: 2019-07-27 10:56


Return to Beginners Questions

Who is online

Users browsing this forum: cooler01 and 7 guests

fashionable