From owner-freebsd-mobile@FreeBSD.ORG Thu Apr 24 08:05:40 2003 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 06F5337B401 for ; Thu, 24 Apr 2003 08:05:40 -0700 (PDT) Received: from mail.speakeasy.net (mail11.speakeasy.net [216.254.0.211]) by mx1.FreeBSD.org (Postfix) with ESMTP id E24CD43FBF for ; Thu, 24 Apr 2003 08:05:38 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: (qmail 7812 invoked from network); 24 Apr 2003 15:05:41 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender )encrypted SMTP for ; 24 Apr 2003 15:05:41 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.8/8.12.8) with ESMTP id h3OF5YOv000298; Thu, 24 Apr 2003 11:05:35 -0400 (EDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.4 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20030423223710.P7551@znfgre.qbhto.arg> Date: Thu, 24 Apr 2003 11:05:38 -0400 (EDT) From: John Baldwin To: Doug Barton cc: mobile@FreeBSD.org cc: Mike Makonnen Subject: RE: Script to automatically configure a wireless card based on ssid X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Apr 2003 15:05:40 -0000 On 24-Apr-2003 Doug Barton wrote: > John, > > I took a look at your script, and it has some really good stuff. I ran > into a problem though. The premise of your script is that once you get an > ssid, you'll know how to configure that interface. I'm curious about what > kind of card you have. I have a netgear ma 401, and it's coming up with an > ssid as soon as I bring the card up. Here is an example: I have a lucent card: wi0: at port 0x100-0x13f irq 11 function 0 config 1 on pccard0 > ifconfig wi0 powersave: > > wi0: flags=8802 mtu 1500 > ether 00:09:5b:31:2d:2f > media: IEEE 802.11 Wireless Ethernet autoselect (none) > ssid "" > stationname "FreeBSD WaveLAN/IEEE node" > channel -1 authmode OPEN powersavemode CAM powersavesleep 100 > wepmode OFF weptxkey 1 > > ifconfig wi0 up: > > wi0: flags=8843 mtu 1500 > ether 00:09:5b:31:2d:2f > media: IEEE 802.11 Wireless Ethernet autoselect (DS/2Mbps) > status: associated > ssid WLAN 1:WLAN > stationname "FreeBSD WaveLAN/IEEE node" > channel 11 authmode OPEN powersavemode CAM powersavesleep 100 > wepmode OFF weptxkey 1 Well, it claims to be associated, which is odd. I don't actually check the ssid except for matching up wepkeys. Instead, I check the status which is 'associated' in this case. If there really isn't an AP, then that's a bug that should be addressed. > The other thing I'm interested in at this point is a good definition of > "configured successfully." When I find the right ssid and set the right > wep keys, I know that I'm successful if I can dhclient the interface. > However, I'd really like to find a metric I can test before I take that > step. So far I haven't been successful, but I'm hoping it's just due to my > ignorance. dhclient is the only such metric I really know of. > I'm interested in your opinion of this plan for more general use, and also > the opinion of folks on the list. For those that aren't aware of the goal > here, the rc team is working on improvements to our scripts to > auto-configure a system on boot, including wired/wireless, etc. I think your plan sounds ok. My script is specific to my needs and I posted it primarily as an example of how you can solve the wireless problem. I think personally my direction is to not depend on rc to be smart, but to write a kde applet similar to the airport applet in OS X that lets you see signal strength as well as choose which AP you are associated with. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/