Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
USB wifi stick doesn't get active connection in any way
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Pums
n00b
n00b


Joined: 03 Jun 2020
Posts: 51

PostPosted: Tue Jul 14, 2020 12:48 pm    Post subject: USB wifi stick doesn't get active connection in any way Reply with quote

I'm having trouble with USB wifi sticks on a desktop computer, I can't get them working properly. One could think it's a hardware problem, but both sticks work properly "out of the box" on Arch and Fedora 32.

Sorry if it's long, maybe confused and I give many useless stuff, but I tried many things and I spent a lot of time on it. It seems that outputs change everyday, but at last I can't have a stable connection, and most of time no connection at all.

I'll only refer to the ASUSTek Ralink RT2571, wich driver is rt2500usb (with other stick, a Sagem, I can't do anything, driver doesn' load apparently).

Kernel options have been rechecked, I don't think it's the problem. I've made recent changes to my kernel and now I have new network interfaces : dummy0, eql, ifb0 and ifb1. Wifi never worked normally before anyway with other kernels.

At start, I check that dhcpcd, NetworkManager, wpa_supplicant, iwd are stopped, and I remove /etc/init.d/wlan0 if it exists.

I plug on the stick:

Code:

$ dmesg
[...]
[  512.617225] usb 1-9: new high-speed USB device number 3 using xhci_hcd
[  512.905086] usb 1-9: New USB device found, idVendor=0b05, idProduct=1706, bcdDevice= 0.01
[  512.905087] usb 1-9: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  512.905087] usb 1-9: Product: 802.11g WLAN Drive
[  512.905088] usb 1-9: Manufacturer: ASUS
[  513.052516] usb 1-9: reset high-speed USB device number 3 using xhci_hcd
[  513.362315] ieee80211 phy0: rt2x00_set_chip: Info - Chipset detected - rt: 2570, rf: 0005, rev: 0005
[  513.362933] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[  513.363649] usbcore: registered new interface driver rt2500usb


The ultimate line "usbcore: registered new interface driver rt2500usb" didn't appear last time I proved it.

Code:

# lsusb
Bus 001 Device 003: ID 0b05:1706 ASUSTek Computer, Inc. WL-167G v1 802.11g Adapter [Ralink RT2571]
# lsmod |grep rt2
rt2500usb              36864  0
rt2x00usb              28672  1 rt2500usb
rt2x00lib              65536  2 rt2500usb,rt2x00usb
mac80211              880640  2 rt2x00lib,rt2x00usb
cfg80211              811008  2 rt2x00lib,mac80211
led_class              20480  2 input_leds,rt2x00lib
 # ip a
7: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 00:18:f3:2b:b3:3a brd ff:ff:ff:ff:ff:ff


Last time "ip a" gave "pfifo_fast" instead of noop.

I try the wpa_supplicant way:

Code:

# rc-service wpa_supplicant start
 * Starting WPA Supplicant Daemon ...
Successfully initialized wpa_supplicant   
# dhcpcd wlan0
wlan0: waiting for carrier
timed out
dhcpcd exited
 # rc-service wpa_supplicant stop
 * Stopping WPA Supplicant Daemon ...   


/etc/wpa_supplicant/wpa_supplicant.conf only contains a network section created with wpa_passphrase (rechecked) and the two following lines:

Code:

ctrl_interface=DIR=/run/wpa_supplicant GROUP=wheel
update_config=1


I try:

Code:

 # wpa_supplicant -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf
Successfully initialized wpa_supplicant
wlan0: SME: Trying to authenticate with 68:a3:78:03:64:71 (SSID='MYSSID' freq=2412 MHz)
wlan0: Trying to associate with 68:a3:78:03:64:71 (SSID='MYSSID' freq=2412 MHz)
wlan0: Associated with 68:a3:78:03:64:71
wlan0: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
wlan0: CTRL-EVENT-DISCONNECTED bssid=68:a3:78:03:64:71 reason=2
wlan0: WPA: 4-Way Handshake failed - pre-shared key may be incorrect
wlan0: CTRL-EVENT-SSID-TEMP-DISABLED id=1 ssid="MYSSID" auth_failures=1 duration=10 reason=WRONG_KEY
wlan0: CTRL-EVENT-REGDOM-CHANGE init=CORE type=WORLD
wlan0: CTRL-EVENT-SSID-REENABLED id=1 ssid="MYSSID"
wlan0: SME: Trying to authenticate with 68:a3:78:03:64:71 (SSID='MYSSID' freq=2412 MHz)
wlan0: Trying to associate with 68:a3:78:03:64:71 (SSID='MYSSID' freq=2412 MHz)


It keeps on that loop, and gets no IP.

I cancel and stop the wpa daemon.

Other times it stays on "Successfully initialized wpa_supplicant" (it doesn't give me back the prompt), but still no IP.
If I launch the daemon and wpa_gui, and try to connect from there, then I get on the terminal:

Code:

wlan0: SME: Trying to authenticate with 68:a3:78:03:64:71 (SSID='MYSSID' freq=2412 MHz)
wlan0: SME: Authentication request to the driver failed
wlan0: SME: Trying to authenticate with 68:a3:78:03:64:71 (SSID='MYSSID' freq=2412 MHz)
wlan0: SME: Authentication request to the driver failed
wlan0: SME: Trying to authenticate with 68:a3:78:03:64:71 (SSID='MYSSID' freq=2412 MHz)
wlan0: SME: Authentication request to the driver failed
wlan0: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="MYSSID" auth_failures=1 duration=10 reason=CONN_FAILED
wlan0: CTRL-EVENT-SSID-REENABLED id=0 ssid="MYSSID"
wlan0: SME: Trying to authenticate with 68:a3:78:03:64:71 (SSID='MYSSID' freq=2412 MHz)
wlan0: SME: Authentication request to the driver failed
wlan0: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="MYSSID" auth_failures=2 duration=20 reason=CONN_FAILED
wlan0: CTRL-EVENT-SSID-REENABLED id=0 ssid="MYSSID"
wlan0: SME: Trying to authenticate with 68:a3:78:03:64:71 (SSID='MYSSID' freq=2412 MHz)
wlan0: SME: Authentication request to the driver failed
wlan0: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="MYSSID" auth_failures=3 duration=30 reason=CONN_FAILED
wlan0: CTRL-EVENT-SSID-REENABLED id=0 ssid="MYSSID"
wlan0: SME: Trying to authenticate with 68:a3:78:03:64:71 (SSID='MYSSID' freq=2412 MHz)
wlan0: SME: Authentication request to the driver failed
wlan0: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="MYSSID" auth_failures=4 duration=60 reason=CONN_FAILED


"The driver failed" today, first time I remeber to see it...

Other times:

Code:

# wpa_supplicant -B -i wlan -c <(wpa_passphrase MYSSID passphrase)
Successfully initialized wpa_supplicant
 # ip a
: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:18:f3:2b:b3:3a brd ff:ff:ff:ff:ff:ff


Let's try something else:

Code:

# rc-service wpa_supplicant start
 * Starting WPA Supplicant Daemon ...
Successfully initialized wpa_supplicant   
# wpa_cli
wpa_cli v2.9
Copyright (c) 2004-2019, Jouni Malinen <j@w1.fi> and contributors

This software may be distributed under the terms of the BSD license.
See README for more details.

Selected interface 'wlan0'

Interactive mode

<3>CTRL-EVENT-SCAN-RESULTS
<3>SME: Trying to authenticate with 68:a3:78:03:64:71 (SSID='MYSSID' freq=2412 MHz)
<3>SME: Authentication request to the driver failed
<3>CTRL-EVENT-SCAN-STARTED
<3>CTRL-EVENT-SCAN-RESULTS
<3>SME: Trying to authenticate with 68:a3:78:03:64:71 (SSID='MYSSID' freq=2412 MHz)
<3>SME: Authentication request to the driver failed
<3>CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="MYSSID" auth_failures=1 duration=10 reason=CONN_FAILED
<3>CTRL-EVENT-SCAN-STARTED
<3>CTRL-EVENT-SCAN-RESULTS
<3>CTRL-EVENT-SSID-REENABLED id=0 ssid="MYSSID"
<3>SME: Trying to authenticate with 68:a3:78:03:64:71 (SSID='MYSSID' freq=2412 MHz)
<3>SME: Authentication request to the driver failed


And so on. No interaction possible.

Yesterday it was different, I did the following:

Code:

 # wpa_supplicant -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf
Successfully initialized wpa_supplicant


I did not get the prompt back.

In another terminal:

Code:

# wpa_cli
wpa_cli v2.9
Copyright (c) 2004-2019, Jouni Malinen <j@w1.fi> and contributors
This software may be distributed under the terms of the BSD license.
See README for more details.
Selected interface 'wlan0'
Interactive mode
> scan
OK
<3>CTRL-EVENT-SCAN-STARTED
<3>CTRL-EVENT-SCAN-RESULTS
<3>CTRL-EVENT-NETWORK-NOT-FOUND
> scan_results
[...] (it's ok)
> add_network
0
> set_network 0 ssid "MYSSID"
OK
> set_network 0 psk "passphrase"
OK
> enable_network 0
OK
<3>CTRL-EVENT-SCAN-STARTED
<3>CTRL-EVENT-SCAN-RESULTS
<3>SME: Trying to authenticate with 68:a3:78:03:64:71 (SSID='MYSSID' freq=2412 MHz)
<3>Trying to associate with 68:a3:78:03:64:71 (SSID='MYSSID' freq=2412 MHz)
<3>Associated with 68:a3:78:03:64:71
<3>CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
<3>WPA: Key negotiation completed with 68:a3:78:03:64:71 [PTK=CCMP GTK=CCMP]
<3>CTRL-EVENT-CONNECTED - Connection to 68:a3:78:03:64:71 completed [id=0 id_str=]
<3>CTRL-EVENT-SCAN-STARTED
<3>CTRL-EVENT-SCAN-RESULTS
> save_config
OK
> quit


While on the first terminal:

Code:

# wpa_supplicant -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf
Successfully initialized wpa_supplicant
Line 0: failed to parse ssid '"MYSSID'.
wlan0: SME: Trying to authenticate with 68:a3:78:03:64:71 (SSID='MYSSID' freq=2412 MHz)
wlan0: Trying to associate with 68:a3:78:03:64:71 (SSID='MYSSID' freq=2412 MHz)
wlan0: Associated with 68:a3:78:03:64:71
wlan0: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
wlan0: WPA: Key negotiation completed with 68:a3:78:03:64:71 [PTK=CCMP GTK=CCMP]
wlan0: CTRL-EVENT-CONNECTED - Connection to 68:a3:78:03:64:71 completed [id=0 id_str=]


I could not get a proper connection anyway.

Let's try the iwd way after stopping wpa_supplicant daemon:

Code:

# rc-service iwd start
 * Starting iwd ...
# iwctl --passphrase "mypassphrase" station wlan0 connect MYSSID
# ip a
[...]
8: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:18:f3:2b:b3:3a brd ff:ff:ff:ff:ff:ff
    inet6 2a01:e0a:d5:f450:218:f3ff:fe2b:b33a/64 scope global dynamic mngtmpaddr
       valid_lft 86397sec preferred_lft 86397sec
    inet6 fe80::218:f3ff:fe2b:b33a/64 scope link
       valid_lft forever preferred_lft forever


But still no suitable connection (I should have pinged on that moment but I forgot to do so, only checked browser did not work).

Code:

 # rc-service iwd stop
 * Stopping iwd ...                                                      [ ok ]
 # rc-service iwd start
 * Starting iwd ...   
# iwctl --passphrase "mypassphrase" station wlan0 connect MYSSID

Operation failed
 # rc-service iwd restart
 * Stopping iwd ...                                                      [ ok ]
 * Starting iwd ...         
# iwctl --passphrase "mypassphrase" station wlan0 connect MYSSID
0 connect MYSSID
Operation aborted
# rc-service iwd restart
 * Stopping iwd ...                                                      [ ok ]
 * Starting iwd ...
 # iwctl --passphrase "mypassphrase" station wlan0 connect MYSSID
Invalid network name 'MYSSID'


From there it endlessly repeated "Invalid network name"...

At this moment, after stopping iwd I got something new:

Code:

 # rc-service wpa_supplicant start
 * Could not find a wireless interface
 * ERROR: wpa_supplicant failed to start
 


With NetworkManager (on KDE), at least today I notice I need to start the iwd daemon to see the connections from the applet (it doesn't show anything with wpa_supplicant, when it works).

So let's go:

Code:

 # rc-service iwd start
 * Starting iwd ... 
 


Wifi networks appear in nm-applet. If I try to connect to my SSID, I get an error message "No secrets were provided" (I did give him the right passphrase).

If I try to lauch it from System Settings > Connection, I get:

"Network management
Failed to get secrets for MYSSID
No agents were available for this request."

I remove the connection from System Settings and try once again from the applet, I get two "Network Management" notifications: "Connection MYSSID deactivated" and "Wireless Interface (Wlan0) No secrets were provided".

Once, connection eventually failed because device was "busy".

Device disaparread (could not see it with "ip a").

I unplug / replug it on. It appears. I launch iwd daemon, and for the first time I can apparently successfully connect from NM applet...

Code:

# ip a
[...]
18: wlan1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:18:f3:2b:b3:3a brd ff:ff:ff:ff:ff:ff
    inet6 2a01:e0a:d5:f450:5ec8:a814:4a8d:19e5/64 scope global dynamic noprefixroute
       valid_lft 86352sec preferred_lft 86352sec
    inet6 fe80::dda1:be81:a95e:34b5/64 scope link noprefixroute
       valid_lft forever preferred_lft forever


But actually not :

Code:

$ ping google.com
ping: google.com: Temporary failure in name resolution


Same think if I try once again with iwctl (no error message but no ping either).

Another thing apparently new today: if I stop iwd daemon, the interface is no longer visible from "ip a" until I unplug/replug it.

If I try to combinate NM with wpa_supplicant:

Code:

# rc-service wpa_supplicant start
 * Starting WPA Supplicant Daemon ...
Successfully initialized wpa_supplicant                                  [ ok ]
 # rc-service NetworkManager start
 * Starting NetworkManager ...                                           [ ok ]
Connecting...............    0s [offline]
 * Marking NetworkManager as inactive. It will automatically be marked
 * as started after a network connection has been established.
 * WARNING: NetworkManager has started, but is inactive


The applet doesn't show any wifi network.

Let's reboot and try next the netifrc way.

My /etc/conf.d/net:

Code:

modules_wlan0="wpa_supplicant"
config_wlan0="dhcp"


So
Code:

# ln -s net.lo net.wlan0
# /etc/init.d/net.wlan0 start
 * Caching service dependencies ...                                      [ ok ]
 * Bringing up interface wlan0
 *   Starting wpa_supplicant on wlan0 ...
Successfully initialized wpa_supplicant                                  [ ok ]
 *   Starting wpa_cli on wlan0 ...                                       [ ok ]
 *   Backgrounding ... ...
 * WARNING: net.wlan0 has started, but is inactive


Other results that may be useful:

Code:

$ tree /sys/class/net
/sys/class/net
|-- dummy0 -> ../../devices/virtual/net/dummy0
|-- eql -> ../../devices/virtual/net/eql
|-- eth0 -> ../../devices/pci0000:00/0000:00:1c.7/0000:03:00.0/net/eth0
|-- ifb0 -> ../../devices/virtual/net/ifb0
|-- ifb1 -> ../../devices/virtual/net/ifb1
|-- lo -> ../../devices/virtual/net/lo
`-- wlan0 -> ../../devices/pci0000:00/0000:00:14.0/usb1/1-9/1-9:1.0/net/wlan0
# iw dev
phy#0
        Interface wlan0
                ifindex 8
                wdev 0x2
                addr 00:18:f3:2b:b3:3a
                ssid MYSSID
                type managed
                channel 1 (2412 MHz), width: 20 MHz (no HT), center1: 2412 MHz
                txpower 20.00 dBm
$ dmesg | grep -i -E 'xx:xx.x|wlan0|iwl|80211'
[    3.673046] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    3.673179] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    4.118962] ieee80211 phy0: rt2x00_set_chip: Info - Chipset detected - rt: 2570, rf: 0005, rev: 0005
[    4.119207] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[ 1682.387321] wlan0: authenticate with 68:a3:78:03:64:71
[ 1682.428250] wlan0: send auth to 68:a3:78:03:64:71 (try 1/3)
[ 1682.430220] wlan0: authenticated
[ 1682.430926] wlan0: associate with 68:a3:78:03:64:71 (try 1/3)
[ 1682.434597] wlan0: RX AssocResp from 68:a3:78:03:64:71 (capab=0x411 status=0 aid=2)
[ 1682.435334] wlan0: associated
[ 1682.445942] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[ 1760.277821] wlan0: deauthenticating from 68:a3:78:03:64:71 by local choice (Reason: 3=DEAUTH_LEAVING)
[ 1810.091169] wlan0: authenticate with 68:a3:78:03:64:71
[ 1810.134629] wlan0: send auth to 68:a3:78:03:64:71 (try 1/3)
[ 1810.140116] wlan0: authenticated
[ 1810.140975] wlan0: associate with 68:a3:78:03:64:71 (try 1/3)
[ 1810.145851] wlan0: RX AssocResp from 68:a3:78:03:64:71 (capab=0x411 status=0 aid=2)
[ 1810.146684] wlan0: associated
[ 1811.153448] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[ 1888.708311] wlan0: deauthenticating from 68:a3:78:03:64:71 by local choice (Reason: 3=DEAUTH_LEAVING)
[ 1896.011389] wlan0: authenticate with 68:a3:78:03:64:71
[ 1896.056958] wlan0: send auth to 68:a3:78:03:64:71 (try 1/3)
[ 1896.059356] wlan0: authenticated
[ 1896.059974] wlan0: associate with 68:a3:78:03:64:71 (try 1/3)
[ 1896.065777] wlan0: RX AssocResp from 68:a3:78:03:64:71 (capab=0x411 status=0 aid=2)
[ 1896.066590] wlan0: associated
[ 1896.073527] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[ 1912.392360] wlan0: deauthenticating from 68:a3:78:03:64:71 by local choice (Reason: 3=DEAUTH_LEAVING)
[ 1930.507256] wlan0: authenticate with 68:a3:78:03:64:71
[ 1930.534306] wlan0: send auth to 68:a3:78:03:64:71 (try 1/3)
[ 1930.536031] wlan0: authenticated
[ 1930.536873] wlan0: associate with 68:a3:78:03:64:71 (try 1/3)
[ 1930.541527] wlan0: RX AssocResp from 68:a3:78:03:64:71 (capab=0x411 status=0 aid=2)
[ 1930.542110] wlan0: associated
[ 1930.546972] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[ 2017.141777] wlan0: deauthenticating from 68:a3:78:03:64:71 by local choice (Reason: 3=DEAUTH_LEAVING)
[ 2024.763326] wlan0: authenticate with 68:a3:78:03:64:71
[ 2024.795361] wlan0: send auth to 68:a3:78:03:64:71 (try 1/3)
[ 2024.799264] wlan0: authenticated
[ 2024.799946] wlan0: associate with 68:a3:78:03:64:71 (try 1/3)
[ 2024.803646] wlan0: RX AssocResp from 68:a3:78:03:64:71 (capab=0x411 status=0 aid=2)
[ 2024.804314] wlan0: associated
[ 2024.809186] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[ 2031.080853] wlan0: deauthenticating from 68:a3:78:03:64:71 by local choice (Reason: 3=DEAUTH_LEAVING)
[ 2056.083359] wlan0: authenticate with 68:a3:78:03:64:71
[ 2056.128172] wlan0: send auth to 68:a3:78:03:64:71 (try 1/3)
[ 2056.129953] wlan0: authenticated
[ 2056.130974] wlan0: associate with 68:a3:78:03:64:71 (try 1/3)
[ 2056.134637] wlan0: RX AssocResp from 68:a3:78:03:64:71 (capab=0x411 status=0 aid=2)
[ 2056.135245] wlan0: associated
[ 2056.140195] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[ 2081.979349] wlan0: deauthenticating from 68:a3:78:03:64:71 by local choice (Reason: 3=DEAUTH_LEAVING)
[ 2122.891248] wlan0: authenticate with 68:a3:78:03:64:71
[ 2122.921395] wlan0: send auth to 68:a3:78:03:64:71 (try 1/3)
[ 2122.923119] wlan0: authenticated
[ 2122.924938] wlan0: associate with 68:a3:78:03:64:71 (try 1/3)
[ 2122.928964] wlan0: RX AssocResp from 68:a3:78:03:64:71 (capab=0x411 status=0 aid=2)
[ 2122.929628] wlan0: associated
[ 2122.934621] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[ 2150.988825] wlan0: deauthenticating from 68:a3:78:03:64:71 by local choice (Reason: 3=DEAUTH_LEAVING)
[ 2167.043175] wlan0: authenticate with 68:a3:78:03:64:71
[ 2167.065536] wlan0: send auth to 68:a3:78:03:64:71 (try 1/3)
[ 2168.251223] wlan0: authenticate with 68:a3:78:03:64:71
[ 2168.251225] wlan0: send auth to 68:a3:78:03:64:71 (try 1/3)
[ 2168.265376] wlan0: authenticated
[ 2168.265971] wlan0: associate with 68:a3:78:03:64:71 (try 1/3)
[ 2168.269557] wlan0: RX AssocResp from 68:a3:78:03:64:71 (capab=0x411 status=0 aid=2)
[ 2168.270198] wlan0: associated
[ 2168.276059] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready


If I desactivate wifi from NM applet I get the following :

Code:

# ifconfig -v wlan0 up
SIOCSIFFLAGS: Operation not possible due to RF-kill
WARNING: at least one error occured. (-1)


If I activate it, "ifconfig -v wlan0 up" doesn't return anything but still no ping.

Any help welcome :x
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3514

PostPosted: Tue Jul 14, 2020 3:18 pm    Post subject: Re: USB wifi stick doesn't get active connection in any way Reply with quote

Pums wrote:
I'm having trouble with USB wifi sticks on a desktop computer, I can't get them working properly. One could think it's a hardware problem, but both sticks work properly "out of the box" on Arch and Fedora 32.

Sorry if it's long, maybe confused and I give many useless stuff, but I tried many things and I spent a lot of time on it. It seems that outputs change everyday, but at last I can't have a stable connection, and most of time no connection at all.

I'll only refer to the ASUSTek Ralink RT2571, wich driver is rt2500usb (with other stick, a Sagem, I can't do anything, driver doesn' load apparently).

Kernel options have been rechecked, I don't think it's the problem. I've made recent changes to my kernel and now I have new network interfaces : dummy0, eql, ifb0 and ifb1. Wifi never worked normally before anyway with other kernels.

At start, I check that dhcpcd, NetworkManager, wpa_supplicant, iwd are stopped, and I remove /etc/init.d/wlan0 if it exists.

I plug on the stick:

Code:

$ dmesg
[...]
[  512.617225] usb 1-9: new high-speed USB device number 3 using xhci_hcd
[  512.905086] usb 1-9: New USB device found, idVendor=0b05, idProduct=1706, bcdDevice= 0.01
[  512.905087] usb 1-9: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  512.905087] usb 1-9: Product: 802.11g WLAN Drive
[  512.905088] usb 1-9: Manufacturer: ASUS
[  513.052516] usb 1-9: reset high-speed USB device number 3 using xhci_hcd
[  513.362315] ieee80211 phy0: rt2x00_set_chip: Info - Chipset detected - rt: 2570, rf: 0005, rev: 0005
[  513.362933] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[  513.363649] usbcore: registered new interface driver rt2500usb


The ultimate line "usbcore: registered new interface driver rt2500usb" didn't appear last time I proved it.

Code:

# lsusb
Bus 001 Device 003: ID 0b05:1706 ASUSTek Computer, Inc. WL-167G v1 802.11g Adapter [Ralink RT2571]
# lsmod |grep rt2
rt2500usb              36864  0
rt2x00usb              28672  1 rt2500usb
rt2x00lib              65536  2 rt2500usb,rt2x00usb
mac80211              880640  2 rt2x00lib,rt2x00usb
cfg80211              811008  2 rt2x00lib,mac80211
led_class              20480  2 input_leds,rt2x00lib
 # ip a
7: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 00:18:f3:2b:b3:3a brd ff:ff:ff:ff:ff:ff


Last time "ip a" gave "pfifo_fast" instead of noop.

I try the wpa_supplicant way:

Code:

# rc-service wpa_supplicant start
 * Starting WPA Supplicant Daemon ...
Successfully initialized wpa_supplicant   
# dhcpcd wlan0
wlan0: waiting for carrier
timed out
dhcpcd exited
 # rc-service wpa_supplicant stop
 * Stopping WPA Supplicant Daemon ...   


/etc/wpa_supplicant/wpa_supplicant.conf only contains a network section created with wpa_passphrase (rechecked) and the two following lines:

Code:

ctrl_interface=DIR=/run/wpa_supplicant GROUP=wheel
update_config=1


I try:

Code:

 # wpa_supplicant -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf
Successfully initialized wpa_supplicant
wlan0: SME: Trying to authenticate with 68:a3:78:03:64:71 (SSID='MYSSID' freq=2412 MHz)
wlan0: Trying to associate with 68:a3:78:03:64:71 (SSID='MYSSID' freq=2412 MHz)
wlan0: Associated with 68:a3:78:03:64:71
wlan0: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
wlan0: CTRL-EVENT-DISCONNECTED bssid=68:a3:78:03:64:71 reason=2
wlan0: WPA: 4-Way Handshake failed - pre-shared key may be incorrect
...


So the PSK ( pre-shared key ) may be incorrect.
How did you enter the pre-shared key? Did you use wpa_gui?


Last edited by charles17 on Tue Jul 14, 2020 3:19 pm; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 46322
Location: 56N 3W

PostPosted: Tue Jul 14, 2020 3:19 pm    Post subject: Reply with quote

Pums,

Your wifi working but its cycling.
Code:
...
[ 1682.445942] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[ 1760.277821] wlan0: deauthenticating from 68:a3:78:03:64:71 by local choice (Reason: 3=DEAUTH_LEAVING)
[ 1810.091169] wlan0: authenticate with 68:a3:78:03:64:71
[ 1810.134629] wlan0: send auth to 68:a3:78:03:64:71 (try 1/3)
[ 1810.140116] wlan0: authenticated
[ 1810.140975] wlan0: associate with 68:a3:78:03:64:71 (try 1/3)
[ 1810.145851] wlan0: RX AssocResp from 68:a3:78:03:64:71 (capab=0x411 status=0 aid=2)
[ 1810.146684] wlan0: associated
...


deauthenticating from 68:a3:78:03:64:71 by local choice (Reason: 3=DEAUTH_LEAVING means that the wifi was asked to leave the network.

You have several network managers trying to manage your wifi. Each unaware of all the others.

Proceed as follows.

Stop all of your network managers from being started at boot. When this stage is reached, your system will boot with no networking.
That's good. Its an essential test to pass.
Choose exactly one network manager to start at boot. That will stop the cycling.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Pums
n00b
n00b


Joined: 03 Jun 2020
Posts: 51

PostPosted: Tue Jul 14, 2020 4:29 pm    Post subject: Reply with quote

NeddySeagoon wrote:
Pums,

Stop all of your network managers from being started at boot. When this stage is reached, your system will boot with no networking.
That's good. Its an essential test to pass.
Choose exactly one network manager to start at boot. That will stop the cycling.


Thanks a lot for your help.

Actually I eventually understand there are several mixed issues here (wrong password one time, NM conflict, DNS problem elsewhere...).

I could solve the main problem thanks to help received on #gentoo IRC. I could get a connection with the stick starting from scratch as you advice, using wpa_supplicant, BUT I also have a DNS issue, I was not aware of that, so I thought my network config was bad and I kept on trying new useless things desperately.

I mark this post as solved, now I'll have to fix that DNS issue.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum