# ipw2200: unstable or not connection at all

## vpoinot

I have several stability issues with wireless under Linux:

- at home, my access point uses WPA: I sometimes can connect quickly, sometimes I have to stop my network interface, rmmod ipw2200 and reload it,  sometimes once connected, I can see in wpa_gui that the connection goes up and down from time to time, and since yesterday, I just can't connect at all,

- when I am on the road, I uses open access points: I usually can connect, but other issues happen as well (so I guess WPA is not the cause, nor my home router -- and anyway, I can connect to my home netwrok from Windows with no problem at all).

I found on the forum several people having similar issues, but no real solution except upgrading to latest packages. However, I do have latest packages:

- kernel 2.6.24

- in-kernel ipw2200 module,

- ipw2200 firmware 3.0,

- wpa_supplicant 0.5.7

Here is some configuration values that should be relevant:

1) Wireless kernel configuration

```
<M> Improved wireless configuration API                          

   [*]   nl80211 new netlink interface support                   

   -*- Wireless extensions                                       

   < > Generic IEEE 802.11 Networking Stack (mac80211)           

   {M} Generic IEEE 802.11 Networking Stack                      

   [ ]   Enable full debugging output                            

   -M-   IEEE 802.11 WEP encryption (802.1x)                     

   <M>   IEEE 802.11i CCMP support                               

   <M>   IEEE 802.11i TKIP encryption                            

   <M>   Software MAC add-on to the IEEE 802.11 networking stack 

   [ ]     Enable full debugging output
```

2) Cryptography in kernel

```
--- Cryptographic API                                     

   -*-   Cryptographic algorithm manager                  

   -*-   HMAC support                                     

   < >   XCBC support                                     

   < >   Null algorithms                                  

   < >   MD4 digest algorithm                             

   -*-   MD5 digest algorithm                             

   -*-   SHA1 digest algorithm                            

   < >   SHA256 digest algorithm                          

   < >   SHA384 and SHA512 digest algorithms              

   < >   Whirlpool digest algorithms                      

   < >   Tiger digest algorithms                          

   < >   GF(2^128) multiplication functions (EXPERIMENTAL)

   {M}   ECB support                                      

   -*-   CBC support                                      

   < >   PCBC support                                     

   < >   LRW support (EXPERIMENTAL)                       

   < >   XTS support (EXPERIMENTAL)                       

   < >   Software async crypto daemon                     

   -*-   DES and Triple DES EDE cipher algorithms         

   < >   FCrypt cipher algorithm                          

   < >   Blowfish cipher algorithm                        

   < >   Twofish cipher algorithm                         

   < >   Twofish cipher algorithms (i586)                 

   < >   Serpent cipher algorithm                         

   {M}   AES cipher algorithms                            

   <M>   AES cipher algorithms (i586)                     

   < >   CAST5 (CAST-128) cipher algorithm                

   < >   CAST6 (CAST-256) cipher algorithm                

   < >   TEA, XTEA and XETA cipher algorithms             

   {M}   ARC4 cipher algorithm                            

   < >   Khazad cipher algorithm                          

   < >   Anubis cipher algorithm                          

   < >   SEED cipher algorithm                            

   -*-   Deflate compression algorithm                    

   {M}   Michael MIC keyed digest algorithm               

   <M>   CRC32c CRC algorithm                             

   < >   Camellia cipher algorithms                       

   < >   Testing module                                   

   <M>   Authenc support                                  

   [ ]   Hardware crypto devices  --->
```

3) /etc/conf.d/net

```
modules=("wpa_supplicant")

wpa_supplicant_eth1="-Dwext"
```

4) wpa_supplicant

```
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel

update_config=1

network={

   ssid="MyNetwork"

   psk=6e3687c6431b8214934b4284e8b22324da15b780930b962c2d8a0c3bbcf99dea

   proto=WPA

   key_mgmt=WPA-PSK

   pairwise=TKIP

   group=TKIP

   disabled=1

}

network={

   ssid="OpenNetwork"

   key_mgmt=NONE

}
```

5) /etc/netplugd.conf

```
eth*
```

Unclear (not to say obscure) points are:

- the choice of networking stack in the kernel

- software MAC add-on to networking stack in the kernel,

- -Dwext in instead of what would seem more natural: -Dipw2200 for wpa_supplicant (but I tried the latter, and it does not work at all)

Any idea what I could try to have a reliable, robust, efficient wireless connection ?

By the way, I use an Intel PRO/Wireless 2915ABG card, which is not exactly exotic hardware, I think.

Thanks in advance.

----------

## davidgurvich

You can try increasing the priority of the wpa network in wpa_supplicant.conf and after disconnecting that will be the preferred network.  Also, you might try 'wpa_cli reassociate' instead of rmmod.  I had similar issues with the 2100 and have been testing FreeBSD7 on my laptop.  The wireless is more robust but battery life is shorter.  Suspend/Resume works better.

----------

## vpoinot

I could change the priority, but I don't think this would help connecting to my home network: I did try several manual operations (wpa_cli enable_network, select_network, reassociate) instead of just rmmod/modprobe, but this did not help.

And anyway, only one of the configured networks is available at any time, so there is no competition between them: wpa_supplicant should be able to select the unique available network.

But it is not: not only it cannot automatically select my home network, but if manually select it, wpa_supplicant cannot connect...

----------

## davidgurvich

Is that disabled=1 actually in wpa_supplicant.conf?  Does that cause wpa_supplicant to ignore that network?

----------

## vpoinot

Actually, I suspect that wpa_supplicant writes this line (disabled=1) itself after figuring out that it cannot connect, because if I stop wpa_supplicant, remove the line and restart wpa_supplicant, the line is back in the file.

I tried to manually enable the network in wpa_cli (enable_network), but it still cannot connect.

Could there be something wrong with the driver itself (ipw2200) ? or with my kernel configuration ?

----------

## davidgurvich

I suspect that you are missing some required kernel options for wpa encryption if wpa_supplicant is adding that line.  I see that you are using 2.6.24 from your signature.  There were significant changes between 2.6.22,2.6.23, and 2.6.24 that negate using an older .config file.

----------

## pappy_mcfae

Using a .24 kernel with wireless is a real crap shoot, and it's usually a losing proposition. The .22 kernel has the best wireless reputation, but it's no longer in development. It is in portage, though. The .25 kernels are getting there again, but still not perfect. You may have to experiment with different kernel versions until you find the one that allows your hardware to work properly.

Blessed be!

Pappy

----------

## vpoinot

At least, this tends to confirm that wireless is fragile under Linux...

Can someone explain me what's the deal with this old/new mac80211 stack? Which one are we supposed to use now? Are both usable with any driver? What about ipw2200 specificatlly?

What about wireless extensions? Are they obsolete? What is supposed to replace them?

I will try a 2.6.25 when I have some time.

----------

## davidgurvich

You want to use the newer stack, if you can.  Many cards are not yet working correctly with the new stack.  Most features are abstracted out of the driver, hopefully allowing for simpler drivers with fewer bugs.  An example might be changing from WEP to WPA encryption or whatever comes afterwards.  If done in the driver, every driver needs to be rewritten for the change to work.  If done in the stack, only the stack needs to be rewritten.  Of course, there are features that are not available on certain cards.

Perhaps someone who knows more about this will correct me if anything here is wrong.

----------

## pappy_mcfae

You're pretty much right. The real thing that ultimately determines the kernel settings is what driver you want to use. If you go the route of ndiswrapper, you don't need that many settings. If you go for an in-kernel driver, you may have to do some fishing for the right info. 

Wireless under Linux is delicate because of a lack of good first-hand info. Some wireless cards are well supported in-kernel. Others simply are not. This is because, like it or not, Windoze rules the world. As long as stuff works with Windoze, 95% of people are happy.  For instance, my particular wireless adapter works much better with ndiswrapper and the Windoze driver than with the in-kernel driver. Other wireless drivers will not work at all with ndiswrapper, no matter the kernel version.

Linux has come a long way since I first used it. All things considered, it's come a long way...from an experiment with the 386 chip to a fully featured and fairly functional operating system; nearly the only one I use anymore.

Blessed be!

Pappy

----------

## vpoinot

As a follow-up, I did install kernel 2.6.25, and if I want to be optimistic, I could say the situation improved: the results of my experiments are now systematic:

- when I boot, I never have a wireless connection: /etc/init.d/net.eth1 status always returns "inactive",

- now, my network is always disabled (as seen in wpa_cli),

- the only way to have it up is to rmmod ipw2200, modprobe it again, go to wpa_cli and enable my network: then the next second, the network is up and runnning.

There is no irony in my post: I do consider this determinism an improvement, although it is obviously still not satisfying...

Anybody whith an  Intel PRO/Wireless 2915ABG card out there? How did you get it working smoothly? I'd really appreciate any advice...

----------

