# wpa_supplicant doesn't connect (IPW2200, WPA-PSK) [SOLVED]

## mumcut

Hello...

I'm new in gentoo... I have a problem with my ipw2200 and wpa_supplicant...

I'm using wpa-psk with tkip encryption...

the problem is this:

```

# wpa_supplicant -Dwext -ieth1 -c/etc/wpa_supplicant.conf

Trying to associate with 00:c0:49:63:05:03 (SSID='mumcu' freq=0 MHz)

CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys

WPA: 4-Way Handshake failed - pre-shared key may be incorrect

CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys

Trying to associate with 00:c0:49:63:05:03 (SSID='blabla' freq=0 MHz)

Trying to associate with 00:c0:49:63:05:03 (SSID='blabla' freq=0 MHz)

Trying to associate with 00:c0:49:63:05:03 (SSID='blabla' freq=0 MHz)

Trying to associate with 00:c0:49:63:05:03 (SSID='blabla' freq=0 MHz)

Trying to associate with 00:c0:49:63:05:03 (SSID='blabla' freq=0 MHz)

Trying to associate with 00:c0:49:63:05:03 (SSID='blabla' freq=0 MHz)

CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys

WPA: 4-Way Handshake failed - pre-shared key may be incorrect

CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys

Trying to associate with 00:c0:49:63:05:03 (SSID='blabla' freq=0 MHz)

Trying to associate with 00:c0:49:63:05:03 (SSID='blabla' freq=0 MHz)

Trying to associate with 00:c0:49:63:05:03 (SSID='blabla' freq=0 MHz)

```

I'm asking myself, why wpa_supplicant finds the mac address, but it says the frequence is 0 MHz...

By the way:

```

WPA: 4-Way Handshake failed - pre-shared key may be incorrect

```

My key is correct...

So... now some configuration files:

# vim /etc/conf.d/net

```

modules=( "wpa_supplicant" )

config_eth0=( "dhcp" )

#dhcp_eth0=( "nodns nontp nonis" )

dhcpcd_eth0="-t 5"

# config_eth1=( "dhcp" )

# dhcp_eth1=( "nodns nontp nonis" )

wpa_supplicant_eth1="-Dwext"

wpa_timeout_eth1=60

```

# vim /etc/wpa_supplicant.conf

```

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=0

ap_scan=1

# fast_reauth=1

network={

  ssid="blabla"

#  scan_ssid=1

  priority=5

  proto=WPA

  key_mgmt=WPA-PSK

  pairwise=TKIP

  group=TKIP

#  psk=39310dd6669deeasidhjaksjdaksjhdjkashd

  psk="mykey"

}

```

So... Now it depends on you  :Razz: 

Please help me...

Thanks...

----------

## mumcut

I've not compiled ipw2200 in to the kernel... I've emerged it... modprobe is working fine... also with ieee80211_crypt, *_tkip

6 months or 1 year ago, I used the 2.6.9 kernel... same devices (ipw2200, same ap, same ap config).... it worked very well, so the problem isn't the ap...

Does anybody have an idea ?

Thanks....

----------

## mumcut

Today, I've received another message from wpa_supplicant:

```

# wpa_supplicant -Dwext -ieth1 -c/etc/wpa_supplicant.conf 

Trying to associate with 00:c0:49:63:05:03 (SSID='blabla' freq=0 MHz)

Associated with 00:c0:49:63:05:03

ioctl[SIOCSIWENCODEEXT]: Invalid argument

WPA: Failed to set PTK to the driver.

CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys

CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys

Trying to associate with 00:c0:49:63:05:03 (SSID='blabla' freq=0 MHz)

Associated with 00:c0:49:63:05:03

ioctl[SIOCSIWENCODEEXT]: Invalid argument

WPA: Failed to set PTK to the driver.

CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys

CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys

Trying to associate with 00:c0:49:63:05:03 (SSID='blabla' freq=0 MHz)

WPA: EAPOL-Key Replay Counter did not increase - dropping packet

Associated with 00:c0:49:63:05:03

ioctl[SIOCSIWENCODEEXT]: Invalid argument

WPA: Failed to set PTK to the driver.

```

I don't know what the problem is.... It is a very stupid situation for me...

----------

## UberLord

Try the in-kernel driver and not the ebuild

----------

## mumcut

Hello...

Yesterday, a friend did help me...

The problem were the Kernel settings and the cryption modules...

If you have WPA_SUPPLICANT (my version is 0.4.9 or something), IPW2200, an AP with WPA-PSK (U.S. Robotics with TKIP encryption), a 2.6 Kernel (.17-r4), then do this:

At first, we need a eth1 device for your ipw2200 driver:

```

ln -s /etc/net.lo /etc/net.eth1

```

After this, we have to set the importantest setting. The kernel setting:

Some important points:

-> Select no modules, which are named like "ieee80211"

-> Select no "crypt" in the menu "Networking" modules (no WEP, no TKIP etc.)

-> Don't select the "Intel Pro Wireless 2200BG" driver in the kernel

-> Select these things only:

```

     ---> Device Drivers

        ---> Network Device Support

            ---> Wireless LAN (non-hamradio)

            

            [*] Wireless LAN drivers (non-hamradio) & Wireless Extensions

            [*]      Wireless Extension API over RtNetlink

     ---> Cryptographic options

             

         [*] Cryptographic API

            <M>   MD4 digest algorithm

            <M>   MD5 digest algorithm

             <*>    AES cipher algorithms

             <*>    ARC4 cipher algorithm

             <*>    Michael MIC keyed digest algorithm

            <M>   CRC32c CRC algorithm

```

I have these modules also compiled, I don't know, whether they are important...

```

      ---> Networking

         ---> Networking options

             

             <*> Packet socket

              [*] Packet socket: mmapped io

             <*> Unix domain socket

             <*> PF_KEY sockets

              [*] TCP/IP networking

              [*]     TCP: advanced congestion control

              [*] Network packet filtering (replaces ipchains)

```

Merge these packages / ebuilds:

- wpa_supplicant

- ipw2200

- ipw2200-firmware

- ieee80211

My /etc/conf.d/net File (We've selected eth1 as wireless device):

```

config_eth1=( "dhcp" )

dhcp_eth1=( "nodns nontp nonis" )

modules=( "wpa_supplicant" )

wpa_supplicant_eth1="-Dwext"

wpa_timeout_eth1=10

```

If you have dns, ntp or nis servers, then you can modify your dhcp_eth1 attribute, or you can remove it at all.

My /etc/wpa_supplicant.conf File:

```

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=0

eapol_version=1

ap_scan=2

fast_reauth=1

network={

ssid="blabla" # Your SSID (don't forget to put this into a string "")

priority=5

#  scan_ssid=1 #Select this if you don't broadcast your SSID...

proto=WPA

key_mgmt=WPA-PSK

pairwise=TKIP

group=TKIP

psk="YourKeyHere" # Your WPA-PSK Key... (put this also into a string "")

}

```

We must autoload the modules for the wpa-connection (/etc/modules.autoload.d/kernel-2.6)

```

# /etc/modules.autoload.d/kernel-2.6:  kernel modules to load when system boots.

#

# Note that this file is for 2.6 kernels.

#

# Add the names of modules that you'd like to load when the system

# starts into this file, one per line.  Comments begin with # and

# are ignored.  Read man modules.autoload for additional details.

# ... your list before

ipw2200

ieee80211_crypt

ieee80211_crypt_tkip

```

After this... you can put your eth1 connection into the runlevel

```

rc-update -a net.eth1 default

```

I hope, after these setting would your wpa_supplicant work...

Thank you...

----------

## dschein

Wow.  I really dont consider myself a gentoo noob...but I was having a helluva time getting WPA figured out on my machine until I read this.  THANK YOU SO MUCH.

----------

## gerard27

Same here!

Wpa_supplicant info is zilch.

----------

