[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: wifi failed after hibernate

Joe Emenaker wrote:
Freddy Freeloader wrote:
Joe Emenaker wrote:
Stuart Prescott wrote:
[1] <rant>Long story... when I was setting this system up that was the recommended way to do it. It worked really well for me. Then the wpa_supplicant maintainers changed their minds...
I was similarly pissed about the change....
I have never had this specific problem, but I ran into the confusing change in wpa_supplicant on a laptop rebuild a while back. I figured that change out and actually thought it was quite an improvement.
Okay, I did some reading and have cleared up my understanding of the current state of wpasupplicant.

First, to recap... if you look in /usr/share/doc/wpasupplicant/NEWS.Debian, you'll come across the message that most people discovered too late:
 -- Kel Modderman <kelrin@tpg.com.au>  Tue, 13 Jun 2006 22:33:16 +1000


This package does not ship any configuration to wpasupplicant in /etc/{wpa_supplicant/,}wpa{,_}supplicant.conf anymore.
... Therefore, in order to actually use wpasupplicant in this package, you are required to edit your /etc/network/interfaces in order to start wpasupplicant. Please read the file README.modes...

The "old way" was to have your wifi interfaces *not* set to auto in /etc/network/interfaces, and then to start wpasupplicant which would automatically ifup/ifdown the interface when it associated with an AP.

The maintainers decided that they didn't like this. They wanted more of the network info to be kept in /etc/network/interfaces whenever possible.... so ifupdown was changed so that it recognized a bunch of new options, like:
iface ath0 inet static
        wpa-driver madwifi
        wpa-ssid HotSpot1
        wpa-bssid 00:1a:2b:3c:4d:5e
        wpa-psk madhotspot
        wpa-key-mgmt WPA-PSK
        wpa-pairwise TKIP CCMP
        wpa-group TKIP CCMP
        wpa-proto WPA RSN
This allowed you to keep all of your wifi settings in /etc/network/interfaces with all of your other stuff. The *problem*, however, was that you could only specify a single wpa-ssid, a single WPA key, etc. <sarcasm>This made it great for people with wifi desktop machines and for laptop users who never take their laptop anywhere. In other words, about 5% of wpasupplicant's user base</sarcasm>

There's also a bit of a "Chicken or Egg" problem, where you might have some network settings that need to be set in /etc/network/interfaces, but you don't know which values to use until wpasupplicant knows which AP it has associated with, but, under the new system, wpasupplicant doesn't get run until the interface is ifup'd from /etc/network/interfaces.

The way they eventually dealt with this seems to be like this:

1 - In your /etc/network/interfaces, you define your wifi interface as "manual", and you give a path to a conf file for wpasupplicant.
iface eth1 inet manual
        wpa-driver wext
        wpa-roam /path/to/wpa_supplicant.conf
2 - Also in /etc/network/interfaces, you define some pseudo interface names which will, later, be referenced by wpasupplicant depending upon which AP you're connected to:
iface plain_dhcp inet dhcp

iface at_home inet static

iface at_work inet static
3 - Then, in your wpasupplicant conf file (the one mentioned in the "wpa-roam" line), you define the AP's and you use the id_str option to reference which of these pseudo interfaces to map to:


IMHO, it's a little demented to have the settings go from /etc/network/interfaces, out to a wpasupplicant.conf, and then *back* into /etc/network/interfaces under a different name... but I can't think of a better way to do it if they're committed to having everything go through /etc/network/interfaces, first.

Hope this helps some people....

- Joe
Actually, I can roam without any settings in /etc/network/interfaces other than my home network settings which uses WPA to secure the connection. If a reachable access point is open my laptop will make a connection. I was surprised that it does, but it does. Since the first connection I made before I was aware of it I have used my laptop in a couple of different public libraries that have open access points. Roaming just seems to work without any configuration. That's a huge improvement over the way things used to be. I have made no entries in the wpasupplicant.conf either.

I can see where the current manner of configuration be sort of a hassle if you use your laptop at work with a wireless connection, but I don't see how making wpa_supplicant easier to use overall is worth getting as sarcastic as you got though. You're obviously running Sid or Etch, and wireless is under heavy development, so what do you expect? Nothing to ever change? Nothing to ever break? I think that's an unreasonable assumption myself. I couldn't imagine how screwed up daily builds of a MS OS would be. I'll gladly put up with some breakage of older setups if improvements such as the developers in the wireless area have been making continue to be made. It's much easier to configure a wireless connection now than it used to be.

Reply to: