# Wpa_supplicant drops wireless

## Quicken2k

Hello,

I'm new to Gentoo. I have it setup and working (for the most part). However I can't seem to stay connected to my wireless access point. I am using Genkernel, I have a wireless card by Ra Link with the rt2800pci module loaded into the kernel  

Router settings:

WPA2/WPA Mixed mode 

Config Files:

# WPA_SUPPLICANT.CONF

Network={

        ssid="edited"

        proto=RSN

        #psk="edited"

        psk=edited

NOTE: siid name and key were removed. Passkey was inserted with wpapassphrase command

LOG OUTPUT:

OUTPUT:

Association request to the driver failed

CTRL-EVENT-DISCONNECTED bssid=20:aa:4b:ff:6f:a7 reason=0

CTRL-EVENT-DISCONNECTED bssid=00:00:00:00:00:00 reason=0

CTRL-EVENT-DISCONNECTED bssid=00:00:00:00:00:00 reason=0

Trying to associate with 20:aa:4b:ff:6f:a7 (SSID='dasilvam' freq=2462 MHz)

ioctl[SIOCSIWFREQ]: Device or resource busy

Association request to the driver failed

CTRL-EVENT-DISCONNECTED bssid=20:aa:4b:ff:6f:a7 reason=0

CTRL-EVENT-DISCONNECTED bssid=00:00:00:00:00:00 reason=0

Associated with 20:aa:4b:ff:6f:a7

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

WPA: Could not verify EAPOL-Key MIC - dropping packet

Authentication with 20:aa:4b:ff:6f:a7 timed out.

ioctl[SIOCSIWMLME]: Invalid argument

ioctl[SIOCSIWSCAN]: Device or resource busy

Failed to initiate AP scan.

CTRL-EVENT-DISCONNECTED bssid=00:00:00:00:00:00 reason=0

ioctl[SIOCSIWSCAN]: Device or resource busy

Failed to initiate AP scan.

Trying to associate with 20:aa:4b:ff:6f:a7 (SSID='dasilvam' freq=2462 MHz)

ioctl[SIOCSIWFREQ]: Device or resource busy

Association request to the driver failed

CTRL-EVENT-DISCONNECTED bssid=20:aa:4b:ff:6f:a7 reason=0

CTRL-EVENT-DISCONNECTED bssid=00:00:00:00:00:00 reason=0

CTRL-EVENT-DISCONNECTED bssid=00:00:00:00:00:00 reason=0

Associated with 20:aa:4b:ff:6f:a7

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

WPA: Could not verify EAPOL-Key MIC - dropping packet

Authentication with 20:aa:4b:ff:6f:a7 timed out.

ioctl[SIOCSIWMLME]: Invalid argument

ioctl[SIOCSIWSCAN]: Device or resource busy

Failed to initiate AP scan.

CTRL-EVENT-DISCONNECTED bssid=00:00:00:00:00:00 reason=0

ioctl[SIOCSIWSCAN]: Device or resource busy

Failed to initiate AP scan.

Trying to associate with 20:aa:4b:ff:6f:a7 (SSID='dasilvam' freq=2462 MHz)

ioctl[SIOCSIWFREQ]: Device or resource busy

Association request to the driver failed

CTRL-EVENT-DISCONNECTED bssid=20:aa:4b:ff:6f:a7 reason=0

CTRL-EVENT-DISCONNECTED bssid=00:00:00:00:00:00 reason=0

CTRL-EVENT-DISCONNECTED bssid=00:00:00:00:00:00 reason=0

ioctl[SIOCGIWSCAN]: Resource temporarily unavailable

Trying to associate with 20:aa:4b:ff:6f:a7 (SSID='dasilvam' freq=2462 MHz)

ioctl[SIOCSIWFREQ]: Device or resource busy

Association request to the driver failed

CTRL-EVENT-DISCONNECTED bssid=20:aa:4b:ff:6f:a7 reason=0

CTRL-EVENT-DISCONNECTED bssid=00:00:00:00:00:00 reason=0

Associated with 20:aa:4b:ff:6f:a7

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

WPA: Could not verify EAPOL-Key MIC - dropping packet

Authentication with 20:aa:4b:ff:6f:a7 timed out.

ioctl[SIOCSIWMLME]: Invalid argument

CTRL-EVENT-DISCONNECTED bssid=00:00:00:00:00:00 reason=0

Trying to associate with 20:aa:4b:ff:6f:a7 (SSID='dasilvam' freq=2462 MHz)

CTRL-EVENT-DISCONNECTED bssid=20:aa:4b:ff:6f:a7 reason=0

CTRL-EVENT-DISCONNECTED bssid=00:00:00:00:00:00 reason=0

Associated with 20:aa:4b:ff:6f:a7

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

WPA: Could not verify EAPOL-Key MIC - dropping packet

Any help would be great. Thanks 

Mark Da Silva

----------

## khayyam

Quicken2k ...

Looks to me as though the driver doesn't get as far as scanning for the AP, which leads me to think that your not supplying a driver to wpa_supplicant, and/or WEXT/NL80211 isn't enabled in the kernel.

/etc/conf.d/net

```
modules_wlan0="!plug !iwconfig  wpa_supplicant"

wpa_supplicant_wlan0="-Dnl80211" # or '-Dwext'
```

As for WEXT, and NL80211, check the relevent options:

```
# awk '/(WEXT|(MAC|CFG)80211)/' /usr/src/linux/.config
```

In terms of the wpa_supplicant.conf its missing some sections (ie, 'ctrl_interface')

/etc/wpa_supplicant/wpa_supplicant.conf

```
# wpa_supplicant.conf

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

network={

    ssid="dasilvam"

    # bssid=20:AA:4B:FF:6F:A7

    # scan_freq=2462

    proto=RSN

    auth_alg=OPEN

    key_mgmt=WPA-PSK

    group=TKIP # or 'CCMP', or 'TKIP CCMP' to allow both

    pairwise=CCMP # or 'TKIP CCMP' to also allow both 

    psk=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

}
```

The 'bssid', and 'scan_freq' are not necessary (commented) as wpa_supplicant will get such information when scanning, however if you are requesting RSN (WPA2) then you should provide 'key_mgmt' ... and 'group', 'pairwise' (though the latter two will be quieried/negocitated).

You can find out what your AP supports (ie, 'group', etc) with the following:

```
# awk '{RS="Cell"}/dasilvam/' <(iwlist wlan0 scan) | less
```

Note that if your using the maximum length psk (63 chars) don't quote the string.

Other possible issues include missing firmware (you didn't mention if net-wireless/rt2860-firmware was installed or not, and which version), whether the modules loads without error, if the card works othewise (ie, with 'iwlist scan'). It might help if you pastebin'd the output of 'dmesg', the kernel .config, and any other relevent info.

Also, see this bug which suggests WPA2-AES for the use with rt2800pci, and a possible issue as your AP is configured with a mixed WPA/WPA2.

best ... khay

----------

## pd1986

 *khayyam wrote:*   

> Quicken2k ...
> 
> Looks to me as though the driver doesn't get as far as scanning for the AP, which leads me to think that your not supplying a driver to wpa_supplicant, and/or WEXT/NL80211 isn't enabled in the kernel.
> 
> 

 

I have the same problem. However, the situation is different. I share the internet with my neighbor where the box is (a little far). I could use the internet generally, but sometimes it can't connect the box with the same indication "Association request to the driver failed". I did nothing. Do you mean that is due to the distance? it's too far?

----------

## khayyam

 *pd1986 wrote:*   

> I have the same problem. However, the situation is different. I share the internet with my neighbor where the box is (a little far). I could use the internet generally, but sometimes it can't connect the box with the same indication "Association request to the driver failed". I did nothing. Do you mean that is due to the distance? it's too far?

 

pd1986 ... the signal quality will vary due to environmental factors, the weather, radioactivity, etc, the less possible interference the better the signal, and so the less likelihood that association requests will fail. How far is too far, thats hard to say, there are just too many factors, I have personally set up a point to point wireless connection where the nodes were seperated by a disance of a little under a kilometer, but there was perfect line of sight, and the antennas used were high quality, and uni-directional.

best ... khay

----------

## ulenrich

Is this both true:

a) Higher channels have higher throughput but less distance availability

b) Having many wifi access points in the area, 

e.g. 12 the following is less efficient:

channel1 - ap1

channel2 - ap2

channel3 - ap3

... etc, than

channel1  ap1 - ap4

channel6  ap5 - ap8

channel12 ap9 - ap12

???

----------

## khayyam

 *ulenrich wrote:*   

> a) Higher channels have higher throughput but less distance availability

 

ulenrich ... no, that's not the case, 802.11g has a maximum data rate of 54Mbit/s with a range of approximately 35-40 meters (with some obstruction, ie no line of sight), 802.11n has a maximum data throughput of 70Mbit/s - 150Mbit/s for 2.4Ghz and 5Ghz respectively and a range of approximately 70 meters (again, no line of sight). This is, however, all theoretical, these are values that are probably not achievable in the real world given the nature of radio, and it doesn't help that vendors are presenting these as real, rather than theoretical, values. A pure 5Ghz network (using good quality HW) is probably going to achieve higher throughput, but that's mostly because little is using 5Ghz currently, 2.4Ghz is baring most of burden, this situation would change as more traffic moved to the 5Ghz band ... because its radio, and radio is prone to interference. I would seriously doubt that an iPhone or Android handset would achieve anything over 30Mbit/s.

Also, at higher birates frames are more tightly packed, and so more prone to error, this is why with 802.11n there is such fluctuation of bitrate, at least more so than 802.11g.

 *ulenrich wrote:*   

> b) Having many wifi access points in the area, 
> 
> e.g. 12 the following is less efficient:
> 
> channel1 - ap1
> ...

 

You haven't stated where these AP's are located in relation to each other. In the second list ap1 and ap4 are on the same channel and so would, dependent on location, be more likely to interfere. In the first list there would be bleed over, but less so than the second list as they are at least on separate channels. So, ideally you want as wide a separation as possible, ap1 and ap4 (in the second list) could be on the same channel if they were spaced far enough apart, and ap1 and ap2 (from the first list) similarly. If your current airspace has AP's in close proximity on channel1 and channel12 ... then channel 6 would be the best choice for that particular location.

HTH & best ... khay

----------

## ulenrich

It is a skyscraper with lots of offices and living appartements. Some APs should reach different floors and have to overcome steel. In essence: All the same place and not controlable  :Sad: 

 *khayyam wrote:*   

>  *ulenrich wrote:*   a) Higher channels have higher throughput but less distance availability 
> 
> ulenrich ... no, that's not the case, 802.11g has a maximum data rate of 54Mbit/s with a range of approximately 35-40 meters (with some obstruction, ie no line of sight), 802.11n has a maximum data throughput of 70Mbit/s - 150Mbit/s for 2.4Ghz and 5Ghz respectively and a range of approximately 70 meters (again, no line of sight). This is, however, all theoretical, these are values that are probably not achievable in the real world given the nature of radio,
> 
> ...
> ...

 

These APs have mostly the same theoretical throughput, but I know there are different influences of different materials: 

Think of metal versus water (toilets), when using different channels. In your kitchen microwave bakery the water will catch  all of the energy but hopefully not the waves of the channel of your AP. But I am not an engineer.

 *Quote:*   

> ...
> 
> So, ideally you want as wide a separation as possible, ap1 and ap4 (in the second list) could be on the same channel if they were spaced far enough apart, and ap1 and ap2 (from the first list) similarly. If your current airspace has AP's in close proximity on channel1 and channel12 ... then channel 6 would be the best choice for that particular location.

 

The background info I have read about this some time ago was stating something like:

APs on the same channel will have a better error correction than some APs kept on channels neighbouring too closely. This is because the software recognizes interference of another AP better when constantly and "reliably". And yes, they spoke about best beeing five channels away.

But that what they spoke about may have been myth? Or the software at that time was less capable ....

----------

## khayyam

ulenrich ...

You should probably open a new thread as we're deep into hijacking this one ... mia culpa.

best ... khay

----------

