# Help with wpa_supplicant please

## curmudgeon

As well as Linux works well for so many things, I absolute hate trying to get wireless networking to work on it. :(

From the beginning:

Gigafast USB wireless adapter using the zd1211rw driver.

Already a pain to have to connect the device after bootup finishes (and manually start things such as sshd), but I can live with that (fortunately, this machine will not get rebooted often).

Recompiled kernel and emerged zd1211-firmware.

Apparently recognized:

```
Jun 10 00:00:00 system usb 1-1: new full speed USB device using uhci_hcd and address 4

Jun 10 00:00:00 system usb 1-1: configuration #1 chosen from 1 choice

Jun 10 00:00:00 system zd1211rw 1-1:1.0: firmware version 4725

Jun 10 00:00:00 system zd1211rw 1-1:1.0: zd1211b chip 0ace:1215 v4810 full 00-02-72 AL2230_RF pa0 g--N

Jun 10 00:00:00 system zd1211rw 1-1:1.0: eth1

Jun 10 00:00:05 system ADDRCONF(NETDEV_UP): eth1: link is not ready
```

/etc/conf.d/net (note that eth0 will not get started or used):

```
config_eth0=("192.168.0.2 broadcast 192.168.0.255 netmask 255.255.255.0")

config_eth1=("192.168.0.2 broadcast 192.168.0.255 netmask 255.255.255.0")

routes_eth0=("default via 192.168.0.1")

routes_eth1=("default via 192.168.0.1")

essid_eth1="hiddenssid"

wpa_supplicant_eth1='-Dwext'
```

/etc/wpa_supplicant/wpa_supplicant.conf:

```
ap_scan=1

network={

        ssid="hiddenssid"

        scan_ssid=1

        psk="mypsk"

        }
```

Running /etc/init.d/net.eth1 start gives (from /var/log/messages):

```
This line repeats every ten seconds:

Jun 10 00:01:00 system SoftMAC: Open Authentication completed with 00:00:00:00:00:01

When starting, I also see the following:

Jun 10 00:02:00 system ADDRCONF(NETDEV_UP): eth1: link is not ready

Jun 10 00:02:01 system SoftMAC: Open Authentication completed with 00:00:00:00:00:01

Jun 10 00:02:01 system ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready

Jun 10 00:02:12 system SoftMAC: Open Authentication completed with 00:00:00:00:00:01

Jun 10 00:02:12 system eth1: no IPv6 routers present

With this thrown in occasionally, as well:

Jun 10 00:03:00 system SoftMAC: wx_set_mlme: we should know the net here...

Jun 10 00:04:36 system SoftMAC: Open Authentication completed with 00:00:00:00:00:01

Jun 10 00:04:47 system eth1: no IPv6 routers present
```

Ifconfig shows this:

```
# /sbin/ifconfig

eth1      Link encap:Ethernet  HWaddr 00:00:00:00:00:00

          inet6 addr: fe80::202:72ff:fe5a:4759/64 Scope:Link

          UP BROADCAST MULTICAST  MTU:1500  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

lo        Link encap:Local Loopback

          inet addr:127.0.0.1  Mask:255.0.0.0

          inet6 addr: ::1/128 Scope:Host

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
```

I don't know where it gets that IPv6 address from.

And finally, attempting to debug using wpa_cli:

```
# /bin/wpa_cli

wpa_cli v0.5.7

Copyright (c) 2004-2006, Jouni Malinen <jkmaline@cc.hut.fi> and contributors

This program is free software. You can distribute it and/or modify it

under the terms of the GNU General Public License version 2.

Alternatively, this software may be distributed under the terms of the

BSD license. See README and COPYING for more details.

Selected interface 'eth1'

Interactive mode

These five lines repeat every ten seconds:

<2>Authentication with 00:00:00:00:00:01 timed out.

<2>CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys

<2>Trying to associate with 00:00:00:00:00:01 (SSID='hiddenssid' freq=2462 MHz)

<2>Association request to the driver failed

<2>Associated with 00:00:00:00:00:01

Lowering the debug level ("level 1"), gives some additional details:

<2>Authentication with 00:00:00:00:00:01 timed out.

<1>Setting scan request: 0 sec 0 usec

<2>CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys

<2>Trying to associate with 00:00:00:00:00:01 (SSID='hiddenssid' freq=2462 MHz)

<1>Cancelling scan request

<1>WPA: using IEEE 802.11i/D3.0

<1>WPA: using GTK TKIP

<1>WPA: using PTK TKIP

<1>WPA: using KEY_MGMT WPA-PSK

<2>Association request to the driver failed

<1>Setting authentication timeout: 5 sec 0 usec

<1>Associated to a new BSS: BSSID=00:00:00:00:00:01

<2>Associated with 00:00:00:00:00:01

<1>Setting authentication timeout: 10 sec 0 usec

<1>Cancelling scan request

<1>Setting authentication timeout: 10 sec 0 usec
```

The questions:

1. How do I associate with the router?

2. Why doesn't the interface get configured with the IP address?

----------

## koenderoo

Maybe you forgot to mention it, but installing just the firmware won't work. You need to install the zd1211 driver too. packagename is zd1211   :Smile: 

----------

## curmudgeon

Everything I have read said to use the driver in the kernel (which I OBVIOUSLY have configured in the kernel, since the kernel recognized it), and not either of the separate drivers.

----------

## koenderoo

This won't give you much hope, but after a bit of Googling for this error (specially the link is not ready error) I found that the zd1211b chip isn't that well supported by the kernel. 

I would recommend to stop the driver from the kernel and try the package instead, but I don't say it will work. Packages can be better then kernel-versions because kernel-versions are better controlled. The zd1211 package is marked unstable though so you have to be carefull with it.

----------

## nomuus

It appears from the information that you have presented that the interfaces are set up for IPv6.  Are you setting up an IPv6 network?

----------

## andyknownasabu

Hi,

I actually have the same problem: I just can't get the zd1211rw driver to work.  :Sad: 

I tried with a similar configuration as curmudgeon using wpa_supplicant but I can't associate with our AP.

From time to time but without any reason it seems to work - at least I can see some debugging output in

wpa_cli. But then suddenly it doesn't work anymore, the init script loads but wpa_gui shows no networks

and wpa_cli is quiet.

I also tried manually with iwconfig/ifconfig which also worked once after unloading the module

and modprobing again. But again not deterministic.

It's even strange that sometimes the firmware can't be loaded: I have to unplug the dongle and plug it in

again...

I just don't know what I could do. If it was reproduceable I would be able to check step by step but if it is

like this...  :Sad:   :Sad: 

----------

