# wpa_supplicant often fails to connect

## Gh0str1d3r

Hi,

I am using wpa_supplicant on an Intel Corporation PRO/Wireless 2200BG network controller. It works in principle, but often it goes to an endless loop of "connecting - associating - 4way handshake - disconnecting". After restarting the router several times, it succeeds to connect and works stable.

I have also tested it with an AVM FritzBox usb stick and another router. Same problem here, with the only difference that the connected state is not stable. Here I think the ndiswrapper / windows driver is to be blamed. But the intel chip really should work. So does anyone have any ideas what may be wrong?

Remark: Signal quality is excellent, the router is directly next to the laptop.

----------

## d2_racing

Hi, what kernel are you using and are you using the driver inside the kernel for your wifi card ?

----------

## Gh0str1d3r

I have experienced that problem with 2.6.29 and 2.6.31, and yes, I am using the in-kernel driver.

----------

## gerdesj

 *Gh0str1d3r wrote:*   

> I have experienced that problem with 2.6.29 and 2.6.31, and yes, I am using the in-kernel driver.

 

What sort of router?

What sort of authentication - none, WPA, WEP, other?

If you are using auth, could you disable it briefly and try it without to see if that is the problem.

Cheers

Jon

----------

## d2_racing

Did you unplug your router for 30 secs, so that it can restart properly.

I have that kind of problem once in a while with my linksys wrt54g.

----------

## Gh0str1d3r

Thank you for your replies.

I am using a D-LINK DIR-615 router with WPA2 authentication. I will test it without auth but it will take some time to get a reasonable statistic.

For restarting, I just powered the router off and on immediately. I will try the 30 sec trick. Good to hear that others experience the same problem.

----------

## d2_racing

Give us some feedback  :Razz: 

----------

## kimmie

I have a 2200BG in my laptop using wpa-supplicant and in-kernel driver, gentoo-2.6.30-r8 kernel. It worked perfectly for quite a while with my Billion 7500G AP... until the people started getting iPhones. As soon as a couiple of iPhones walked in the door, my laptop would start associating/disassociating. Aaaargh. Seeing the AP was old anyway, I replaced it with an Edimax wireless-N. No probs since.

Sorry. I know that doesn't really help you. Have you tried using WPA instead of WPA2?

----------

## micmac

Hi all,

I had a similar issue using a different hardware/driver. There were really two causes:

1. power management of the card was enabled ('iwconfig wlan0 power off' helps)

2. the AP was set to automatic channel selection (setting it to a specific channel, e.g. 3, works)

----------

## Gh0str1d3r

 *micmac wrote:*   

> 
> 
> I had a similar issue using a different hardware/driver. There were really two causes:
> 
> 1. power management of the card was enabled ('iwconfig wlan0 power off' helps)
> ...

 

Power management is off and I am selecting a specific channel using wpa_gui. So I guess there must be some other reason. But thanks for the tip.

----------

## micmac

Hi,

I meant that in the Access Point configuration the channel shouldn't be set to auto.

Anyway, another idea. Maybe try another way to setup the connection. E.g. try with wicd. Check its settings tab and install all the possible software (dhcp and route related) so it can choose whatever it considers best. It's worth a shot. If it works well you could also copy it's wpa_supplicant config to /etc/wpa_supplicant/wpa_supplicant.conf and set the whole thing up manually.

Another thing: Try using a static IP instead of DHCP. Sometimes it turns out to be a good thing. E.g. use a LAN address that you AP's DHCP server doesn't offer (check the address range in the AP's config dialog).

----------

