:: Re: [DNG] Automatic connections: ex…
Top Page
Delete this message
Reply to this message
Author: ibid.ag
Date:  
To: Edward Bartolo
CC: dng
Subject: Re: [DNG] Automatic connections: expected behaviour from netman

On Sun, Sep 13, 2015 at 05:20:25PM +0200, Edward Bartolo wrote:
> [moved to the top, in hope that you'll re-read it ;-)]
> > -wpa_supplicant is a daemon designed to autoconnect to wireless
> > networks, supporting roaming and just about every type of wireless
> > network.
> >
> > -the wpa_supplicant plugins are scripts that allow "ifup wlan0"
> > to configure wlan0 in EITHER of two ways:
> >  (a) start wpa_supplicant with no config and add a single network:
> > iface wlan0 inet dhcp
> >     wpa-ssid "foo"
> >     wpa-psk "topsecretpassword"
> >  (b) start wpa_supplicant with a pre-defined config containing all
> >  the networks, and configure the interface on connection:
> > iface wlan0 inet manual
> >     wpa-roam "/etc/wpa_supplicant/wpa_supplicant.conf"

> >
> > iface default inet dhcp
> >
> > It's seemed rather odd to me that netman ignores wpa-roam.



> By automatic connections I understood netman using the available
> essids for which it knows the password to connect. This means, it does
> not attempt to connect if no essid file is found under
> /etc/network/wifi.


What I'm suggesting is that rather than having netman scan for networks
and select one, have netman start a single instance of wpa_supplicant with
all the networks you want to autoconnect to.


I realize that this may take a bit of reworking it, but I anticipate
that the result will use less resources and work better than piling
daemon on daemon just to use a different method of configuration.


Now, assuming that each essid file is something like:
iface wlan0 inet dhcp
    wpa-ssid "foo"
    wpa-psk ....
    wpa-bar baz


you could convert it to a network entry in wpa-supplicant.conf thus:
network={
    ssid="foo"
    psk=...
    bar=baz
}


If it's not "inet dhcp" or if there are entries in the stanza that
don't start with "wpa-", generate an id string and split all that
out into a new entry in /etc/network/interfaces.


That's my own take on how it should be done, for what it's worth.

HTH,
Isaac Dunham