# wpa_supplicant stopped working after emerge world

## mfyahya

Hi all,

I had wpa_suppicant configured and working fine with my wpa psk secured home wireless ap. Yesterday I ran emerge -uDN world and now I can't connect to the secured network. I've changed back to iwconfig and set the wireless ap to plaintext in order to post this.

After the emerge there were some net.lo error messages during bootup, but those went away after I ran dispatch-conf.  I made sure the wpa_supplicant.conf wasn't overwritten.  I  re-emerged wpa_supplicant, but it didnt' help either.

This is what happens when I start the service:

```

 # /etc/init.d/net.eth1 restart

 * Caching service dependencies ...                                                                  [ ok ]

 * Unmounting network filesystems ...                                                                [ ok ]

 * WARNING:  you are stopping a boot service.

 * Stopping sshd ...                                                                                 [ ok ]

 * Stopping eth1

 *   Bringing down eth1

 *     Stopping dhcpcd on eth1 ...                                                                   [ ok ]

 *     Shutting down eth1 ...                                                                        [ ok ]

 * Starting eth1

 *   Starting wpa_supplicant on eth1 ...                                                             [ ok ]

 *   Starting wpa_cli on eth1 ...                                                                    [ ok ]

 *     Backgrounding ...

 * WARNING:  netmount is scheduled to start when net.eth1 has started.

 * WARNING:  sshd is scheduled to start when net.eth1 has started.

```

I see this in /var/log/messages. It repeates at about two lines per sec.

```

# tail -f /var/log/messages

Aug 15 00:27:50 badr wpa_cli: interface eth1 DISCONNECTED

Aug 15 00:27:52 badr wpa_cli: interface eth1 DISCONNECTED

Aug 15 00:27:53 badr wpa_cli: interface eth1 DISCONNECTED

Aug 15 00:27:56 badr wpa_cli: interface eth1 DISCONNECTED

Aug 15 00:27:59 badr wpa_cli: interface eth1 DISCONNECTED

Aug 15 00:27:59 badr wpa_cli: interface eth1 DISCONNECTED

Aug 15 00:28:02 badr wpa_cli: interface eth1 DISCONNECTED

Aug 15 00:28:03 badr wpa_cli: interface eth1 DISCONNECTED

```

This is my /etc/conf.d/net file

```

 # grep -v "^#" /etc/conf.d/net

config_eth0=( "dhcp" )

config_eth1=( "dhcp" )

dhcpcd_eth0="-t 5 -R"

dhcpcd_eth1="-t 5 -R"

modules=( "wpa_supplicant" )

wpa_supplicant_eth1="-Dwext"

wpa_timeout_eth1="20"

```

And this is the previously working wpa_supplicant.conf.

```

 # grep -v "^#" /etc/wpa_supplicant.conf|grep -v "^$"

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=0

eapol_version=1

ap_scan=1

fast_reauth=1

network={

        ssid="maysaloon"

        scan_ssid=1

        psk="mysecretkey"

        priority=2

}

```

Thanks for any help!

----------

## UberLord

Try wpa_supplicant-0.5.4

```
eapol_version=1 

ap_scan=1 

fast_reauth=1 
```

Do you really need that? ap_scan=1 I can understand, but you probably don't need the others.

----------

## stephandale

Hi.

Did you manage to fix this problem?

I've been getting exactly the same after upgrading from kernel 2.6. 16-gentoo-r9 to 2.6.17-gentoo-r7 (problem also present with kernel 2.7.17-gentoo-r4) and updating world.

wpa_supplicant 0.4.9 produces the above error messages and fails to connect. x86 version 0.5.4 doesn't produce the error messages but doesn't connect either.

/etc/conf.d/net:

```

modules=( "wpa_supplicant" )

wpa_supplicant_eth1="-Dwext"

wpa_timeout_eth1=60

```

/etc/wpa_supplicant.conf:

```

network={

   ssid="<hidden>"

   proto=WPA

   key_mgmt=WPA-PSK

   pairwise=CCMP TKIP

   group=CCMP TKIP WEP104 WEP40

   psk="<hidden>"

   priority=2

}

```

The ipw2200,  ieee80211 and ieee80211_crypt modules all load fine.

lspci:

```

06:03.0 Network controller: Intel Corporation PRO/Wireless 2915ABG Network Connection (rev 05)

```

ifconfig show that it's switching between UP BROADCAST MULTICAST and UP BROADCAST RUNNING MULTICAST:

```

eth1      Link encap:Ethernet  HWaddr <hidden>

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:9 errors:26 dropped:27 overruns:0 frame:0

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

          collisions:0 txqueuelen:1000 

          RX bytes:1286 (1.2 Kb)  TX bytes:952 (952.0 b)

          Interrupt:17 Memory:c8214000-c8214fff 

```

Any help would be greatly appreciated. Thanks.

----------

## mfyahya

no, I couldn't fix it yet  :Sad: 

----------

## stephandale

I found the solution to be to recompile ipw2200-firmware. Despite the fact my version was current, it evidently needed to be rebuilt against the new kernel.

emerge -av ipw2200-firmware

Note that I am using the ipw2200 module provided by the kernel, not from portage.

Hope that helps your problem, if it does please add [SOLVED] to the thread title. Thanks.

----------

## stephandale

Sorry, that was a red herring... It worked (i.e. stopped the DISCONNECTED messages) when I rolled back to the previous kernel, but I've still got the problem on the latest kernel.

----------

## KrysNux

same problem for me

I succeeded one time :

after boot

kill wpa_supplicant

try to start wpa_supplicant by command line

hope.... hope...

and then

```
dhcpcd <your interface>
```

and then wait and hope

----------

## stephandale

I'm now very sure that a change in the kernel config created the problem for me. Wireless worked fine after recompiling the latest kernel with my old config. I'm now in the lengthy process of determining which option caused the problem. I've eliminated all the obvious ones, now only the relatively obsure ones are left. I love trial and error.    :Confused: 

----------

## stephandale

Check whether CONFIG_KMOD=y is set.

If you're using menuconfig:

```

Loadable module support --->

  [*]   Automatic kernel module loading

```

The annoying thing about this is that the module seemed to load ok on boot. Evidently not.

----------

## KrysNux

Kernel option is checked, but i have the problem

I tried to emerge old kernel version 

Always the same problem

argh !!!

----------

## KrysNux

waiting the true solution, here is an other tip to succeed to connect

modify wpa_supplicant.conf

```
ap_scan=2
```

after boot,

```
/etc/init.d/net.<your devide> restart
```

Then it 's ok, i can connect

----------

## BrummieJim

Hi,

If it's any help, I'm not sure it's anything to do with kernel upgrades, as this is exactly what is happening to me with my ipw2200 card. I haven't updated my kernel in months 2.6.15-suspend2, and my wireless was working fine, although I used it infrequently. Its when I tried to use it again these problems have started. I'm using the portage ipw2200 module and firmware.

other options I've read about blame >udev-0.94 and firmware v3. lowering the udev version seemed to help, but all new versions of ipw2200 in portage require v3 firmware. I'm only running one computer with wireless to a base station, so I can't be that rigorous with testing, unfortunately.

ap_scan=2 seems a good solution (using it currently) and I've updated to the 0.5.4 version of wpa_supplicant.

A point of interest is that I'm pretty sure it's wpa_supplicant as if you

ifconfig eth1 up

iwconfig eth1 essid mynet

iwconfig eth1 key mykey

dhcpcd -do eth1

The system comes back up. Marvellous.

Thanks KrysNux and UberLord

----------

