wpa_supplicant Oddity

Kevin Oberman oberman at es.net
Sat May 20 16:41:10 PDT 2006


> Date: Sat, 20 May 2006 01:36:15 -0400
> From: "J. Oquendo" <joquendo at hushmail.com>
> Sender: owner-freebsd-mobile at freebsd.org
> 
> After fooling around with my wireless card on one of my Dell latops
> I noticed it would not come back to life after a reboot. I tried
> everything on the planet to get it working... As you can see from
> my ifconfig, the card was associated, the router saw it, but it
> would not function properly...
> 
> bordello# uname -a
> FreeBSD bordello 6.1-RELEASE FreeBSD 6.1-RELEASE #0: Mon May 15
> 10:50:49 EDT 2006     root@:/usr/src/sys/i386/compile/TYPHOON  i386
> bordello# ifconfig -a
> bge0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
>         options=1b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING>
>         ether 00:0d:56:e2:c4:b5
>         media: Ethernet autoselect (none)
>         status: no carrier
> ndis0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
>         inet6 fe80::290:4bff:fe73:665e%ndis0 prefixlen 64 scopeid
> 0x2
>         inet 192.168.1.8 netmask 0xffffff00 broadcast 192.168.1.255
>         ether 00:90:4b:73:66:5e
>         media: IEEE 802.11 Wireless Ethernet autoselect
> (OFDM/54Mbps)
>         status: associated
>         ssid HOSTEL channel 10 bssid 00:0f:b5:62:88:a6
>         authmode OPEN privacy ON deftxkey UNDEF wepkey 1:104-bit
> txpowmax 100
>         protmode CTS
> plip0: flags=108810<POINTOPOINT,SIMPLEX,MULTICAST,NEEDSGIANT> mtu
> 1500
> lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
>         inet6 ::1 prefixlen 128
>         inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4
>         inet 127.0.0.1 netmask 0xff000000
> bordello# cat /etc/rc.conf
> 
> apm_enable="YES"
> inetd_enable="YES"
> linux_enable="YES"
> moused_enable="YES"
> sshd_enable="YES"
> usbd_enable="YES"
> pccard_enable="YES"
> pccard_mem="0xd8000"
> powerd_enable="YES"
> fsck_y_enable="YES"
> hostname="bordello"
> dhclient_program="/sbin/dhclient"
> background_dhclient="YES"
> sshd_enable="YES"
> ifconfig_ndis0="WPA DHCP"
> 
> bordello# more /etc/wpa_supplicant.conf
> network={
> 
> ssid="HOSTEL"
> key_mgmt=NONE
> wep_key1=d7a0cb0f54679c476886d7db3b
> wep_tx_keyidx=1
> wep_tx_keyidx=1
> }
> 
> bordello# /etc/rc.d/netif start
> Starting wpa_supplicant.
> lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
>         inet6 ::1 prefixlen 128
>         inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4
>         inet 127.0.0.1 netmask 0xff000000
> ndis0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
>         inet6 fe80::290:4bff:fe73:665e%ndis0 prefixlen 64 scopeid
> 0x2
>         inet 0.0.0.0 netmask 0xff000000 broadcast 255.255.255.255
>         ether 00:90:4b:73:66:5e
>         media: IEEE 802.11 Wireless Ethernet autoselect
> (OFDM/54Mbps)
>         status: no carrier
>         ssid HOSTEL channel 10
>         authmode OPEN privacy ON deftxkey 4 txpowmax 100 protmode
> CTS
> 
> bordello# ifconfig ndis0 inet 192.168.1.8 netmask 255.255.255.0
> ssid HOSTEL wepmode on wepkey 0xd7a0cb0f54679c476886d7db3b up
> 
> bordello# ifconfig -a
> bge0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
>         options=1b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING>
>         ether 00:0d:56:e2:c4:b5
>         media: Ethernet autoselect (none)
>         status: no carrier
> ndis0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
>         inet6 fe80::290:4bff:fe73:665e%ndis0 prefixlen 64 scopeid
> 0x2
>         ether 00:90:4b:73:66:5e
>         media: IEEE 802.11 Wireless Ethernet autoselect
> (OFDM/54Mbps)
>         status: associated
>         ssid HOSTEL channel 10 bssid 00:0f:b5:62:88:a6
>         authmode OPEN privacy ON deftxkey 4 wepkey 1:104-bit
> txpowmax 100
>         protmode CTS
> plip0: flags=108810<POINTOPOINT,SIMPLEX,MULTICAST,NEEDSGIANT> mtu
> 1500
> lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
>         inet6 ::1 prefixlen 128
>         inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4
>         inet 127.0.0.1 netmask 0xff000000
> bordello# ping 192.168.1.1
> PING 192.168.1.1 (192.168.1.1): 56 data bytes
> ping: sendto: No route to host
> ping: sendto: No route to host
> ping: sendto: No route to host
> ^C
> - --- 192.168.1.1 ping statistics ---
> 3 packets transmitted, 0 packets received, 100% packet loss
> 
> Didn't want to bombard more crap but yes I did a dhclient ndis0 as
> well and it bonked out. Anyhow, this is what I noticed after a ps -
> xa for wpa_supplicant after going through all my configs to make
> sure they were all in order...
> 
> bordello# ps -xa|grep wpa
> 63979  ??  Ss     0:00.41 /usr/sbin/wpa_supplicant -B -q -i ndis0 -
> c /etc/wpa_supplicant.conf -D ndis -P
> /var/run/wpa_supplicant/ndis0.pid
> 
> When I went to check the wpa_supplicant directory in /var/run I
> noticed there wasn't one.
> 
> bordello# mkdir /var/run/wpa_supplicant
> bordello# chown root:network
> bordello# sudo ifconfig ndis0 inet 192.168.1.8 netmask
> 255.255.255.0 ssid HOSTEL wepmode on weptxkey 1 wepkey
> 1:0xd7a0cb0f54679c476886d7db3b up
> bordello# ifconfig -a
> bordello# sudo ifconfig ndis0 up
> 
> Everything worked fine afterwards. Unsure why the directory wasn't
> there but I figured I would share this little bit of information
> with others who have had odd problems with their wireless set up.

Hmm. I, too, have been having odd problems with the wpa_supplicant at
various times.

The clear problem you are having is that the weptxkey is not being reset
correctly. The first ifconfig shows it as unset. The remaining examples
show it as being '4', not '1'.

The only oddity I see is that you have the line 'wep_tx_keyidx=1
twice. I have no idea why this would cause any problem, though.

I have a different issue, but I "solve" it by entering
"/etc/rc.d/wpa_supplicant restart ath0" until it finally works.
-- 
R. Kevin Oberman, Network Engineer
Energy Sciences Network (ESnet)
Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab)
E-mail: oberman at es.net			Phone: +1 510 486-8634


More information about the freebsd-mobile mailing list