Rootserver Sponsor

webtropia"

Donations

Please support your operating system's further development:

donate"

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
alexkOffline
Post subject: Wifi won't reconnect until adapter is unplugged/replugged  PostPosted: 27.03.2016, 01:41



Joined: 2010-10-01
Posts: 288

Status: Offline
In the last month or two, I periodically lose my wifi connection to a home router and am unable to reconnect no matter what I try, until I unplug and replug the USB wifi adapter, after which it always connects right away. Is there a way to reproduce that operation by software? Rebooting also brings wifi back. I'm never able to reconnect by DHCP or static until I do one of those two things.

After link goes down:
      Code:
# iw dev wlan0 info
Interface wlan0
        ifindex 8
        wdev 0x300000001
        addr 74:ea:3a:90:4a:a2
        type managed
        wiphy 3
        channel 6 (2437 MHz), width: 20 MHz (no HT), center1: 2437 MHz
root@MSAK1:/etc/network# ifconfig wlan0
wlan0: flags=4163<UP>  mtu 1500
        inet 169.254.18.158  netmask 255.255.0.0  broadcast 169.254.255.255
        inet6 fe80::5e15:9b34:bd5:d585  prefixlen 64  scopeid 0x20<link>
        ether 74:ea:3a:90:4a:a2  txqueuelen 1000  (Ethernet)
        RX packets 271807  bytes 167457178 (159.6 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 180832  bytes 29254956 (27.8 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

root@MSAK1:/etc/network# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         0.0.0.0         0.0.0.0         U     308    0        0 wlan0
link-local      0.0.0.0         255.255.0.0     U     308    0        0 wlan0
192.168.122.0   0.0.0.0         255.255.255.0   U     0      0        0 virbr0

After unplugging/replugging the USB wifi adapter:
      Code:
iw dev wlan0 info
Interface wlan0
        ifindex 9
        wdev 0x400000001
        addr 74:ea:3a:90:4a:a2
        type managed
        wiphy 4
        channel 6 (2437 MHz), width: 20 MHz (no HT), center1: 2437 MHz
root@MSAK1:/etc/network# ifconfig wlan0
wlan0: flags=4163<UP>  mtu 1500
        inet 192.168.1.5  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::5e15:9b34:bd5:d585  prefixlen 64  scopeid 0x20<link>
        ether 74:ea:3a:90:4a:a2  txqueuelen 1000  (Ethernet)
        RX packets 4135  bytes 3112725 (2.9 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 4048  bytes 713463 (696.7 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

root@MSAK1:/etc/network# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         Wireless_Broadb 0.0.0.0         UG    0      0        0 wlan0
default         Wireless_Broadb 0.0.0.0         UG    309    0        0 wlan0
link-local      0.0.0.0         255.255.0.0     U     1000   0        0 wlan0
192.168.1.0     0.0.0.0         255.255.255.0   U     309    0        0 wlan0
192.168.122.0   0.0.0.0         255.255.255.0   U     0      0        0 virbr0

infobash -v3
Host/Kernel/OS  "MSAK1" running Linux 4.5.0-0.slh.1-aptosid-amd64 x86_64 [ sidux 2009-02 Αιθήρ - kde-full - (200907141427) ]
CPU Info        4x Intel Core i5-2500K @ 6144 KB cache flags( sse3 ht nx lm vmx ) clocked at [ 1902.269 MHz ]
Videocard       Intel 2nd Generation Core Processor Family Integrated Graphics Controller  X.Org 1.18.2  [ [email protected] ]
Network cards   Intel 82579V Gigabit
                Atheros AR9271 802.11n
Processes 321 | Uptime 1day | Memory 5772.9/15961.0MB | HDD WDC WD3200AAKS-0 Size 320GB (64%used) | Client Shell | Infobash v3.50
 
 View user's profile Send private message Yahoo Messenger  
Reply with quote Back to top
slhOffline
Post subject: RE: Wifi won  PostPosted: 27.03.2016, 03:05



Joined: 2010-08-25
Posts: 962

Status: Offline
When does this happen?
- while transmitting data
- after the link has been idle for longer
- after suspend/ resume
- after you moved, eventually out of range (at least for a bit)

Using wpa_cli, you can issue the reconnect command for wpa_supplicant.
 
 View user's profile Send private message  
Reply with quote Back to top
alexkOffline
Post subject: RE: Wifi won  PostPosted: 28.03.2016, 03:03



Joined: 2010-10-01
Posts: 288

Status: Offline
It happens while transmitting data, e.g. in the middle of web surfing. I'll try wpa_cli, thanks.
 
 View user's profile Send private message Yahoo Messenger  
Reply with quote Back to top
slhOffline
Post subject: RE: Wifi won  PostPosted: 28.03.2016, 05:02



Joined: 2010-08-25
Posts: 962

Status: Offline
You can also keep wpa_cli running (as root) to watch wireless events (rekeying, reconnects, etc.) go by, which might provide further hints why you're getting into trouble (also take a look at dmesg).
 
 View user's profile Send private message  
Reply with quote Back to top
alexkOffline
Post subject: RE: Wifi won  PostPosted: 11.04.2016, 14:10



Joined: 2010-10-01
Posts: 288

Status: Offline
I purged Network Manager just before starting this thread and haven't had this issue since. Previously, I had had the issue even when switching /etc/network/interfaces to ifupdown interface control, as far as I recall, but the most recent occurrences were with Network Manager controlling the interface. I would have to reinstall Network Manager to see if it affects this issue. I had been using the NM plasma widget as well.
 
 View user's profile Send private message Yahoo Messenger  
Reply with quote Back to top
alexkOffline
Post subject: RE: Wifi won  PostPosted: 09.05.2016, 03:05



Joined: 2010-10-01
Posts: 288

Status: Offline
I still have this issue, even without Network Manager. wpa_cli commands don't seem to have any effect. I can still only reconnect by unplugging and replugging the USB wifi adapter.
      Code:
# wpa_cli -i wlan0 status
bssid=00:18:01:e7:43:99
freq=2437
ssid=CIOY0
id=0
mode=station
pairwise_cipher=WEP-40
group_cipher=WEP-40
key_mgmt=NONE
wpa_state=COMPLETED
p2p_device_address=74:ea:3a:90:4a:a2
address=74:ea:3a:90:4a:a2
uuid=846f4942-ffee-5bc4-aadc-3f5c39ed517d
root@MSAK1:/var/run/wpa_supplicant# wpa_cli -i wlan0 reassociate
OK
root@MSAK1:/var/run/wpa_supplicant# wpa_cli interface
Selected interface 'wlan0'
Available interfaces:
wlan0
root@MSAK1:/var/run/wpa_supplicant# wpa_cli status
Selected interface 'wlan0'
bssid=00:18:01:e7:43:99
freq=2437
ssid=CIOY0
id=0
mode=station
pairwise_cipher=WEP-40
group_cipher=WEP-40
key_mgmt=NONE
wpa_state=COMPLETED
p2p_device_address=74:ea:3a:90:4a:a2
address=74:ea:3a:90:4a:a2
uuid=846f4942-ffee-5bc4-aadc-3f5c39ed517d
root@MSAK1:/var/run/wpa_supplicant# ll
total 0
root@MSAK1:/var/run/wpa_supplicant# wpa_cli reconfigure
Selected interface 'wlan0'
FAIL
root@MSAK1:/var/run/wpa_supplicant# tail /var/log/syslog
May  8 22:26:45 MSAK1 kernel: [50532.489215] wlan0: authenticated
May  8 22:26:45 MSAK1 kernel: [50532.489356] ath9k_htc 3-1.1:1.0 wlan0: disabling HT/VHT due to WEP/TKIP use
May  8 22:26:45 MSAK1 kernel: [50532.489361] ath9k_htc 3-1.1:1.0 wlan0: disabling HT as WMM/QoS is not supported by the AP
May  8 22:26:45 MSAK1 kernel: [50532.489364] ath9k_htc 3-1.1:1.0 wlan0: disabling VHT as WMM/QoS is not supported by the AP
May  8 22:26:45 MSAK1 kernel: [50532.490108] wlan0: associate with 00:18:01:e7:43:99 (try 1/3)
May  8 22:26:45 MSAK1 wpa_supplicant[18395]: wlan0: CTRL-EVENT-REGDOM-CHANGE init=USER type=COUNTRY alpha2=US
May  8 22:26:45 MSAK1 kernel: [50532.492217] wlan0: RX AssocResp from 00:18:01:e7:43:99 (capab=0x431 status=0 aid=2)
May  8 22:26:45 MSAK1 wpa_supplicant[18395]: wlan0: Associated with 00:18:01:e7:43:99
May  8 22:26:45 MSAK1 kernel: [50532.497799] wlan0: associated
May  8 22:26:45 MSAK1 wpa_supplicant[18395]: wlan0: CTRL-EVENT-CONNECTED - Connection to 00:18:01:e7:43:99 completed [id=0 id_str=]
root@MSAK1:/var/run/wpa_supplicant# ifconfig wlan0
wlan0: flags=4163<UP>  mtu 1500
        inet6 fe80::76ea:3aff:fe90:4aa2  prefixlen 64  scopeid 0x20<link>
        ether 74:ea:3a:90:4a:a2  txqueuelen 1000  (Ethernet)
        RX packets 149593  bytes 100599540 (95.9 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 122166  bytes 64068646 (61.1 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

 
 View user's profile Send private message Yahoo Messenger  
Reply with quote Back to top
slhOffline
Post subject: RE: Wifi won  PostPosted: 09.05.2016, 03:17



Joined: 2010-08-25
Posts: 962

Status: Offline
wpa_cli can also be used interactively (by just calling "wpa_cli", respectively "wpa_cli -i wlan0"), if you run it like that, you end up on a special "shell" (status, reconnect, etc. work there) to the running wpa_supplicant instance (and you also get all warnings and errors from the running wpa_supplicant instance in real time; starting with the trivial rekeying message to eventual disconnect/ reconnection attempts).
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 12 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by Zafenio