# [resolved] wifi disconnects on no traffic

## keeperofdakeys

I use wpa_supplicant and dhcpcd in order to connect to my wireless router. When I am using the networking, like irc, then it is connected perfectly. The problem comes when I have nothing using the network (even if I have ssh open), then wpa_supplicant disconnects with the following message in my syslog.

```
wlan0: deauthenticated from xx:xx:xx:xx:xx:xx (Reason: 3)
```

dhcpcd then quits, wpa_supplicant reconnects and dhcpcd reconnects. This happens about every minute. Since it works perfectly with traffic, I'm thinking this must be a problem with my wifi card. It is an atheros AR9285 using the ath9k driver. I'm using the 2.6.36-tuxonice kernel from portage.Last edited by keeperofdakeys on Tue Nov 23, 2010 10:26 am; edited 1 time in total

----------

## idella4

It may not be.  When  use my wifi, it constantly disconnects, I think ti the dhsp lease time expiry time., which is several minutes, so it's not a huge issue..  I do also use wpa_supplicant.

Try getting rid of wpa_supplicat and use the std connect of the system, which I can't currently recall, or there are a couple of dhcp types, you can try another of those.

----------

## keeperofdakeys

I am 99% sure that this is not dhcp related, due to the log and the fact that I have NO disconnects when I am using the network (even a web-browser, as it keeps tcp connections to the servers).

```

kernel: cfg80211: Calling CRDA to update world regulatory domain

kernel: wlan0: authenticate with xx:xx:xx:xx:xx:xx (try 1)

kernel: wlan0: authenticated 

kernel: wlan0: associate with xx:xx:xx:xx:xx:xx (try 1)

kernel: wlan0: RX AssocResp from xx:xx:xx:xx:xx:xx (capab=0x431 status=0 aid=1)

kernel: wlan0: associated

kernel: cfg80211: Calling CRDA for country: DE 

dhcpcd[22656]: wlan0: carrier acquired

dhcpcd[22656]: wlan0: rebinding lease of 192.168.1.201

dhcpcd[22656]: wlan0: acknowledged 192.168.1.201 from 192.168.1.253

dhcpcd[22656]: wlan0: checking for 192.168.1.201

dhcpcd[22656]: wlan0: leased 192.168.1.201 for 86400 seconds

kernel: wlan0: deauthenticated from xx:xx:xx:xx:xx:xx (Reason: 3)

dhcpcd[22656]: wlan0: carrier lost

```

As you can see the lease time is long, and wlan0 is deauthenticated before dhcpcd complains that the interface is lost.

As for iwconfig, I can't use this because it is a wpa2 setup. I will try using the router in unencrypted mode and see if the same trouble occurs both with wpa_supplicant or iwconfig. There is also a second router I can try.

Edit: Upon testing this on a second router, which is also wpa2, I did not experience the disconnection. Therefore this has something to do with my dd-wrt router, so I shall be doing some more tests then asking this question on their forum. Thanks for the help.

----------

## mr.sande

If the second post at http://forums.wi-fiplanet.com/showthread.php?t=6536 is correct, you are being deauthenticated because your AP is going offline.

 *Quote:*   

> 0...noReasonCode...Normal operation.
> 
> 1...unspecifiedReason...Client associated but no longer authorized.
> 
> 2...previousAuthNotValid...Client associated but not authorized.
> ...

 

----------

## keeperofdakeys

Thanks, this seems to fit very well with it working on the second router. Now I just need to work out why my router is deciding that no traffic is a reason to turn off the AP.

----------

## DrSlony

Have you had any luck with finding out why your AP gets turned off? I suffer from the same "Reason: 3" problem.

Using a D-Link DIR-615, Firmware Version : 1.00VG

----------

## keeperofdakeys

 *DrSlony wrote:*   

> Have you had any luck with finding out why your AP gets turned off? I suffer from the same "Reason: 3" problem.
> 
> Using a D-Link DIR-615, Firmware Version : 1.00VG

 

I'm sorry, but it seems to have mysteriously solved itself. I did try restarting some options again, and it mystically worked.[/i]

----------

## DrSlony

Same here, no more "Reason 3". Using gentoo-sources-2.6.36-r5, iwlagn for wlan1 and rtl8187 for wlan0, r8169 for eth0, and wpa_supplicant-0.7.2-r3.

----------

