Date: Sun, 31 Jul 2005 23:45:38 +0200 From: Stijn Hoop <stijn@win.tue.nl> To: Sam Leffler <sam@errno.com> Cc: Damien Bergamini <damien@freebsd.org>, current@freebsd.org Subject: Re: dhclient and wpa_supplicant Message-ID: <20050731214538.GJ70957@pcwin002.win.tue.nl> In-Reply-To: <42ED191E.5030105@errno.com> References: <42EAD325.60707@errno.com> <20050731092000.GI70957@pcwin002.win.tue.nl> <42ED191E.5030105@errno.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--WfZ7S8PLGjBY9Voh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jul 31, 2005 at 11:31:58AM -0700, Sam Leffler wrote: > Stijn Hoop wrote: > > On Fri, Jul 29, 2005 at 06:08:53PM -0700, Sam Leffler wrote: > > > I just ran tests with wpa_supplicant and found that it does appear to= =20 > > > handle open ap's properly. > > > > I cannot get this to work, using 2 different MiniPCI cards and > > a Linksys WRT54G, on a 7-CURRENT from yesterday. > > > > The cards: > > > > - an Intel Pro Wireless 2200B/G (model WM3A2200BG, Dell branded) using = iwi > > - a Dell Truemobile 1300 WLAN (bcm4306) using ndis > > > > For details, log files, etc, see > > > > http://sandcat.nl/~stijn/freebsd/20050731-wlan/ >=20 > Sigh, well for iwi you do say: >=20 > "Maybe the problem is not with wpa_supplicant though; I cannot get=20 > if_iwi to associate by using ifconfig manually either." > > Er, yeah, if you cannot associate w/o wpa_supplicant I'm not sure why=20 > you'd think it'd be more capable? (unless you're using wpa) Wasn't sure myself either; but maybe wpa_supplicant set some modes differently then 'plain regular' ifconfig. At least now I know I have to get it working first, so I'll try that in the future. > The log shows: >=20 > Jul 31 11:04:17 pounce kernel: iwi0: macaddr bssid=20 > chan rssi rate flag wep essid > Jul 31 11:04:17 pounce kernel: - 00:50:fc:d6:85:82 00:50:fc:d6:85:82=20 > 11 38 11M ess no "default"! >=20 > which means you found one ap w/ an ssid of "default" and it was rejected= =20 > because you configured the device for a different ssid. However I see=20 > probe resp frames from LZ111 in your log but it's never added to the=20 > scan list for some reason. Seems like someone with iwi devices should=20 > investigate. OK, so this confirms a bug in if_iwi. I'll send a PR. > The ndis driver shows nothing in the log that indicates it hooks up=20 > properly to the net80211 layer so wpa_supplicant is unlikely to work=20 > with it. Unfortunately there are many drivers that bypass the net80211= =20 > layer causing applications written to the common api to not work. :-( > OTOH your dhclient.conf file is so trivial that I'm not surprised it work= s;=20 > you could just as well have used: >=20 > ifconfig_ndis0=3D"ssid LZ111 DHCP" Didn't know that either, good idea. One less config file to edit. > The issue with dhclient using dhclient.conf to set wireless parameters=20 > is that it does so, then sends it's DHCP protocol msg, then waits a=20 > fixed amount of time for a response from a DHCP server. This is prone=20 > to fail as different configurations take different amounts of time to=20 > complete the scan+associate work. Also dhclient (now) processes link=20 > state and assoc/reassoc/disassoc msgs which confuses this approach. I=20 > did some changes to have it ignore these messages while setting the=20 > media parameters but it was complicated and still routinely failed=20 > because the timeouts were too small. In the end I concluded that it=20 > wasn't worth supporting this mechanism any more; that wpa_supplicant is= =20 > the better approach since it will scan ONCE and then select the=20 > appropriate network (while dhclient had to scan once for each possible=20 > network). In general I have advocated that dhclient do less; in this=20 > case I want dhclient to let someone else setup the wireless networking=20 > parameters and have it do just the dhcp protocol. The fact that=20 > dhclient messes with media parameters for an interface is more a=20 > byproduct of configuring wired networks (and not having better tools to= =20 > configure wireless networks). OK, noted. So 'all it takes' is someone converting ndis to use all of the 802.11 api? (no idea how large a task this is). > wpa_supplicant depends on a couple features in the net80211 layer to=20 > work properly: manual roaming (forcing the driver to not automtically do= =20 > things like associate after scanning so it can instead decide which ap=20 > to use), scan (scan for ap's and report results), and associate to a=20 > particular ap (as identified in the scan results). Past that it uses=20 > the common ioctl's defined to set keys and other parameters that you=20 > normally get to via ifconfig. For wpa and 802.1x is needs some more=20 > stuff. Drivers that bypass the net80211 layer for some or all of this=20 > stuff may not work correctly and should be fixed. Is there a list of these drivers? How about ral/ural? I read about other problems with those. About the only useful wireless option then is an Atheros card? Thanks for the detailed reply, some of this stuff makes more sense now. --Stijn --=20 I really hate this damned machine I wish that they would sell it. It never does quite what I want But only what I tell it. --WfZ7S8PLGjBY9Voh Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (FreeBSD) iD8DBQFC7UaCY3r/tLQmfWcRAguYAKCTKKX/lrapyGHrKT89nibic//EjQCfWCws l02rsaPl+YwyC7on+/32HuE= =jaWb -----END PGP SIGNATURE----- --WfZ7S8PLGjBY9Voh--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050731214538.GJ70957>