# Network won't reconnect automatically

## IncredibleMrT

Hi, 

A few weeks ago I was forced into a reinstall - not at gunpoint or anything, just by my own stupidity. 

Anyway, since the reinstall my wireless connection (net.wlan0 using wpa_supplicant on an atheros device) loses it's connnection at 2am every morning when my router box reboots. This reboot has been in place for a good long while and shouldn't be an issue. Before the reinstall my wireless connection would automatically connect when the network was available again. 

Now I am having to manually start net.wlan0 when I get to my laptop in the morning.

Does anyone have any ideas what I might have done differently? I made backups of all network related configs and reinstated them at installation time.

If you need any info then please ask  :Smile: 

Thanks all, 

Matt.

----------

## vivaceious

well... i'm not sure why it would have reconnected automatically before and would not replicate this behavior now...

though as an alternative, have you considered using WICD to manage net connections?

i'm interested in the answer to your question though  :Smile: 

----------

## IncredibleMrT

Does wicd work outside of your WM/DE ? I need wireless at boot time for daemons and like that aren't dependant on any GUI.

I really don't know what i've done differently - the setup I had before was quite standard and I made a point of making sure I used the identical configs from my backups.

----------

## vivaceious

could you let us know which USE flags wpa_supplicant was built with? this should do the trick  :Smile: 

```
# emerge --pretend --verbose wpa_supplicant
```

----------

## IncredibleMrT

Here you go...

```
mrt ~ # emerge wpa_supplicant -pv

These are the packages that would be merged, in order:

Calculating dependencies... done!

[ebuild   R   ] net-wireless/wpa_supplicant-0.7.3  USE="dbus madwifi qt4 readline ssl -debug -eap-sim -fasteap -gnutls (-ps3) -wps" 0 kB

Total: 1 package (1 reinstall), Size of downloads: 0 kB

```

----------

## vivaceious

So I did some reading around on other forums and people have complained about similar problems being solved by enabling the 'gnutls' use flag. I can't confirm this, however. I hope it works, but sorry if it doesn't.

```
# echo "net-wireless/wpa_supplicant gnutls" >> /etc/portage/package.use

# emerge wpa_supplicant
```

or, for a 1-time deal:

```
# USE="gnutls" emerge wpa_supplicant
```

Hopefully some other ppl can provide better help  :Smile: 

----------

## IncredibleMrT

Hi all.

If haven't got around to trying the gnutls thing just yet but I have been trawling the net and checking entries in /var/log/messages & dmesg.

Here is the corresponding /var/log/message entries from the past few days

```

Sep 17 02:02:27 mrt kernel: wlan0: deauthenticated from 00:0f:66:da:3a:4b (Reason: 7)

Sep 17 02:02:27 mrt kernel: cfg80211: Calling CRDA to update world regulatory domain

Sep 17 02:02:27 mrt wpa_cli: interface wlan0 DISCONNECTED

Sep 18 02:02:32 mrt kernel: wlan0: deauthenticated from 00:0f:66:da:3a:4b (Reason: 7)

Sep 18 02:02:32 mrt kernel: cfg80211: Calling CRDA to update world regulatory domain

Sep 18 02:02:32 mrt wpa_cli: interface wlan0 DISCONNECTED

Sep 19 02:02:44 mrt kernel: No probe response from AP 00:0f:66:da:3a:4b after 500ms, disconnecting.

Sep 19 02:02:44 mrt kernel: cfg80211: Calling CRDA to update world regulatory domain

Sep 19 02:02:44 mrt wpa_cli: interface wlan0 DISCONNECTED

Sep 20 02:02:40 mrt kernel: wlan0: deauthenticated from 00:0f:66:da:3a:4b (Reason: 7)

Sep 20 02:02:40 mrt kernel: cfg80211: Calling CRDA to update world regulatory domain

Sep 20 02:02:41 mrt wpa_cli: interface wlan0 DISCONNECTED

```

This has happened every night since I install. Again, the router does reboot at 2am but has done for a good long while without issue.

Is it a kernel issue? Is anyone else experiencing anything similar? All I know is it wasn't doing it on the old install which ran on kernel 2.6.35-gentoo-r1

I'm using kernel 2.6.35-gentoo-r7 but the ath5k driver built in.

----------

