# Damn wpa_supplicant

## Caspian3011

Ok guys here's the thing; i've been trying to setup my homw wireless connection for two days now without success. I have D-link dwl-g650 pcmcia wireless card (atheros chipset so i use madwifi ofcourse) and Thomson SpeedTouch ST780 router. I've compiled ieee802.11 support in kernel (even it's not necessary as far as i know because i'm using madwifi). I'm trying to cennect to router using wpa-psk, but no luck. I'll give you all necessary config files and wpa_output, so PLEASE HELP ME BECAUSE I'M GOING MAD  :Wink: . Somethimes the router even asignes me ip address but i have no access to internet and both Act and Link lights blink on my card, so something went wrong....

/etc/conf.d/net:

iwconfig_ath0="mode managed"

modules=("wpa_supplicant")

wpa_supplicant_ath0="-Dwext -c/etc/wpa_supplicant/wpa_supplicant.conf"

wpa_timeout_ath0=60

config_ath0=("dhcp")

/etc/wpa_supplicant/wpa_supplicant.conf:

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=users

update_config=1

network={

       ssid="SpeedTouch"

       psk="D80163965E"

       proto=WPA

       key_mgmt=WPA-PSK

       pairwise=TKIP

}

And yes all the psk and ssid values are correct  :Smile: 

Here's the wpa_supplicant -Dwext -iath0 -c/etc/wpa_supplicant/wpa_supplicant.conf output:

Trying to associate with 00:90:d0:ea:06:c9 (SSID='SpeedTouch' freq=2412 MHz)

Associated with 00:90:d0:ea:06:c9

WPA: Key negotiation completed with 00:90:d0:ea:06:c9 [PTK=TKIP GTK=TKIP]

CTRL-EVENT-CONNECTED - Connection to 00:90:d0:ea:06:c9 completed (auth) [id=0 id_str=]

CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys

Trying to associate with 00:90:d0:ea:06:c9 (SSID='SpeedTouch' freq=2412 MHz)

Associated with 00:90:d0:ea:06:c9

WPA: Key negotiation completed with 00:90:d0:ea:06:c9 [PTK=TKIP GTK=TKIP]

CTRL-EVENT-CONNECTED - Connection to 00:90:d0:ea:06:c9 completed (reauth) [id=0 id_str=]

CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys

Trying to associate with 00:90:d0:ea:06:c9 (SSID='SpeedTouch' freq=2412 MHz)

Associated with 00:90:d0:ea:06:c9

WPA: Invalid EAPOL-Key MIC when using TPTK - ignoring TPTK

WPA: Invalid EAPOL-Key MIC - dropping packet

WPA: Invalid EAPOL-Key MIC when using TPTK - ignoring TPTK

WPA: Invalid EAPOL-Key MIC - dropping packet

ioctl[SIOCGIFADDR]: Cannot assign requested address

ioctl[SIOCGIFADDR]: Cannot assign requested address

ioctl[SIOCGIFADDR]: Cannot assign requested address

CTRL-EVENT-TERMINATING - signal 2 received --> this is work of my hands (Ctrl-c)

...........

And so on i think you get the point.

Once again i'm begging you to help me, i'm truly desperate  :Wink: 

----------

## mjf55

Ok.  Don't be mad.  you are NOT loading the madwifi dirver. 

```
wpa_supplicant_ath0="-Dwext -c/etc/wpa_supplicant/wpa_supplicant.conf" 
```

 should be

```
wpa_supplicant_ath0="-Dmadwifi -c/etc/wpa_supplicant/wpa_supplicant.conf" 
```

  Change in and lets see what happens.

Also, add ap_scan=1 to wpa_supplicant.conf

----------

## Caspian3011

I was loading wext driver on purpose, because i've read somewhere that i should load it even if i'm using madwifi driver which was strange but....Anyways the things are now even worse because the driver can't be associated. Here's the output from command line:

# wpa_supplicant -Dmadwifi -iath0 -c/etc/wpa_supplicant/wpa_supplicant.conf

Trying to associate with 00:90:d0:ea:06:c9 (SSID='SpeedTouch' freq=2412 MHz)

ioctl[IEEE80211_IOCTL_SETMLME]: Invalid argument

Association request to the driver failed

CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys

Trying to associate with 00:90:d0:ea:06:c9 (SSID='SpeedTouch' freq=2412 MHz)

ioctl[IEEE80211_IOCTL_SETMLME]: Invalid argument

Association request to the driver failed

Associated with 00:90:d0:ea:06:c9

WPA: Key negotiation completed with 00:90:d0:ea:06:c9 [PTK=TKIP GTK=TKIP]

CTRL-EVENT-CONNECTED - Connection to 00:90:d0:ea:06:c9 completed (auth) [id=0 id_str=]

CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys

Trying to associate with 00:90:d0:ea:06:c9 (SSID='SpeedTouch' freq=2412 MHz)

ioctl[IEEE80211_IOCTL_SETMLME]: Invalid argument

Association request to the driver failed

Associated with 00:90:d0:ea:06:c9

WPA: Invalid EAPOL-Key MIC when using TPTK - ignoring TPTK

WPA: Invalid EAPOL-Key MIC - dropping packet

WPA: Invalid EAPOL-Key MIC when using TPTK - ignoring TPTK

WPA: Invalid EAPOL-Key MIC - dropping packet

ioctl[SIOCGIFADDR]: Cannot assign requested address

ioctl[SIOCGIFADDR]: Cannot assign requested address

ioctl[SIOCGIFADDR]: Cannot assign requested address

CTRL-EVENT-TERMINATING - signal 2 received

----------

## mjf55

Ok, Try my configuration.  not much is different, but who knows.  My /etc/conf.d/net file:

```
modules=( "ifconfig" "wpa_supplicant" )

wpa_supplicant_ath0="-Dmadwifi"

wpa_timeout_ath0=60

config_ath0=( "dhcp")
```

My /etc/wpa_supplicant/wpa_supplicant.conf file:

```
ctrl_interface=/var/run/wpa_supplicant

# Ensure that only root can read the WPA configuration

ctrl_interface_group=0

# Let wpa_supplicant take care of scanning and AP selection

ap_scan=1

## Shared WEP key connection (no WPA, no IEEE 802.1X)

network={

  ssid="yourssid"

  scan_ssid=1

  key_mgmt=NONE

  wep_key0="1234567890123"

  wep_key1="1234567890123"

  wep_key2="1234567890123"

  wep_tx_keyidx=0

  priority=5

}
```

I use WEP at home, WPA-EAP w/ LEAP at work (not shown).  There is not much difference between your and mine.

Do you have a custom kernel or the Genkernel.?  What version?  We may need to go that route if you are still failing.  What madwifi dirvers are installed?

----------

## Caspian3011

Still nothing. Now it just says: -Dmadwifi command not found because in /etc/conf.d/net is wpa_supplicant_ath0="-Dmadwifi". I'm using custom kernel 2.6.23-gentoo-r3-smp. Madwifi driver version is 0.9.3.3. And i'm loading these modules on boot ath_pci, wlan_xauth and wlan_tkip, maybe i missed some module. I really don't know. Than you for your efforts mjf55.

----------

## swimmer

Do you use a fixed channel on your router or let you choose it automatically? Do you use WPA2 or WPA? 

Greetz

swimmer

----------

## danomac

I had that exact same card and was having a hell of a time getting it to work... and then I noticed there was a 'madwifi' USE flag for wpa_supplicant. Did you remember to set that USE flag?

----------

## Caspian3011

Router uses automatic channel selection and i have compiled wpa_supplicant with madfifi driver but when i try to run wpa_supplicant with that driver it can't assign it.... I use wpa-psk not wpa2-psk.

----------

## swimmer

So try the router with a defined channel and see whether it makes any difference ...

----------

## VPN-User

I also really think your PSK is NOT correct.

Did you really do "wpa_passphrase yourssid yourkey" to get that value? Because I always get a 64 char string when doing that.

----------

