# deauthenticated due to inactivity

## eruditas

```
cat /var/log/messages

Sep 11 19:31:30 darwin hostapd: wlan1: STA 00:12:f0:73:db:16 IEEE 802.11: disassociated

Sep 11 19:31:31 darwin hostapd: wlan1: STA 00:12:f0:73:db:16 IEEE 802.11: deauthenticated due to inactivity

Sep 11 19:31:32 darwin hostapd: wlan1: STA 00:12:f0:73:db:16 IEEE 802.11: authenticated

Sep 11 19:31:32 darwin hostapd: wlan1: STA 00:12:f0:73:db:16 IEEE 802.11: associated (aid 1)

Sep 11 19:31:32 darwin hostapd: wlan1: STA 00:12:f0:73:db:16 RADIUS: starting accounting session 4AA96D11-000000BD

Sep 11 19:31:32 darwin hostapd: wlan1: STA 00:12:f0:73:db:16 WPA: pairwise key handshake completed (RSN)

```

Why is is happening? Sometimes I don't even feel the reconnection, but sometimes it's noticeable. It's really annoying, as I'm using putty, mIRC and other programs, that require constant connection.

----------

## SZwarts

Wait... wait... Putty and mIRC? These are windows programs, right? Why run Putty in wine (?)  when you have ssh? I'm confused..

Anyway... not really solving the problem where it should be solved, but a nice way around this:

ssh (and also the windows putty) can send a regular keep-alive packet. If you set the timer for these packets below the timer for inactivity for your wireless, you shouldn't get disassociated.

Add ClientAliveInterval 30 to /etc/ssh/sshd_config or find it in your putty settings. (Change the 30 to wathever is appriopiate)

----------

## eruditas

Yes, they are created for windows  :Smile:  I'm using windows for my desktop, becouse I need specific programs in university  :Smile: 

----------

## SZwarts

 *eruditas wrote:*   

> Yes, they are created for windows  I'm using windows for my desktop, becouse I need specific programs in university 

 

Well that's all ok and stuff, but isn't it weird to ask for help for a windows computer on a gentoo forum? Or do I miss some information? Is the disconnecting computer a windows computer or a gentoo one?

Anyway... Have you tried the keep alive at ssh? Or for putty check this to see how to set keep alive packets. I assume this provides a neat solution as long as the putty is open. 

And I'm pretty sure, Mirc also would be capable of sending these keep alive stuff.

----------

## eruditas

Well, I don't think that this is Windows problem, because router is based on gentoo. While connected to other routers I don't have any problem. 

I think this is some kind of hostapd problem. And I don't think that your solution with putty will help, becouse mirc sends packets itself, and I'm connected also with smartftp to my ftp server. It keeps sending packets by itself  :Smile: 

----------

## SZwarts

Ah... I'm starting to understand. You didn't tell you have a linux router, and you are trying to solve it server-side. I assumed you had some ADSL-router thing or something and your linux-laptop would disconnect. (It helps to be complete when describing a problem, for you these things are obvious but we don't know them)

So you're saying that even though you are using your wifi connection, it still disconnects? That would be really odd.

Just being connect, doesn't mean you are using the connection. If you only have the FTP connection and putty connection open, but there is no data flowing in them, than you are not using it. Mirc probably only sends something when someone types something, which means that if someone doesn't type anything for 2 or 3 min, you have an inactivity for 2 or 3 mins.

So, either:

1) You are actually sending data and the router thinks there is inactivity (this would be very very odd)

2) You are connected, but not actually using the connections constantly. In this case a regular keep alive packet would solve the problem and reset inactivity counters.

I still put my money on 2) since you so far only speak of being connected, and would at least try a solution like that.

If not, maybe somebody else has any help to offer.

----------

## CurtE

I use putty, also.  KeepAlive is set off and I never have had that problem.  The only obvious difference is I'm wired.  What version of putty are you using?

----------

