# ipw2200 no longer connects

## statwizard

OK, after searching around, I don't see anything that matches this problem...

I ran an emerge system around June 14 or so.  One of the new packages that came along with that was baselayout-1.11.12-r4.  I thought nothing of it, not knowing that the new baselayout really changed a lot on the system.  But a few days later, I shut down my system for one of my occasional forays into the land of Windoze (bleah).  When I came back to Gentoo, I no longer had wireless Internet access.  As I am this summer on an internship, I actually don't have wired Internet at my place of residence, and have been relying on hotspots.  Unfortunately, not being able to access the 'net through Gentoo is becoming a huge pain!

I have rebuilt my kernel since then in order to fix a different issue, but after rebuilding, I did re-emerge ipw2200-firmware and ipw2200.

As I can't connect Linux to the Internet, all of the following code-snippets have been typed by hand.  Hopefully I haven't made any typos.

Upon a fresh boot of the system, iwconfig gives me output like this:

```
#iwconfig eth0

eth0    IEEE 802.11b   ESSID:"hotspot"

        Mode:Managed  Frequency:2.437 GHz  Access Point: 00:0C:etc.

        Bit Rate:11 kb/s   Tx-Power=20 dBm

        RTS thr:off   Fragment thr:off

        Encryption key:off

        Power management:off

        Link Quality=31/100  Signal level=-74 dBm  Noise level=-84 dBm

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

        Tx excessive retries:0  Invalid misc:7   Missed beacon:59

```

Meanwhile, iwpriv gives me this:

```
#iwpriv eth0 get_mode

eth0    get_mode: 802.11bg (6)

#iwpriv eth0 get_preamble

eth0    get_preamble: auto (0)

#iwpriv eth0 get_power

eth0    get_power: Power save level = 6 (AC) OFF

```

And iwlist gives this:

```
#iwlist eth0 scan

eth0    Scan completed :

        Cell 01 - Address: 00:0C:etc.

                  ESSID: "hotspot"

                  Protocol: IEEE 802.11b

                  Mode: Master

                  Channel: 6

                  Encryption key: off

                  Bit rate: 11 Mb/s

                  Extra: Rates (Mb/s): 1 2 5.5 11

                  Quality=31/100  Signal level=-74 dBm

                  Extra: Last beacon: 78ms ago

```

The driver loads in dmesg without event -- the last ipw2200 line I copied down from dmesg is

```
ipw2200: Detected Intel PRO/Wireless 2200BG Network Connection
```

Here are some config files:

```
#cat /etc/conf.d/net

modules=("ifconfig" "iwconfig")

config_eth0=("dhcp")

config_eth1=("dhcp")

#cat /etc/conf.d/wireless

preferred_aps=("hotspot")

associate_order="preferredonly"

```

and I have tried to use essid_eth0="hotspot" here as well.

Now let's "start" the network:

```
#/etc/init.d/net.eth0 start

* Starting eth0

*   Configuring wireless network for eth0

*   Couldn't associate with any access points on eth0

*   Failed to configure wireless for eth0

```

I ran a session of iwevent in another window at the same time, and here's what I got:

```
#iwevent

*time* eth0    Set Encryption key:off

*time* eth0    Set ESSID:off/any

*time* eth0    Set Mode:Managed

*time* eth0    Set Encryption key:off

*time* eth0    Set ESSID:"hotspot"

*time* eth0    New Access Point/Cell address:00:00:00:00:00:00

*time* eth0    New Access Point/Cell address:00:00:00:00:00:00

*time* eth0    New Access Point/Cell address:00:00:00:00:00:00

*time* eth0    Set Encryption key:off

*time* eth0    Set ESSID:off/any

*time* eth0    New Access Point/Cell address:00:00:00:00:00:00

```

With this last line repeating about once a second.  Five minutes later I fired up iwevent again and the New Access Point line was still repeating, but more around once every three or four seconds.

After a few minutes after trying to start the network, dmesg begins to show lines like these:

```
ipw2200: Firmware error detected.  Restarting.

ipw2200: Firmware error detected.  Restarting.

ipw2200: Failed to send ASSOCIATE command.

```

Sometimes it says that it Failed to send SENSITIVITY CALIB command instead.  These messages do not show up in dmesg until after I attempt to start the network.

The net.eth0 start command causes an immediate change in the output of iwconfig, too.

```
#iwconfig eth0

eth0    unassociated  ESSID:off/any Nickname:"hotspot"

        Mode:Managed  Channel=0  Access Point: 00:00:00:00:00:00

        Bit Rate:0 kb/s   Tx-Power=255 dBm

        RTS thr:off   Fragment thr:off

        Encryption key:off

        Power management:off

        Link Quality:0  Signal level:0  Noise level:0

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

        Tx excessive retries:0  Invalid misc:8   Missed beacon:0

```

Several changes have happened here, including a replacement of the first line; a replacement of Frequency by Channel; the disappearance of the A/P; the change of Bit Rate and Tx-Power; zeroing in the Link Quality line; and a zeroing of missed beacons.

This iwconfig change registers in Gkrellm's wireless plugin which I start when I log in to X.  The krells show that there is an A/P in range, and provides the readout for Link Quality, Signal, Noise, and Bit Rate, as iwconfig gives it initially.  Almost immediately after hitting enter on net.eth0 start, these krells change to the new iwconfig values.

Now, every now and then (it has happened twice since the June 14 emerge) when I run net.eth0 start, the system actually does claim to associate with the A/P.  However, the dhcp invariably fails, and the dmesg logs go crazy.  I wasn't able to duplicate this though when I was hand-writing down log files this morning.  I would suspect that if I were to look at iwevent that I'd see the system decide to associate to the A/P at 00:00:00:00:00:00 again.

If I need to install programs to fix this, I will need steps on knowing which files to download (and where from) and how to get emerge to work correctly when it doesn't have an Internet connection, as I've never dealt with a no-connection problem before.

Advice will be much appreciated.  Again, this was not a problem until after an emerge on or around June 14th, and the best suspicion I have is that baselayout doesn't like my laptop...

----------

## statwizard

I decided to try something else I hadn't thought of.

```
# ifconfig eth0 up

# dhcpcd eth0

```

This brings the interface up rather nicely.

Does anyone have any ideas why /etc/init.d/net.eth0 start won't work, but this will?  I can always throw away the net.eth0 script and replace it with one that just does the above...  But then I also know that I would lose some of the power in /etc/conf.d/net and /etc/conf.d/wireless...

----------

## schmobag

After updating my ipw2200 to the latest ~x86 ebuild (ver 1.0.6), my wireless didn't work any more.  While trying to start the wireless network, the following was printed in the system log:

```

ipw2200: failed to send ASSOCIATE command

```

I couldn't find the answer in the forums, so I googled on that string, and this post on the Ubuntu forums came up.  According to the thread, the problem can be solved by adding the following line to /etc/modules.d/ipw2200:

```

options ipw2200 hwcrypto=0

```

Now my wireless connects just fine.  Though I do still get the odd "ioctl[SIOCSIWPMKSA]: Operation not supported" error.  But I guess it's harmless, since the network works.

----------

## jamapii

 *statwizard wrote:*   

> 
> 
> ```
> # ifconfig eth0 up
> 
> ...

 

You can put this ("ifconfig eth0 up") in a preup() function in /etc/init.d/net.eth0, then the normal Gentoo way might work again.

I guess the wireless device was turned off in hardware, and ifconfig switched it on. Maybe a BIOS feature or something Windows did, after a driver update.

----------

## statwizard

 *schmobag wrote:*   

> According to the thread, the problem can be solved by adding the following line to /etc/modules.d/ipw2200:
> 
> ```
> 
> options ipw2200 hwcrypto=0
> ...

 

Inserting this line and trying to bring the module up returns

```

Jul 20 20:41:00 [kernel] ipw2200: Unknown parameter `hwcrypto'

```

With regard to the other solution, to just preup() the ifconfig eth0 up command, this doesn't make any difference.  The problems I described in my original post persist anyway.  My solution of running ifconfig eth0 up; dhcpcd eth0 works only in place of the net.eth0 script.

----------

## schmobag

Which version of ipw2200 are you using?

As far as I know, you only need to put that line in /etc/modules.d/ipw2200 if you're seeing the "failed to send ASSOCIATE command" error in your system log.  I never saw the "failed to send ASSOCIATE command" bug with any ipw2200 version through 1.0.3.  I think I saw it a month or two ago with v 1.0.4, but my solution at the time was just to downgrade.  So you probably only need to do the "hwcrypto" thing if you're using >=ipw2200-1.0.4 (I've definitely seen the problem with 1.0.6).

If you're using <=ipw2200-1.0.3, and/or if you're not seeing the "failed to send ASSOCIATE command" error in your system log, you probably don't need to put "options ipw2200 hwcrypto=0" in /etc/modules.d/ipw2200.

----------

## statwizard

 *schmobag wrote:*   

> Which version of ipw2200 are you using?

 

1.0.3

----------

## schmobag

 :Embarassed: 

Sorry, just re-read your original post, and realized that you did say that you're seeing the "failed to send ASSOCIATE command" problem.

 :Confused: 

Also, I just grepped through my system log, and realized that that error still pops up occasionally, even though I'm able to connect.  Therefore, it's possible that adding that line to /etc/modules.d/ipw2200 didn't really do anything.  On the other hand, I have never seen the "Unknown parameter `hwcrypto'" error, so I'm assuming you're using an earlier version of the driver than I am (1.0.6), and that your version doesn't understand that option.

----------

## jimonade

bump yo!

im having the same problem.  i've had my ipw2200 working for months and then a recent sync wanted to update baselayout and now its borked.

i have confirmed that the ap is up and working.

here is a snip (typed by hand, sorry for typeos):

```
 Ramiken ~ # /etc/init.d/net.eth1 start

 * Caching service dependencies ...

 * Starting eth1

 *      Configuring wireless network for eth1

 *      Trying to force preferred in case they are hidden

 *      Failed to associate with any preferred access points on eth1

 *      Failed to configure wireless for eth1
```

so i edited /etc/conf.d/net relaxing eth1's preferred ap settings, commented them out really and just set to associate with "any", still borked.

portage asked me to run 

```
/bin/ls /etc/init.dnet.eth* | xargs -n1 ln -sfvn net.lo
```

 when 3239-baselayout-1.11.13 was finished emerging, so i did.  would this have something to do with the problem?  (its unlikely i think but thrown in for good measure)

hazzah!

----------

## jimonade

here is some additional information on the problem...

i think this all started when i upgraded to sys-apps/baselayout-1.11.13

i've had the ipw2200 working with the same config for months and months which now returns...

```
Ramiken ~ # /etc/init.d/net.eth1 start

 * Starting eth1

 *   Configuring wireless network for eth1

 *   Trying to force preferred in case they are hidden

 *   Failed to associate with any preferred access points on eth1

 *   Failed to configure wireless for eth1                                [ !! ]

Ramiken ~ # iwconfig

eth0      no wireless extensions.

lo        no wireless extensions.

eth1      unassociated  ESSID:off/any  Nickname:"SomeOtherAP"

          Mode:Managed  Channel=0  Access Point: 00:00:00:00:00:00

          Bit Rate=0 kb/s   Tx-Power=255 dBm

          RTS thr:off   Fragment thr:off

          Encryption key:off

          Power Management:off

          Link Quality:0  Signal level:0  Noise level:0

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

          Tx excessive retries:0  Invalid misc:6   Missed beacon:0
```

the wireless bit of my /etc/conf.d/net...

```
# wireless config

modules=( "iwconfig" )

iface_eth1="dhcp"

#dhcpcd_eth1="-HD -t 5"

dhcpcd_eth1="-D -t 5"

#gateway="/"

# profile for wireless at my apt

essid_eth1="any"

mode_eth1="auto"

preferred_aps=( "MyFavoriteAP" "SomeOtherAP" )

#blacklist_aps=( "SmellyAP" )

associate_order="any"
```

examining /var/log/messages we have...

```
Ramiken ~ # tail -n 500 /var/log/messages | grep -i ipw

Jul 26 13:29:03 Ramiken ipw2200: Firmware error detected.  Restarting.

Jul 26 13:29:04 Ramiken ipw2200: Firmware error detected.  Restarting.

Jul 26 13:29:04 Ramiken ipw2200: failed to send ASSOCIATE command

Jul 26 13:47:15 Ramiken ipw2200: Firmware error detected.  Restarting.

Jul 26 13:47:16 Ramiken ipw2200: Firmware error detected.  Restarting.

Jul 26 13:47:16 Ramiken ipw2200: failed to send SENSITIVITY CALIB command

Jul 26 14:46:27 Ramiken ipw2200: Firmware error detected.  Restarting.

Jul 26 14:46:27 Ramiken ipw2200: Firmware error detected.  Restarting.

Jul 26 14:46:28 Ramiken ipw2200: failed to send SENSITIVITY CALIB command

Jul 26 15:13:38 Ramiken ipw2200: Firmware error detected.  Restarting.[b]

Jul 26 15:13:38 Ramiken ipw2200: Firmware error detected.  Restarting.

Jul 26 15:13:39 Ramiken ipw2200: failed to send ASSOCIATE command

Jul 26 15:38:49 Ramiken ipw2200: Firmware error detected.  Restarting.

Jul 26 15:38:50 Ramiken ipw2200: Firmware error detected.  Restarting.

Jul 26 15:38:51 Ramiken ipw2200: failed to send ASSOCIATE command

Jul 26 15:39:01 Ramiken ipw2200: Firmware error detected.  Restarting.

Jul 26 15:39:01 Ramiken ipw2200: Firmware error detected.  Restarting.

Jul 26 15:39:02 Ramiken ipw2200: failed to send ASSOCIATE command

Jul 26 15:39:12 Ramiken ipw2200: Firmware error detected.  Restarting.

Jul 26 15:39:13 Ramiken ipw2200: Firmware error detected.  Restarting.

Jul 26 15:39:13 Ramiken ipw2200: failed to send SENSITIVITY CALIB command

Jul 26 17:51:37 Ramiken ipw2200: Intel(R) PRO/Wireless 2200/2915 Network Driver, 1.0.3

Jul 26 17:51:37 Ramiken ipw2200: Copyright(c) 2003-2004 Intel Corporation

Jul 26 17:51:37 Ramiken ipw2200: Detected Intel PRO/Wireless 2200BG Network Connection
```

so i tried changing my /etc/conf.d/net...

```
# wireless config

modules=( "iwconfig" )

iface_eth1="dhcp"

#dhcpcd_eth1="-HD -t 5"

dhcpcd_eth1="-D -t 5"

#gateway="/"

# profile for wireless at my apt

essid_eth1="any"

mode_eth1="auto"
```

different output, but still borked...

```
Ramiken ~ # /etc/init.d/net.eth1 start

 * Starting eth1

 *   Configuring wireless network for eth1

 *   Failed to configure wireless for eth1                                [ !! ]

Ramiken ~ # iwconfig

eth0      no wireless extensions.

lo        no wireless extensions.

eth1      unassociated  ESSID:off/any  Nickname:"any"

          Mode:Managed  Channel=0  Access Point: 00:00:00:00:00:00

          Bit Rate=0 kb/s   Tx-Power=255 dBm

          RTS thr:off   Fragment thr:off

          Encryption key:off

          Power Management:off

          Link Quality:0  Signal level:0  Noise level:0

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

          Tx excessive retries:0  Invalid misc:6   Missed beacon:0[/b]
```

i will continue trying different things and will post my findings.  in the meantime if anyone knows a solution please share!

-jLast edited by jimonade on Wed Jul 27, 2005 4:29 pm; edited 1 time in total

----------

## schmobag

I would suggest updating to the most recent ~x86 versions of ipw2200, wireless-tools, and wpa_supplicant, if you haven't done so already.  Here are the versions that I currently have working together:

baselayout-1.11.13

ipw2200-1.0.6

wireless-tools-28_pre8-r1

wpa_supplicant-0.4.3-r1

EDIT:  just realized that you aren't using wpa_supplicant.  So go ahead and ignore that.  However, I still think you should update ipw2200 and wireless-tools.  Since you saw the problem after a baselayout upgrade, I strongly suspect that you're seeing a version incompatibility.

----------

## jimonade

schmobag, you're my hero.  i try not to go ~x86 unless i have to, and it looks like this is one of those instances.  the below is inspired by your suggestion and worked just fine.  thanks!

in /etc/portage/package.keywords

```
=net-wireless/ieee80211-1.0.3 ~x86

=net-wireless/ipw2200-1.0.6 ~x86

=net-wireless/ipw2200-firmware-2.3 ~x86

=net-wireless/wireless-tools-28_pre8-r1 ~x86
```

```
Ramiken ~ # emerge -uDNvp world

These are the packages that I would merge, in order:

Calculating world dependencies ...done!

[blocks B     ] <=net-wireless/ipw2200-1.0.4 (is blocking net-wireless/ieee80211-1.0.3)

[ebuild     U ] net-wireless/wireless-tools-28_pre8-r1 [27-r1] -multicall +nls 216 kB

[ebuild  N    ] net-wireless/ieee80211-1.0.3  -debug 61 kB

[ebuild  NS   ] net-wireless/ipw2200-firmware-2.3  261 kB

[ebuild     U ] net-wireless/ipw2200-1.0.6 [1.0.3] -debug 110 kB

Ramiken ~ # emerge -C ipw2200-firmware ipw2200

... output ...

Ramiken ~ # emerge -uDNvp ipw2200

These are the packages that I would merge, in order:

Calculating dependencies ...done!

[ebuild     U ] net-wireless/wireless-tools-28_pre8-r1 [27-r1] -multicall +nls 216 kB

[ebuild  N    ] net-wireless/ieee80211-1.0.3  -debug 61 kB

[ebuild  N    ] net-wireless/ipw2200-firmware-2.3  261 kB

[ebuild  N    ] net-wireless/ipw2200-1.0.6  -debug 110 kB

Ramiken ~ # emerge -uDNv ipw2200

... output ...
```

and viola!

```
Ramiken ~ # /etc/init.d/net.eth1 start

 * Starting eth1

 *   Configuring wireless network for eth1

 *     eth1 connected to "crappyISPAP" at 00:0B:33:06:0B:89

 *     in managed mode (WEP disabled)

 *   Bringing up eth1

 *     dhcp

 *       Running dhcpcd ...                                               [ ok ]

 *       eth1 received address 10.80.19.41
```

----------

