# how to restart the connection fast? ipw2200 firmware problem

## GNUtoo

hello, i don't have yet internet and so i rely on my neighbourg wifi

but what is very problematic is that sometimes the connections last for very few time

such as 6 pings....

so i must restart eth2...

when i was doing it manualy it was driving me mad...

now i've made a perl script that automates the thing:

```
#!/usr/bin/perl

use strict;

use warnings;

use Net::Ping;

my $p = Net::Ping->new();

my $host = 'www.google.com';

while (1) {

if ($p->ping($host,2)) {

$p->close();

}

else {

$p->close();

system "/etc/init.d/net.eth2 restart";

sleep(5);

}

}
```

but the problem is that the output of a ping gives me that:

```

64 bytes from loon.gentoo.org (209.177.148.229): icmp_seq=353 ttl=52 time=181 ms

64 bytes from loon.gentoo.org (209.177.148.229): icmp_seq=354 ttl=52 time=180 ms

64 bytes from loon.gentoo.org (209.177.148.229): icmp_seq=355 ttl=52 time=179 ms

64 bytes from loon.gentoo.org (209.177.148.229): icmp_seq=356 ttl=52 time=179 ms

64 bytes from loon.gentoo.org (209.177.148.229): icmp_seq=357 ttl=52 time=182 ms

64 bytes from loon.gentoo.org (209.177.148.229): icmp_seq=358 ttl=52 time=179 ms

From port4 (168.0.0.2) icmp_seq=359 Destination Net Unreachable

From port4 (168.0.0.2) icmp_seq=360 Destination Net Unreachable

From port4 (168.0.0.2) icmp_seq=361 Destination Net Unreachable

From port4 (168.0.0.2) icmp_seq=362 Destination Net Unreachable

From port4 (168.0.0.2) icmp_seq=363 Destination Net Unreachable

From port4 (168.0.0.2) icmp_seq=364 Destination Net Unreachable

From port4 (168.0.0.2) icmp_seq=365 Destination Net Unreachable

From port4 (168.0.0.2) icmp_seq=366 Destination Net Unreachable

From port4 (168.0.0.2) icmp_seq=367 Destination Net Unreachable

64 bytes from loon.gentoo.org (209.177.148.229): icmp_seq=368 ttl=52 time=180 ms

64 bytes from loon.gentoo.org (209.177.148.229): icmp_seq=369 ttl=52 time=180 ms

64 bytes from loon.gentoo.org (209.177.148.229): icmp_seq=370 ttl=52 time=179 ms

64 bytes from loon.gentoo.org (209.177.148.229): icmp_seq=371 ttl=52 time=179 ms

64 bytes from loon.gentoo.org (209.177.148.229): icmp_seq=372 ttl=52 time=179 ms

64 bytes from loon.gentoo.org (209.177.148.229): icmp_seq=373 ttl=52 time=179 ms

From port4 (168.0.0.2) icmp_seq=374 Destination Net Unreachable

From port4 (168.0.0.2) icmp_seq=375 Destination Net Unreachable

From port4 (168.0.0.2) icmp_seq=376 Destination Net Unreachable

From port4 (168.0.0.2) icmp_seq=377 Destination Net Unreachable

From port4 (168.0.0.2) icmp_seq=378 Destination Net Unreachable

From port4 (168.0.0.2) icmp_seq=379 Destination Net Unreachable

From port4 (168.0.0.2) icmp_seq=380 Destination Net Unreachable

From port4 (168.0.0.2) icmp_seq=381 Destination Net Unreachable

From port4 (168.0.0.2) icmp_seq=382 Destination Net Unreachable

64 bytes from loon.gentoo.org (209.177.148.229): icmp_seq=383 ttl=52 time=180 ms

64 bytes from loon.gentoo.org (209.177.148.229): icmp_seq=384 ttl=52 time=181 ms

64 bytes from loon.gentoo.org (209.177.148.229): icmp_seq=385 ttl=52 time=179 ms

64 bytes from loon.gentoo.org (209.177.148.229): icmp_seq=386 ttl=52 time=180 ms

64 bytes from loon.gentoo.org (209.177.148.229): icmp_seq=387 ttl=52 time=180 ms

From port4 (168.0.0.2) icmp_seq=388 Destination Net Unreachable

From port4 (168.0.0.2) icmp_seq=389 Destination Net Unreachable

From port4 (168.0.0.2) icmp_seq=390 Destination Net Unreachable

From port4 (168.0.0.2) icmp_seq=391 Destination Net Unreachable

From port4 (168.0.0.2) icmp_seq=392 Destination Net Unreachable

From port4 (168.0.0.2) icmp_seq=393 Destination Net Unreachable

From port4 (168.0.0.2) icmp_seq=394 Destination Net Unreachable

From port4 (168.0.0.2) icmp_seq=395 Destination Net Unreachable

From port4 (168.0.0.2) icmp_seq=396 Destination Net Unreachable

```

so i am online 50% if the time...that is a problem...

is there a faster way to restart eth2?

the ip,the dns and the routes are static...

here my iwconfig when the interet is not recheable(the ssid and the acess point mac have been masked)

```
eth2      IEEE 802.11g  ESSID:"XXXXXXX"

          Mode:Managed  Frequency:2.462 GHz  Access Point: 00:18:4D:xx:xx:xx

          Bit Rate:54 Mb/s   Tx-Power=20 dBm   Sensitivity=8/0

          Retry limit:7   RTS thr:off   Fragment thr:off

          Encryption key:off

          Power Management:off

          Link Quality=67/100  Signal level=-60 dBm  Noise level=-87 dBm

          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0

          Tx excessive retries:36  Invalid misc:33   Missed beacon:1

```

Last edited by GNUtoo on Sat Nov 03, 2007 11:42 am; edited 1 time in total

----------

## bunder

Moved from Installing Gentoo to Networking & Security.

----------

## GNUtoo

i have made a dmesg and i have found that after restarting the interface

```
ipw2200: Firmware error detected.  Restarting.

ipw2200: Failed to send RTS_THRESHOLD: Already sending a command.

ipw2200: Failed to send FRAG_THRESHOLD: Already sending a command.

ipw2200: Failed to send SYSTEM_CONFIG: Command timed out.

```

----------

## fillerbunny

I get similar errors.

switching off hardware crypto by adding

"options ipw2200 hwcrypto=0"

to /etc/modules.d/ipw2200 helps somewhat

(create file if it does not exist).

I googled for ipw2200 firmware error for that one.

I still get firmware errors and also:

ipw2200: Parity error

once or twice a day and the interface stops working, but switching off

hardware crypto helped alot.

Roy

----------

