From owner-freebsd-current@FreeBSD.ORG Sun Dec 12 03:21:53 2004 Return-Path: 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 923FA16A4CE for ; Sun, 12 Dec 2004 03:21:53 +0000 (GMT) Received: from pne-smtpout1-sn2.hy.skanova.net (pne-smtpout1-sn2.hy.skanova.net [81.228.8.83]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0DCF443D2D for ; Sun, 12 Dec 2004 03:21:53 +0000 (GMT) (envelope-from pawel.worach@telia.com) Received: from [127.0.0.1] (81.225.14.129) by pne-smtpout1-sn2.hy.skanova.net (7.1.026.6) (authenticated as u86211448) id 4199C6960000C134; Sun, 12 Dec 2004 04:21:45 +0100 Message-ID: <41BBB944.9080008@telia.com> Date: Sun, 12 Dec 2004 04:21:40 +0100 From: Pawel Worach User-Agent: Mozilla Thunderbird 1.0 (X11/20041210) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Sam Leffler References: <200412081109.43840.sam@errno.com> <20041209.100008.21874313.rushani@bl.mmtr.or.jp> <200412081744.27539.sam@errno.com> <20041209.225041.63112571.rushani@bl.mmtr.or.jp> <41B9454F.9080903@errno.com> <41BA4B22.5070403@telia.com> <41BB8550.30208@errno.com> <41BBA53B.9070006@telia.com> <41BBAEDF.2050909@errno.com> In-Reply-To: <41BBAEDF.2050909@errno.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-current@freebsd.org Subject: Re: WEP does not work? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 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: Sun, 12 Dec 2004 03:21:53 -0000 Sam Leffler wrote: > Something is very wrong that you're getting all the watchdog timeouts. > Also there are many frames discarded that don't make sense. The output > from 80211stats might be useful. OTOH, as I said, adhoc mode for ath is > lightly tested so may just have a problem; it's very low priority and > likely won't get fixed real soon. > >> >> # ./athdebug +crypto >> dev.ath.0.debug: 0x0 > > Sorry, athdebug +keycache is what you want. Supplying -? as an arg to > either athdebug or 80211debug will display the possible debug bits. Actually, looks like 'ifconfig ath0 wepmode on weptxkey 1 \ wepkey 1:0xXXXX78e6XXXXdbe2XXXX0127XX' changed the "deftxkey". Where "weptxkey" and "deftxkey" mixed up along the way? # ifconfig -v ath0 ath0: flags=8843 mtu 1500 inet 192.168.1.200 netmask 0xffffff00 broadcast 192.168.1.255 inet6 fe80::205:4eff:fe4b:7613%ath0 prefixlen 64 scopeid 0x2 ether 00:05:4e:4b:76:13 media: IEEE 802.11 Wireless Ethernet autoselect (autoselect ) status: associated ssid cookie channel 7 bssid 1a:00:34:02:62:02 authmode OPEN privacy ON deftxkey 1 wepkey 1:104-bit txpowmax 34 protmode CTS wme bintval 100 now I get these messages when trying to transmit data [00:40:96:42:0d:9c] key (id 0) is invalid [00:40:96:42:0d:9c] key (id 0) is invalid [00:40:96:42:0d:9c] no default transmit key [00:40:96:42:0d:9c] key (id 0) is invalid [00:40:96:42:0d:9c] key (id 0) is invalid [00:40:96:42:0d:9c] key (id 0) is invalid [00:40:96:42:0d:9c] key (id 0) is invalid With ath keycache debug on I see this after the following ifconfig command: # ifconfig ath0 wepmode on weptxkey 1 wepkey 1:0xXXXX78e6XXXXdbe2XXXX0127XX ath_init: if_flags 0x8843 ath_stop_locked: invalid 0 if_flags 0x8843 ath_key_update_begin: ath_key_update_end: ath_key_update_begin: ath_key_delete: delete key 0 ath_key_delete: delete key 1 ath_key_delete: delete key 2 ath_key_delete: delete key 3 ath_key_update_end: ath_initkeytable: reset key 0 ath_initkeytable: reset key 1 ath_initkeytable: reset key 2 ath_initkeytable: reset key 3 ath_start: ignore data packet, ath_start: ignore data packet, state 1 state 1 ath_init: if_flags 0x8843 ath_stop_locked: invalid 0 if_flags 0x8843 ath_key_update_begin: ath_key_delete: delete key 0 ath_key_delete: delete key 1 ath_key_delete: delete key 2 ath_key_delete: delete key 3 ath_key_update_end: ath_key_update_begin: ath_key_update_end: ath_initkeytable: reset key 0 ath_initkeytable: reset key 1 ath_initkeytable: reset key 2 ath_initkeytable: reset key 3 ath_start: ignore data packet, state 1ath_start: ignore data packet, state 1 ath_key_update_begin: ath_keyset: [00] WEP XXXX78e6XXXXdbe2XXXX0127XX mac 00:05:4e:4b:76:13 ath_key_update_end: ath_start: ignore data packet, state 1 ath_start: ignore data packet, state 1 ath_start: ignore data packet, state 1 ath_start: ignore data packet, state 1 ath_start: ignore data packet, state 1 ath_start: ignore data packet, state 1 ath_start: ignore data packet, state 1 ath_start: ignore data packet, state 1 ath_start: ignore data packet, state 1 ath_start: ignore data packet, state 1 ath_start: ignore data packet, state 1 ath_start: ignore data packet, state 1 ath_start: ignore data packet, state 1 ath_start: ignore data packet, state 1 ath_start: ignore data packet, state 1 ath_start: ignore data packet, state 1 ath_start: ignore data packet, state 1 ath_start: ignore data packet, state 1 ath_start: ignore data packet, state 1 ath_start: ignore data packet, state 1 ath_start: ignore data packet, state 1 ath_start: ignore data packet, state 1 ath_start: ignore data packet, state 1 ath_start: ignore data packet, state 1 ath_start: ignore data packet, state 1 ath_start: ignore data packet, state 1 ath_start: ignore data packet, state 1 ath_start: ignore data packet, state 1 ath_start: ignore data packet, state 1 ath_start: ignore data packet, state 1 ath_start: ignore data packet, state 1 ath_key_update_begin: ath_key_update_end: Here are the 802.11 stats. # ./80211stats 22 rx from wrong bssid 1 rx discard 'cuz dup 485338 rx discard mgt frames 487591 rx beacon frames 24 rx element unknown 234 rx frame chan mismatch 778 rx frame ssid mismatch 9 rx w/ incorrect keyid 21 active scans started 140 nodes timed out inactivity When at the edge of giving up and sending the above I did one more test and # arp -an ? (192.168.1.1) at 00:40:96:42:0d:9c on ath0 [ethernet] ibm-se82151# ping 192.168.1.1 PING 192.168.1.1 (192.168.1.1): 56 data bytes 64 bytes from 192.168.1.1: icmp_seq=0 ttl=64 time=1.640 ms 64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=3.348 ms 64 bytes from 192.168.1.1: icmp_seq=2 ttl=64 time=1.600 ms ^C looks like "weptxkey" cut it so now it works in ad-hoc mode with wep, lets try the AP again.... looks good # ifconfig ath0 media autoselect mode autoselect # ifconfig ath0 ssid my-ssid wepmode on weptxkey 1 wepkey \ 1:0xXXXX78e6XXXXdbe2XXXX0127XX # ifconfig -v ath0 ath0: flags=8843 mtu 1500 inet 192.168.1.200 netmask 0xffffff00 broadcast 192.168.1.255 inet6 fe80::205:4eff:fe4b:7613%ath0 prefixlen 64 scopeid 0x2 ether 00:05:4e:4b:76:13 media: IEEE 802.11 Wireless Ethernet autoselect (DS/11Mbps) status: associated ssid my-ssid channel 11 (2462) bssid 00:04:75:62:e9:0d authmode OPEN privacy ON deftxkey 1 wepkey 1:104-bit tx+rx+def powersavemode OFF powersavesleep 100 txpowmax 34 txpower 60 rtsthreshold 2312 protmode CTS wme roaming AUTO bintval 100 # ping 192.168.1.3 PING 192.168.1.3 (192.168.1.3): 56 data bytes 64 bytes from 192.168.1.3: icmp_seq=0 ttl=60 time=2.263 ms 64 bytes from 192.168.1.3: icmp_seq=1 ttl=60 time=2.096 ms ^C Also I do not see the "device timeout" messages when in BSS mode! (been running ping -f to the ap's ip address for five minutes now) -- Pawel