From owner-freebsd-current@FreeBSD.ORG Sat Oct 1 02:35:59 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 23B4F16A41F; Sat, 1 Oct 2005 02:35:59 +0000 (GMT) (envelope-from e.schuele@computer.org) Received: from rwcrmhc12.comcast.net (rwcrmhc12.comcast.net [204.127.198.43]) by mx1.FreeBSD.org (Postfix) with ESMTP id A46D443D4C; Sat, 1 Oct 2005 02:35:58 +0000 (GMT) (envelope-from e.schuele@computer.org) Received: from [192.168.214.215] (c-24-1-232-64.hsd1.tx.comcast.net[24.1.232.64]) by comcast.net (rwcrmhc12) with ESMTP id <2005100102355701400l04a3e>; Sat, 1 Oct 2005 02:35:57 +0000 Message-ID: <433DF60C.50900@computer.org> Date: Fri, 30 Sep 2005 21:35:56 -0500 From: Eric Schuele User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050926) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-current@freebsd.org References: <433D5384.2000201@computer.org> <0510010917536.2765@www.mmlab.cse.yzu.edu.tw> In-Reply-To: <0510010917536.2765@www.mmlab.cse.yzu.edu.tw> Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Cc: FreeBSD mobile Mailing List Subject: Re: wpa_supplicant and WEP.... X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Oct 2005 02:35:59 -0000 Tai-hwa Liang wrote: > On Fri, 30 Sep 2005, Eric Schuele wrote: > >> Hello, >> >> >> Kernel Config: (are wlan_* necessary?) > > > If you are using WEP only, wlan + wlan_wep should be enough. Ok... well its a long story, so I'll spare you. But, I had never known they even existed till I stumbled across someone elses post saying they were necessary. Thanks for confirming they are needed. I got the rest of my problems fixed by another post. Thanks for the response. (p.s. for some reason I could not CC you!?!) > >> # Wireless LAN support >> device wlan # 802.11 support >> device wlan_wep # WLAN WEP kernel module >> device wlan_ccmp # AES-CCMP crypto support >> device wlan_tkip # TKIP and Michael cypto support for >> >> # Wirelass NIC cards >> device ath # Atheros support >> device ath_hal # Atheros HAL >> device ath_rate_sample # SampleRate Rate Control > > > I didn't statically compile these in kernel; however, there should > be no difference between dynamically loaded and statically compiled driver. > >> fangorn# wpa_supplicant -i ath0 -c /etc/wpa_supplicant.conf -d & >> [1] 1057 >> fangorn# Initializing interface 'ath0' conf '/etc/wpa_supplicant.conf' >> driver 'default' >> Configuration file '/etc/wpa_supplicant.conf' -> >> '/etc/wpa_supplicant.conf' >> Reading configuration file '/etc/wpa_supplicant.conf' >> ctrl_interface='/var/run/wpa_supplicant' >> ctrl_interface_group=0 (from group name 'wheel') >> Priority group 0 >> id=0 ssid='home' >> id=1 ssid='office-g' >> id=2 ssid='dragnfly' >> Initializing interface (2) 'ath0' >> Own MAC address: 00:0e:9b:53:31:9d >> wpa_driver_bsd_set_wpa: enabled=1 >> wpa_driver_bsd_set_wpa_internal: wpa=3 privacy=1 >> wpa_driver_bsd_del_key: keyidx=0 >> wpa_driver_bsd_del_key: keyidx=1 >> wpa_driver_bsd_del_key: keyidx=2 >> wpa_driver_bsd_del_key: keyidx=3 >> wpa_driver_bsd_set_countermeasures: enabled=0 >> wpa_driver_bsd_set_drop_unencrypted: enabled=1 >> Setting scan request: 0 sec 100000 usec >> Starting AP scan (specific SSID) >> Scan SSID - hexdump_ascii(len=17): >> 77 4c 41 4e 5f 57 45 50 5f 4b 78 36 4c 30 34 6f home >> 32 2 >> Received 0 bytes of scan results (3 BSSes) >> Scan results: 3 >> Selecting BSS from priority group 0 >> 0: 96:0f:a4:ef:3c:4a ssid='AMO' wpa_ie_len=0 rsn_ie_len=0 >> skip - no WPA/RSN IE >> 1: 00:0c:41:0b:fe:c5 ssid='office-a' wpa_ie_len=0 rsn_ie_len=0 >> skip - no WPA/RSN IE >> 2: 00:0f:66:10:d6:da ssid='' wpa_ie_len=0 rsn_ie_len=0 >> skip - no WPA/RSN IE >> No suitable AP found. >> Setting scan request: 5 sec 0 usec >> Starting AP scan (specific SSID) >> Scan SSID - hexdump_ascii(len=10): >> 6c 61 71 75 69 6e 74 61 2d 67 office-g >> Received 0 bytes of scan results (3 BSSes) >> Scan results: 3 >> Selecting BSS from priority group 0 >> 0: 96:0f:a4:ef:3c:4a ssid='AMO' wpa_ie_len=0 rsn_ie_len=0 >> skip - no WPA/RSN IE >> 1: 00:0c:41:0b:fe:c5 ssid='office-a' wpa_ie_len=0 rsn_ie_len=0 >> skip - no WPA/RSN IE >> 2: 00:0f:66:10:d6:da ssid='office-g' wpa_ie_len=0 rsn_ie_len=0 >> skip - no WPA/RSN IE >> selected non-WPA AP 00:0f:66:10:d6:da ssid='office-g' >> Trying to associate with 00:0f:66:10:d6:da (SSID='office-g' freq=2437 >> MHz) >> Cancelling scan request >> Automatic auth_alg selection: 0x1 >> No keys have been configured - skip key clearing >> wpa_driver_bsd_set_key: alg=WEP addr=ff:ff:ff:ff:ff:ff key_idx=0 >> set_tx=1 seq_len=0 key_len=7 >> wpa_driver_bsd_set_drop_unencrypted: enabled=1 >> wpa_driver_bsd_associate: ssid 'office-g' wpa ie len 0 pairwise 4 >> group 4 key mgmt 2 >> wpa_driver_bsd_associate: set PRIVACY 1 >> Setting authentication timeout: 5 sec 0 usec >> Association event - clear replay counter >> Associated to a new BSS: BSSID=00:0f:66:10:d6:da >> Associated with 00:0f:66:10:d6:da >> Cancelling authentication timeout > > > Looks fine to me. > >> fangorn# ifconfig >> ath0: flags=8843 mtu 1500 >> inet 0.0.0.0 netmask 0xff000000 broadcast 255.255.255.255 >> ether 00:0e:9b:53:31:9d >> media: IEEE 802.11 Wireless Ethernet autoselect (DS/1Mbps) >> status: associated >> ssid office-g channel 6 bssid 00:0f:66:10:d6:da >> authmode OPEN privacy ON deftxkey 1 wepkey 1:104-bit txpowmax 54 >> protmode CTS roaming MANUAL bintval 100 >> lo0: flags=8049 mtu 16384 >> inet 127.0.0.1 netmask 0xff000000 > > > Your station should be associated to the AP at this point. Which implies > the key configuration written in your wpa_supplicant.conf is correct. > >> fangorn# dhclient ath0 >> DHCPREQUEST on ath0 to 255.255.255.255 port 67 >> DHCPREQUEST on ath0 to 255.255.255.255 port 67 >> DHCPDISCOVER on ath0 to 255.255.255.255 port 67 interval 6 >> DHCPDISCOVER on ath0 to 255.255.255.255 port 67 interval 10 >> DHCPDISCOVER on ath0 to 255.255.255.255 port 67 interval 11 >> ^C >> fangorn# exit > > > This is weird. Did you try to set ath0 IP address manually and ping some > other hosts as well? > > In addition to that, whilst dhclient was acquiring an IP address, was > there any abnormal behaviour(such like re-associate with the AP) on your > wpa_supplicant console? > >> uname -a >> FreeBSD fangorn.nxdomain.org 6.0-BETA5 FreeBSD 6.0-BETA5 #29: Wed Sep >> 28 11:47:26 CDT 2005 >> root@fangorn.nxdomain.org:/usr/obj/usr/src/sys/CUSTOM_6 i386 > > > My test was on a 3 days old 7-CURRENT but there shouldn't be too much > difference in their net80211 stack and wpa_supplicant. > >> What have I done wrong??? Any other info needed can be provided. > > > Does your AP suppose to be your DHCP server? If not, try to manually > set the ath0 address and your AP's IP address to the same subnet and > see if you can ping the AP from ath0 after they associate with each other. > > If you don't have problem to ping your AP, there probably be something > wrong between your AP and the real DHCP provider. > -- Regards, Eric