[pkg-wicd-maint] Bug#932042: Bug#932042: wicd-daemon: does not automatically reconnect on network connection loss when this is enabled

Vincent Lefevre vincent at vinc17.net
Mon Jul 15 00:17:48 BST 2019


On 2019-07-14 15:30:01 +0200, Axel Beckert wrote:
> So I suspect that finding the reason for the "Unable to autoconnect,
> you'll have to manually connect" message is what would help to solve
> this.

I have an idea of what could have happened. When I did the test,
the network was not available for a few seconds; in particular,
if there was a scan or a connection attempt at that time, this
network could not be visible.

Thus I suppose that after the connection loss, wicd tried to
reconnect immediately, but the network was not there, and it failed
("GetCurrentNetworkID: Returning -1, current network not found"
in the log). Then wicd switched to the autoconnection feature
("Autoconnecting..." in the log), and could not due to my settings
(no networks had the "Automatically connect to this network" set).

... After looking at monitor.py, this seems to be the reason:

            # If we just lost a wireless connection, try to connect to that
            # network again.  Otherwise just call Autoconnect.
            cur_net_id = wireless.GetCurrentNetworkID(self.iwconfig)
            if from_wireless and cur_net_id > -1:
                # make sure disconnect scripts are run
                # before we reconnect
                print 'Disconnecting from network'
                wireless.DisconnectWireless()
                print 'Trying to reconnect to last used wireless ' + \
                      'network'
                wireless.ConnectWireless(cur_net_id)
            else:
                daemon.AutoConnect(True, reply_handler=reply_handle,
                                   error_handler=err_handle)

Here, cur_net_id was -1 (network temporarily unavailable), and the
"else" case was executed.

On connection loss, wicd should keep on trying to connect to what
was the current network, just as if it had "Automatically connect
to this network" set. This is important. For instance, a hotspot
could reboot. In my Gemini WiFi case (not the test), I don't know
what happened, as my Gemini device was still running and I hadn't
touched it; perhaps a bad reception due to some nearby device...

-- 
Vincent Lefèvre <vincent at vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



More information about the pkg-wicd-maint mailing list