From owner-freebsd-questions@FreeBSD.ORG Fri Dec 16 16:21:28 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CC92C16A420 for ; Fri, 16 Dec 2005 16:21:28 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from aiolos.otenet.gr (aiolos.otenet.gr [195.170.0.93]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6D2C043D73 for ; Fri, 16 Dec 2005 16:21:25 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from flame.pc (aris.bedc.ondsl.gr [62.103.39.226]) by aiolos.otenet.gr (8.13.4/8.13.4/Debian-8) with SMTP id jBGGLEbG011307; Fri, 16 Dec 2005 18:21:17 +0200 Received: by flame.pc (Postfix, from userid 1001) id D6A6E1157A; Fri, 16 Dec 2005 18:20:15 +0200 (EET) Date: Fri, 16 Dec 2005 18:20:15 +0200 From: Giorgos Keramidas To: Jim Pazarena Message-ID: <20051216162015.GB2558@flame.pc> References: <43A26004.3010105@ccstores.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <43A26004.3010105@ccstores.com> Cc: freebsd-questions@freebsd.org Subject: Re: atheros wireless setup X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Dec 2005 16:21:28 -0000 On 2005-12-15 22:34, Jim Pazarena wrote: > I can't believe how incredibly easy it was to get > the wireless going in my laptop. > > add: if_ath_load="YES" to /boot/loader.conf > > and: ifconfig_ath0="dhcp" to /etc/rc.conf > > and it "works" ! > > please tell me where I can read up on how to "control" the wireless > link. Such as how to enter the "SSID", and connect speed etc. I started by reading this Handbook section: http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-wireless.html One thing that you may want to note, if you are not *ALWAYS* around a known wireless network, is that making changes to /etc/rc.conf may cause the startup process to print harmless, but annoying nevertheless, warnings when ath0 is down. This is especially true if your wireless NIC is not on-board, but a PC-CARD that you sometimes use (like mine). In this case, you can 'override' the /etc/rc.conf settings by making a small shell script like this (almost identical to the one I use to bring up ath0 on my laptop): 1 | export ifconfig_ath0="inet DHCP ssid 'XXXXXX' \ 2 | wepmode on weptxkey 1 wepkey '1:0xXXXXXXXXXXXXXXXXXXXXXXXXXX'" 3 | 4 | /etc/rc.d/netif stop # Stop all other interfaces. 5 | /etc/rc.d/netif start ath0 # Bring up ath0. 6 | if test $? -eq 0 ; then 7 | echo >&2 "ath0: ERROR: Could not bring up interface." 8 | exit 1 9 | fi 10 | 11 | echo -n "Waiting for ath0 to associate " 12 | _timeout=0 13 | _associated=NO 14 | while [ "$_timeout" -lt 30 ]; do 15 | status=$( ifconfig ath0 2>&1 | grep status: |\ 16 | awk '{print $2}' ) 17 | if [ X"${status}" = X"associated" ]; then 18 | _associated=YES 19 | break 20 | fi 21 | echo -n '.' 22 | sleep 1 23 | _timeout=$(( $_timeout + 1 )) 24 | done 25 | if [ X"${_associated}" = X"YES" ]; then 26 | echo " ok" 27 | else 28 | echo '' 29 | echo >&2 "ath0: ERROR: Timed out while waiting to associate." 30 | /etc/rc.d/netif stop ath0 31 | exit 1 32 | fi By setting ifconfig_ath0 in the script itself (see lines 1-2), you don't have to modify `/etc/rc.conf'. The /etc/rc.d/netif script will be happy by simply finding the appropriate stuff in its running environment :-) I hope this helps, - Giorgos