:: Re: [DNG] Wifi dropping ramdomly
Pàgina inicial
Delete this message
Reply to this message
Autor: Bob Proulx
Data:  
A: dng
Assumpte: Re: [DNG] Wifi dropping ramdomly
Jim Murphy via Dng wrote:
> My wifi connection drops randomly. It can sometimes run for days.
> Other times it may drop within hours of a reboot. There seems to be
> no pattern to when. Initially rebooting seemed to be the only way to
> get the network back. Under xfce4 disabling the wifi and/or network,
> then re-enabling them had no effect. After many google searches
> I finally found at:
>
> https://askubuntu.com/questions/26054/how-to-restart-wifi-interface-without-rebooting-it-drops-connection
>
> I now have the alias(zsh):
>
> alias reload_network_module='sudo modprobe -r iwldvm && sudo modprobe
> iwldvm'
>
> to re-enable the wifi. So far this has restored the network connection
> without having to reboot. Strange as it may seem, the wifi connection
> has stopped dropping as frequently since reloading the iwldvm module
> this way.?? FWIW


Is this problematic WiFi Access Point encrypted using WPA/WPA2? Or is
it an open not encrypted Access Point?

I find that WPA/WPA2 APs are perfectly reliable using wpasupplicant
which will handle glitches and reconnecting without problem. But I
find that open APs are problematic. They will often glitch and drop
the connection. And since those are connected to directly from the
Linux kernel the connection simply drops. The WiFi manager utility
monitoring the connection must notice this and retry the connection.
Being a glitch the retry always succeeds. But how well this is
handled depends upon the connection manager.

Up until now I have been using WICD. But of course as all of us know
that is a python 2 program and as we upgrade from Beowulf to Chimaera
we wicd users are forced to find alternatives. The connman network
connection manager is often recommended for those like me who have
been frustrated by network-manager.

> Computer:  ThinkPad X230
>         configuration: broadcast=yes driver=iwlwifi


I normally use an X220 with the same driver. I am using the
firmware-iwlwifi package from non-free. I have no problems with
WPA/WPA2 sites. And some open APs are perfectly reliable. While
other open APs glitch and drop the connection very often. The wicd
manager handles these seemlessly.

> % ls /lib/modules/**/iwldvm.ko
> /lib/modules/5.10.0-10-amd64/kernel/drivers/net/wireless/intel/iwlwifi/dvm/iwldvm.ko
> /lib/modules/5.10.0-9-amd64/kernel/drivers/net/wireless/intel/iwlwifi/dvm/iwldvm.ko


That's the free software portion that is in Linux kernel main.
However to install the iwlwifi driver you will need the files from the
firmware-iwlwifi package. Do you have it installed?

    dpkg -l | grep firmware-iwlwifi


If not then enable the non-free suite and install it.

    apt-get install firmware-iwlwifi


> If anyone has any advice it would be appreciated. Since I have a
> workaround it is just an annoyance.


For some debugging one can run ip monitor and see the status changes
of network devices as they happen.

    ip monitor


And then for example I might associate with an open AP.

    sudo iw dev wlan0 connect "Starbucks WiFi"


And then I might see this from "ip monitor". Also similar data is
logged to the /var/log/syslog file.

    10.0.0.1 dev wlan0 lladdr 74:83:c2:78:b0:8b STALE
    10.0.0.1 dev wlan0 lladdr 74:83:c2:78:b0:8b PROBE
    10.0.0.1 dev wlan0 lladdr 74:83:c2:78:b0:8b REACHABLE
    10.0.0.1 dev wlan0 lladdr 74:83:c2:78:b0:8b STALE
    10.0.0.1 dev wlan0 lladdr 74:83:c2:78:b0:8b PROBE
    10.0.0.1 dev wlan0 lladdr 74:83:c2:78:b0:8b REACHABLE


Everything is all good. And then see this.

    Deleted 10.0.0.1 dev wlan0 lladdr 74:83:c2:78:b0:8b REACHABLE
    Deleted ff02::2 dev wlan0 lladdr 33:33:00:00:00:02 NOARP
    Deleted ff02::16 dev wlan0 lladdr 33:33:00:00:00:16 NOARP
    2: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
        link/ether 20:1e:88:78:61:94 brd ff:ff:ff:ff:ff:ff
    2: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP>
        link/ether
    10.0.0.1 dev wlan0  FAILED
    10.0.0.1 dev wlan0  FAILED
    10.0.0.1 dev wlan0  FAILED
    10.0.0.1 dev wlan0  FAILED
    10.0.0.1 dev wlan0  FAILED
    Deleted 2: wlan0    inet 10.0.8.118/20 brd 10.0.15.255 scope global dynamic wlan0
           valid_lft 3826sec preferred_lft 3826sec
    Deleted 10.0.0.0/20 dev wlan0 proto kernel scope link src 10.0.8.118 linkdown
    Deleted broadcast 10.0.15.255 dev wlan0 table local proto kernel scope link src 10.0.8.118 linkdown
    Deleted local 10.0.8.118 dev wlan0 table local proto kernel scope host src 10.0.8.118
    Deleted 10.0.0.1 dev wlan0  INCOMPLETE


A glitch has caused the connection to the open access point to fail
and the connection was dropped. I find that the local Starbucks WiFi
does this very often. Another local coffee shop with an open AP
however is absolutely reliable and never drops the connection.

A network connection manager would retry the connection and that would
immediately succeed. Here I am working the task manually so I am the
connection manager.

    sudo iw dev wlan0 connect "Starbucks WiFi"


That's normally handled automatically by wicd. I don't use
network-manager as it is too unreliable for me to tolerate. I am
still getting to know connman and do not know how it handles this type
of glitch which causes a dropout. (And none of what I said above here
talks about IPv4 DHCP or IPv6 dynamic address assignment. Just the
AP connection and just for open access points.)

Perhaps this ramble has been somewhat useful. Hopefully. Sorry it is
such a jumble.

Bob