# [Solv]Problems debuging periodical wireless connection loss.

## Sujao

Hey guys,

my Gentoo machine is loosing it's wireless connection regulary. The problem is that this happens on a layer that most tools I use to check it don't recognize it. I only notice it when my instant messenger looses it's connection (I guess due to a timeout) or a http connection times out in firefox.

I monitored the output of iwconfig wlan1, ifconfig wlan1, dmesg and the debug output of wpa_supplicant but neither of them changes on a connection loss.

Here is what kopete tells me in a chat windows after several hours.

```
(14:47:01)  #  You are now marked as Offline.

(14:47:13)  #  You are now marked as Online.

(15:01:27)  #  You are now marked as Offline.

(15:01:39)  #  You are now marked as Online.

(15:11:53)  #  You are now marked as Offline.

(15:12:04)  #  You are now marked as Online.

(15:22:19)  #  You are now marked as Offline.

(15:22:30)  #  You are now marked as Online.

(15:32:44)  #  You are now marked as Offline.

(15:33:01)  #  You are now marked as Online.

(15:43:15)  #  You are now marked as Offline.

(15:43:32)  #  You are now marked as Online.

(15:53:46)  #  You are now marked as Offline.

(15:53:57)  #  You are now marked as Online.

(16:17:21)  #  You are now marked as Offline.

(16:17:32)  #  You are now marked as Online.

(16:35:43)  #  You are now marked as Online.
```

Here is a ping output (the one in the middle is the connection loss I guess)

```
...

64 bytes from bender.bawue.de (193.7.176.20): icmp_seq=666 ttl=55 time=95.2 ms

64 bytes from bender.bawue.de (193.7.176.20): icmp_seq=667 ttl=55 time=43.2 ms

64 bytes from bender.bawue.de (193.7.176.20): icmp_seq=689 ttl=55 time=1002 ms

64 bytes from bender.bawue.de (193.7.176.20): icmp_seq=690 ttl=55 time=46.4 ms

64 bytes from bender.bawue.de (193.7.176.20): icmp_seq=691 ttl=55 time=15.2 ms

...
```

At the moment I use the atk5k kernel module in 2.6.33-zen1 with a TP-Link TL-WN350G Wireless PCI card. The router/access point is a D-Link DIR-301. 

/etc/wpa_supplicant/wpa_supplicant.conf (replaced ssid and psk with <x>)

```

ctrl_interface=/var/run/wpa_supplicant

eapol_version=1

ap_scan=1

fast_reauth=1

network={

        ssid="<myssid>"

        psk=<mykey>

        proto=WPA2

        key_mgmt=WPA-PSK

        pairwise=CCMP

        group=CCMP

}
```

/etc/conf.d/net

```
config_wlan1=( "192.168.0.101/24 brd 192.168.0.255 ")

routes_wlan1=( 

        "default via 192.168.0.1"

        )

dns_servers=( "192.168.0.1")

```

I don't understand on what layer the connection loss is happening and what kind of tools could catch the error? Do you have any ideas?Last edited by Sujao on Sat Aug 07, 2010 11:39 pm; edited 1 time in total

----------

## dermund

Hi Sujao,

```
(14:47:01)  #  You are now marked as Offline.

(14:47:13)  #  You are now marked as Online.

(15:01:27)  #  You are now marked as Offline.

(15:01:39)  #  You are now marked as Online.

(15:11:53)  #  You are now marked as Offline.

(15:12:04)  #  You are now marked as Online.

(15:22:19)  #  You are now marked as Offline.

(15:22:30)  #  You are now marked as Online.

(15:32:44)  #  You are now marked as Offline.

(15:33:01)  #  You are now marked as Online.

(15:43:15)  #  You are now marked as Offline.

(15:43:32)  #  You are now marked as Online.

(15:53:46)  #  You are now marked as Offline.

(15:53:57)  #  You are now marked as Online.

(16:17:21)  #  You are now marked as Offline.

(16:17:32)  #  You are now marked as Online.

(16:35:43)  #  You are now marked as Online.

```

Almost every 10 minutes ... a pattern emerges!  :Surprised: 

 *Sujao wrote:*   

> I don't understand on what layer the connection loss is happening and what kind of tools could catch the error? Do you have any ideas?

 

I once captured packets with wireshark and it worked quite good - it captures everything but the physical layer. So the output should bring you enlightenment. If you never worked with wireshark before the wireless setup could be a challenging task. However it is worth the effort.

Kind regards,

dermund

----------

## Sujao

I updated my router D-Link DIR-301 and haven't had any connection losses since. So it was its fault all the time.

----------

