Re: WEP does not work?

From: Sam Leffler <sam_at_errno.com>
Date: Thu, 09 Dec 2004 22:42:23 -0800
Hideyuki KURASHINA wrote:
> Hi,
> 
> 
>>>>On Wed, 8 Dec 2004 17:44:27 -0800, Sam Leffler <sam_at_errno.com> said:
> 
> 
>>On Wednesday 08 December 2004 05:00 pm, Hideyuki KURASHINA wrote:
>>
>>>After rebooting, I set IPv4 and IPv6 addresses and those routes. Because
>>>access point supports only 802.11b, I configured my wireless network
>>>by 128bit WEP as follows
>>>
>>>  /sbin/ifconfig ath0 nwid MY-SSID nwkey 0x01234567890123456789012345 media
>>>autoselect mode 11b
>>>
>>>then I got following error:
>>>
>>>  ath0: ath_chan_set: unable to reset channel 8 (2447 Mhz)
>>>  ath0: ath_chan_set: unable to reset channel 8 (2447 Mhz)
>>>  ath0: ath_chan_set: unable to reset channel 8 (2447 Mhz)
>>>  ath0: ath_chan_set: unable to reset channel 12 (2467 Mhz)
>>
>>Weird, can you send me the regdomain and country code: e.g. the output of 
>>sysctl dev.ath.0.
> 
> 
> Sure.
> 
>   # sysctl dev.ath.0
>   dev.ath.0.%desc: Atheros 5212
>   dev.ath.0.%driver: ath
>   dev.ath.0.%location: slot=2 function=0
>   dev.ath.0.%pnpinfo: vendor=0x168c device=0x1014 subvendor=0x1014 subdevice=0x057e class=0x020000
>   dev.ath.0.%parent: pci2
>   dev.ath.0.countrycode: 395
>   dev.ath.0.regdomain: 67
>   dev.ath.0.debug: 0
>   dev.ath.0.slottime: 20
>   dev.ath.0.acktimeout: 48
>   dev.ath.0.ctstimeout: 48
>   dev.ath.0.softled: 1
>   dev.ath.0.ledpin: 0
>   dev.ath.0.txantenna: 0
>   dev.ath.0.rxantenna: 1
>   dev.ath.0.txintrperiod: 5
>   dev.ath.0.diag: 0
>   dev.ath.0.tpscale: 0
>   dev.ath.0.rate_interval: 1000
>   dev.ath.0.rate_raise: 10
>   dev.ath.0.rate_raise_threshold: 10
> 
> Just curiosity, `hw' MIBs print both regdomain and countrycode are 0.

hw.ath mib entries define values used to initialize each new ath device. 
  You cannot set regdomain (yet) but countrycode can be overridden by 
setting hw.ath.countrycode before loading a device.

> 
>   # sysctl hw.ath
>   hw.ath.hal.swba_backoff: 0
>   hw.ath.hal.sw_brt: 10
>   hw.ath.hal.dma_brt: 2
>   hw.ath.hal.version: 0.9.14.9
>   hw.ath.debug: 0
>   hw.ath.regdomain: 0
>   hw.ath.countrycode: 0
>   hw.ath.xchanmode: 1
>   hw.ath.outdoor: 1
>   hw.ath.calibrate: 30
>   hw.ath.dwell: 200
> 
> 
>>>  # ifconfig ath0 list chan
>>>  Channel   1 : 2412* Mhz 11g          Channel  11 : 2462* Mhz 11g
>>>  Channel   2 : 2417* Mhz 11g          Channel  12 : 2467* Mhz 11a 11g
>>>  Channel   3 : 2422* Mhz 11g          Channel  13 : 2472* Mhz 11g
>>>  Channel   4 : 2427* Mhz 11g          Channel  14 : 2484* Mhz 11b
>>>  Channel   5 : 2432* Mhz 11g          Channel  16 : 5080* Mhz 11a
>>>  Channel   6 : 2437* Mhz 11g          Channel  34 : 5170* Mhz 11a
>>>  Channel   7 : 2442* Mhz 11g          Channel  38 : 5190* Mhz 11a
>>>  Channel   8 : 2447* Mhz 11a 11g      Channel  42 : 5210* Mhz 11a
>>>  Channel   9 : 2452* Mhz 11g          Channel  46 : 5230* Mhz 11a
>>>  Channel  10 : 2457* Mhz 11g
>>>

Note this says channels 8 and 12 are capable of 11a which is nonsense. 
Looks like a hal regdomain problem, probably related to the addition of 
turboG (turbo+11g).  For now you'll need to lock the channel to your ap 
or filter out 8+12 using something like

ifconfig ath0 chanlist 1-7,9,10,13-46

(13-46 is ok as unavailable channels should be silently ignored).

>>
>>So it seems channels 8 and 12 are supposedly available.
> 
> 
> Actually, no.  I'll show you my AP side wireless network setting.
> 
>   % dmesg | grep wi0
>   wi0 at pcmcia0 function 0: PLANEX, GW-NS11H Wireless LAN PC Card, 
>   wi0: 802.11 address 00:90:cc:XX:XX:XX
>   wi0: using RF:PRISM3 MAC:ISL3871(PCMCIA)
>   wi0: Intersil Firmware: Primary (1.0.7), Station (1.3.5)
>   wi0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
> 
>   % ifconfig wi0
>   wi0: flags=8863<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST> mtu 1500
>           ssid MY-SSID nwkey *****
>           powersave off
>           bssid 00:90:cc:XX:XX:XX chan 3
>           address: 00:90:cc:XX:XX:XX
>           media: IEEE802.11 autoselect mode 11b hostap (DS2 hostap)
>           status: active
>           inet 192.168.1.7 netmask 0xffffff00 broadcast 192.168.1.255
>           inet alias 192.168.1.254 netmask 0xffffffff broadcast 192.168.1.254
>           inet6 fe80::290:XXXX:XXXX:XXXX%wi0 prefixlen 64 scopeid 0x4
>           inet6 2001:3e0:XXX:X::X prefixlen 64
> 
>   % sudo wiconfig wi0
>   NIC serial number:			[ 99SA01XXXXXX ]
>   Station name:				[  ]
>   SSID for IBSS creation:		[ MY-SSID ]
>   Current netname (SSID):		[ MY-SSID ]
>   Desired netname (SSID):		[ MY-SSID ]
>   Current BSSID:			[ 00:90:cc:XX:XX:XX ]
>   Channel list:				[ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 ]
>   IBSS channel:				[ 3 ]
>   Current channel:			[ 3 ]
>   Comms quality/signal/noise:		[ 0 81 27 ]
>   Promiscuous mode:			[ Off ]
>   Port type:				[ 6 ]
>   MAC address:				[ 00:90:cc:XX:XX:XX ]
>   TX rate (selection):			[ 0 ]
>   TX rate (actual speed):		[ 2 ]
>   Beacon Interval (current) [msec]:	[ 100 ]
>   Maximum data length:			[ 2304 ]
>   RTS/CTS handshake threshold:		[ 2347 ]
>   fragmentation threshold:		[ 2346 ]
>   RSSI -> dBm adjustment:		[ 100 ]
>   Create IBSS:				[ Off ]
>   Microwave oven robustness:		[ 0 ]
>   Roaming mode(1:firm,3:disable):	[ 1 ]
>   Access point density:			[ 1 ]
>   Power Mgmt (1=on, 0=off):		[ 0 ]
>   Max sleep time (msec):		[ 100 ]
>   Vendor info:				[ Unknown ID: 31 version: 1.3 ]
>   WEP encryption:			[ On ]
>   Authentication type 
>   (1=OpenSys, 2=Shared Key):		[ 1 ]
>   TX encryption key:			[ 1 ]
>   Encryption keys:			[ 0x01234567890123456789012345 ][  ][  ][  ]
> 
> 
>>>It seems that ath0 failed to reset channel.  I manually specified channel,
>>>then ifconfig shows:
>>>
>>>  # ifconfig -v ath0
>>>  ath0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
>>>  	inet 192.168.1.11 netmask 0xffffff00 broadcast 192.168.1.255
>>>  	inet6 fe80::20e:XXXX:XXXX:XXXX%ath0 prefixlen 64 scopeid 0x2
>>>  	inet6 2001:3e0:XX:X::XX prefixlen 64
>>>  	ether 00:0e:9b:XX:XX:XX
>>>  	media: IEEE 802.11 Wireless Ethernet autoselect mode 11b (DS/11Mbps)
>>>  	status: associated
>>>  	ssid MY-SSID channel 3 (2422) bssid 00:90:cc:XX:XX:XX
>>>  	authmode OPEN privacy ON deftxkey 1 powersavemode OFF
>>>  	powersavesleep 100 txpowmax 14 txpower 60 rtsthreshold 2312 protmode CTS
>>>  	wme roaming AUTO bintval 100
>>>  	AC_BE cwmin  5 cwmax 10 aifs  3 txopLimit   0 -acm ack
>>>  	      cwmin  5 cwmax 10 aifs  3 txopLimit   0 -acm
>>>  	AC_BK cwmin  5 cwmax 10 aifs  7 txopLimit   0 -acm ack
>>>  	      cwmin  5 cwmax 10 aifs  7 txopLimit   0 -acm
>>>  	AC_VI cwmin  4 cwmax  5 aifs  2 txopLimit 188 -acm ack
>>>  	      cwmin  4 cwmax  5 aifs  2 txopLimit 188 -acm
>>>  	AC_VO cwmin  3 cwmax  4 aifs  2 txopLimit 102 -acm ack
>>>  	      cwmin  3 cwmax  4 aifs  2 txopLimit 102 -acm
>>
>>This doesn't show a key installed.  I don't typically use nwkey; I'll have to 
>>check it.
> 
> 
> I tried
> 
>   # /sbin/ifconfig ath0 ssid MY-SSID wepmode on weptxkey 1 wepkey 1:0x01234567890123456789012345 wepkey 2:- wepkey 3:- wepkey 4:- media autoselect mode 11b
> 
> but nothing changed (default router is still not reachable).
> 

I'll try to look tomorrow.  I have a patch for fixing wep with ndis that 
I need to review and this is probably the same thing.

	Sam
Received on Fri Dec 10 2004 - 05:42:29 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:24 UTC