I've overhauled the way the network-wizard saves configurations, in
conjunction with re-writing rc.network, to make it more flexible and
be able to support both different HW (when running off USB drive) and
different locations (for laptops).

The only thing left is to test it...

(Note that you might want to use a special pup_save for it, or at least
backup the files that are overwritten: /etc/rc.d/rc.network,
/usr/sbin/net-setup.sh, /usr/sbin/wag-profiles.sh and
/usr/sbin/ndiswrappergui.sh )

Here's how it now works (you don't need to know this to use the wizard...):

Interface configuration
Interfaces have configuration files named after the HW address of the
network adapter, as seen in the output of ifconfig (eg. 00:10:60:BD:4A:D7).

This way we are not dependent on the interface name, which would most
likely be the same (eth0, wlan0) on different machines. (if the HWaddres
isn't unique enough, I can easily add the module name or something...)

- When every interface is configured, a config file is created:
/etc/network/interfaces/$HWADDRESS.conf
This file might be empty, or include some info, such as the details of
a static ip address (in case it was configured that way).

- In case of a wireless interface, another config file will be created:
/etc/wireless/interfaces/$HWADDRESS.conf
This file might include information like whether to use wlanctl-ng
instead of iwconfig/wpa_supplicant (in case of devices using the prism2
drivers), or which wpa_supplicant driver to use.

Both of these files are used as markers, to let us know that the interface
has actually been "configured" by the user -- so we don't try and use an
interface that the user doesn't want us to.

Network configuration
Unlike previously, the different "profiles" you save when configuring
wireless networks are not saved in the same file.
Now a directory (/etc/wireless/profiles) is used, with each profile having
its own config file, named after the MAC address and the type of encryption
used. For example:
/etc/wireless/profiles/00:1B:9E:6F:61:F6.WPA.conf

In case of WPA/WPA2, an appropriate wpa_supplicant.conf file is created
in /etc/wireless/wpa_profiles. Example:
/etc/wireless/wpa_profiles/00:1B:9E:6F:61:F6.WPA.conf

This way, at bootup, a wireless scan is performed and each detected network
is checked, to see if there is a profile matching it (and its encryption
mode!)

Note: this should mean that you can have profiles for your home router
in different modes, without them interfering with each other.

Now, if none of the detected networks matches an existing profile (or if
some do, but fail to connect), then an attempt will be made to connect
to each of the detected open networks, so theoretically you should be able
to just go somewhere and boot and it will connect you to something...

I have also added the option of giving priority to certain networks (i.e.
your home network) over the rest, but that isn't incorporated into the
guy yet...
What you need to do is add to the wireless config file (the one for the
interface, in /etc/wireless/interfaces!) a line such as:

Code:

PRIORITY_LIST='00:1B:9E:6F:61:F6 00:0E:2E:7B:E5:D8'

Connecting to the addresses in the list will be attempted before all
others (assuming they were detected by the scan, of course...).

That's about it, at the moment.

There are some things I'm still not completely sure about, including some
other modifications I made to the wizard, which people might help me with:
- Tempestuous mentioned once that running "iwlist $INTERFACE ap" will
return a list of access-points with their signal quality (and listed by
decreasing signal strength).
Is the order the networks are listed "normally" (iwlist $INTERFACE scan)
the same (i.e. listed by decreasing signal strength)?

- I took some code from Wicd, which is used to "clean up" every time before
an interface is configured: dhcpcd killed, wpa_supplicant killed, routing
table flushed etc.
This kills all instances of dhcpcd every time. Is this safe to
do? Could a user run more than one instance of dhcpcd at once, connecting
via more than one interface?

- Do people ever use static ip addresses with wireless??

UPDATE July 21st: fix some bugs and updated the attachment.
UPDATE July 22nd: updated the attachment.
UPDATE july 23rd: a few fixes (see post on page 3)
UPDATE july 25th: modify wireless profiles dialog and add "connect" argument (see post on page 3)
UPDATE july 28th: a bunch of fixes and added a loop for bootup sleep (see page 4)Last edited by Dougal on Sun 12 Apr 2009, 05:24; edited 33 times in total

I've overhauled the way the network-wizard saves configurations, in
conjunction with re-writing rc.network, to make it more flexible and
be able to support both different HW (when running off USB drive) and
different locations (for laptops).

The only thing left is to test it...

How can one participate in testing?
(I am not a fan of tar.gz binary stuff. Like to install with the help of a packetmanager.)

Dougal wrote:

Do people ever use static ip addresses with wireless??

Me, myself and I, including all members of my family on our home LAN._________________Know where you are talking about instead of talking about what you know.

Dougal, while you're overhauling the Network Wizard, what about this small enhancement -
http://www.murga-linux.com/puppy/viewtopic.php?p=208545#208545
I think that the "Supplic" "Driver" "Hidden" labels are too technical. They refer to the underlying tecnology of wpa_supplicant, and are not useful to the user.

How can one participate in testing?
(I am not a fan of tar.gz binary stuff. Like to install with the help of a packetmanager.)

I didn't make into a dotpet intentionally, so people won't just download it and click to install, then, if they can't connect anymore, complain to me... since it doesn't back up the old files.
You can always just turn the tarball into a .pet by running in a terminal
"tgz2pet" on it.

Quote:

Dougal wrote:

Do people ever use static ip addresses with wireless??

Me, myself and I, including all members of my family on our home LAN.

Ok. It isn't supported at the moment, but shouldn't be hard to add.

The main problem I have with static ip is that it ties up the interface (well, at least with ethernet, I guess with wireless I can save it as part of the wireless network config).
What I mean is that if you configure your laptop ethernet to one network, then, trying to connect with it somewhere else, it will just try that static ip address, not trying dhcp.
Is there a way to find out if to use the static ip address? (like the address of the service provider?)
Could I test, via ping or something, if the static connection worked and if not -- try auto dhcp?_________________What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind

Dougal, while you're overhauling the Network Wizard, what about this small enhancement -
http://www.murga-linux.com/puppy/viewtopic.php?p=208545#208545
I think that the "Supplic" "Driver" "Hidden" labels are too technical. They refer to the underlying tecnology of wpa_supplicant, and are not useful to the user.

... or since "Hidden" is the default setting, a more logical order would be:
"SSID Hidden" "SSID broadcast" "Driver"

Sure.
I would have liked to do a proper overhaul of the wizard UI, using tooltips to cut down on the text and simplify things, but it seems like gtkdialog only supports tooltips when using glade, which I've never done (I'm also not sure it will be worth the effort -- at least not if we need to generate the glade files on-the-go, rather than just having a static one.
(I actually took the .glade file from wicd and run gtkdialog with it and it brought up a gui! the only question if we can use variables to fill in the parts that need filling in)._________________What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind

I noticed above that you have asked if there is a way to identify a static IP configuration uniquely with respect to its network so that when booting you can decide whether to apply that particular static ip configuration or force going for DHCP.

The solution
------------------
What I feel is if one captures/stores the MAC ID associated with the GATEWAY IP address of a static configuration. Then when booting or starting networking on a machine with Static IP configuration, it can be varified as to whether the system is still running on the SAME network or not by using ARP and based on that one can decide whether to apply that particular Static configuration on that run or switch to DHCP for that run.

I'm using this with Fat Free 3.01 (frugal install) on a Dell 610 laptop with a NetgearWG111T.
I've found that it won't save a profile - if I try to save, the program closes.
The program seems to detect the wlan0 on alternate boots - but when it does detect it, it will connect to a network far quicker than previously. It has done it first time once I've entered the parameters. This could take several attempts before, so there is a definite improvement.

What I feel is if one captures/stores the MAC ID associated with the GATEWAY IP address of a static configuration. Then when booting or starting networking on a machine with Static IP configuration, it can be varified as to whether the system is still running on the SAME network or not by using ARP and based on that one can decide whether to apply that particular Static configuration on that run or switch to DHCP for that run.

Haa, but how do I do that... I really don't know much about networking.
A little code snippet is all I need._________________What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind

I'm using this with Fat Free 3.01 (frugal install) on a Dell 610 laptop with a NetgearWG111T.
I've found that it won't save a profile - if I try to save, the program closes.

Could you try tunning it from a terminal and see what kind of error message it give when closing? Just run "net-setup.sh -d"._________________What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind

This is because my household has 4 wireless laptops, one or two of which which run The Devil's Own Operating System. If 'Doze hibernates it (obviously) discards the lease on its I/P address but when it is woken up later it will try to re-lease the same address. If in the meantime one of the other devices has been auto-allocated the same address (because it was available) then there's a conflict straight away.

I can solve this in my Router by allocating a fixed I/P address to the MAC Address of each device and then use "Automatic" DHCP to get an address.

I imagine this scenario is not unique so I can see the need to retain the static address option for simialr situations but where changing router settings isn't possible.

Quote:

Could a user run more than one instance of dhcpcd at once, connecting via more than one interface?

Yes, I do.

But I'd rather not! If you ever connect both wirelessly and wired, then you'll get both interfaces activated at bootup from then on. It's always struck me as a minor flaw that it does the second connection even if the first was successful.

It doesn't seem to "matter" until you want to switch mode; say you started wired but wish to move to working wirelessly. I haven't found how to cancel/disable/de-activate the first one you used and switch to the other without re-booting.

It's a small thing, but would add to the general friendliness of the experience._________________Nick

I've updated the attachment in the parent post.
It should fix the bugs reported and enable support for static ip with wireless networks (the ip info is included in the network profile)._________________What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot vote in polls in this forumYou cannot attach files in this forumYou can download files in this forum