# WEP and wpa_supplicant

## mattjgalloway

Hey all,

I can get WEP working fine if i do:

iwconfig wlan0 key [my_128bit_key]

But when I try to use wpa_supplicant it seems to connect fine but then will hang on DHCP. And then I find out it isn't connected at all.

I've tried 64-bit aswell but to no avail.

I'm going to try with no key to see if it's WEP or just my card - i'm using ndiswrapper. But does anyone have any ideas as to why it's not working?

----------

## djnauk

Have you looked at the kernel messages (dmesg) or the system logs. There may be an error there and wpa_supplicant has exited (and therefore you cannot connect with the router to get an IP). Also, how are you running wpa_supplicant and what drivers/settings do you have for the card?

----------

## mattjgalloway

Many thanks for the reply.

dmesg says nothing - i get a load of messages from ndiswrapper but as I say it works fine when i set it up manually using iwconfig wlan0 key ..., etc, etc. But obviously I want it to start at boot!

I'm running wpa_supplicant from /etc/conf.d/net with:

module('wpa_supplicant')

Drivers are ndiswrapper

Settings are:

iface_wlan0="dhcp"

dhcpcd_wlan0="-t 10"

the usual wpa_supplicant lines in conf.d/net

and then in /etc/wpa_supplicant.conf I have:

network={

     ssid="my_ssid"

     key_mgmt=NONE

     wep_key0=[mykey]

     wep_key1=[mykey]

     wep_key2=[mykey]

     wep_key3=[mykey]

}

It's annoying me now! Grrrr!

I've even tried to get it working by making my own init script to run the commands which I can type to get it up and running, but that just locks the system for some reason!!

----------

## Schwinni

I have exactly the same problem with wpa_supplicant and ipw2200.

It says it connects to the AP (with the right WEP key), but dhcpcd times out.

Using the normal system via /etc/conf.d/net and /etc/conf.d/wireless it works...

Greetz,

Schwinni

----------

## Leprechaun

I hate to post a "me too," but has enyone been able to find a solution to this problem? I'm also having problems with dhcpcd after connecting to the AP.

----------

## swimmer

Well - same story here ... it does not work with *all* of my 2.6.[12-13] kernels but it works without a problem with the 2.6.8 kernel ?!?! Have to look at home for more details ...

greetz

swimmer

----------

## sandcrawler

I haven't played with wpa supplicant yet but a friend of mine had trouble with wpa when he used special characters, specifically ! in the key.  After he used a key without ! in it everything started working.   He said it was actually giving an error though so I don't know if this is related or not...

----------

## swimmer

 *sandcrawler wrote:*   

> I haven't played with wpa supplicant yet but a friend of mine had trouble with wpa when he used special characters, specifically ! in the key.  After he used a key without ! in it everything started working.   He said it was actually giving an error though so I don't know if this is related or not...

 

Not for me at least - no special characters ...

Thanks anyway

swimmer

----------

## beatryder

It works for me without trouble.

make sure you set the proper driver in /etc/conf.d/net

```

modules_eth1=( "wpa_supplicant" )

wpa_supplicant_eth1="-Dipw"

```

and in /etc/wpa_supplicant.conf make sure that your wep key has no dashes in it.  iwconfig can handle it, but wpa_supplicant complains[/code]

----------

## Leprechaun

I have also gotten mine working. Apparently mine was having trouble because the ipw2200 module was using hardware cryptography.  *shrug*

Check out this page on the gentoo wiki if you're still having problems  :Smile: 

https://forums.gentoo.org/viewtopic.php?p=2715117#2715117

----------

## duraste

For me it works with ascii key, but not with a hex key

I'm using ipw2200

----------

