# wpa_supplicant not reconnecting

## Devport

I want wpa_supplicant to reconnect after a disconnect ( e.g. when the wlan router lost power ). This works just fine when I run wpa_supplicant manually ( wpa_supplicant -i wlan0 -D wext -c /etc/wpa_supplicant/wpa_supplicant.conf ).

But if the connection is started via gentoo networking the connection wont ever be reestablished.

Any help is appreciated ! Is gentoo networking supposed to reconnect at all ? How could it be done otherwise ?

/etc/conf.d/net

```
modules_eth0="dhclient"

config_eth0="dhcp"

modules_wlan0="wpa_supplicant"

wpa_supplicant_wlan0="-Dwext"

associate_timeout_wlan0=0

wpa_timeout_wlan0=0

associate_order="forcepreferredonly"

postup() {

   [ "${IFACE}" != "lo" ] && /etc/init.d/ntp-client restart

}

```

/etc/wpa_supplicant/wpa_supplicant.conf

```
network={

   ssid="***"

   scan_ssid=1

   proto=WPA2

   key_mgmt=WPA-PSK

   pairwise=CCMP

   group=CCMP

   psk="***"

   # optional

   bssid=***

}

```

----------

## cdstealer

try these in /etc/conf.d/net

wpa_supplicant_wlan0=( "-Dwext -c /etc/wpa_supplicant/wpa_supplicant.conf" )

config_wlan0=( "dhcp" )

your net config currently doesn't know where the wpa config file is or how to assign an ip.

----------

## Gef

You can add the "fast_reauth=1" directive to your wpa_supplicant.conf

Hope this will help.

I just cannot find where I found this option. Nothing in the manual.

----------

## Devport

Thanks for the help - I think I found the problem being the device driver not supporting a feature that gentoo networking needs to properly work since I found a IOCTL not supported message. I can live with it.

----------

