# wpa_supplicant troubles...

## lo-jay

my /etc/wpa_supplicant/wpa_supplicant.conf

 looks like this:

```
ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=0

network={

      ssid="xxx"

      proto=RSN

      key_mgmt=WPA-PSK

      pairwise=CCMP TKIP

      group=CCMP TKIP

      psk="yyy"

}

```

 *Quote:*   

> net-wireless/wpa_supplicant-1.0  USE="dbus qt4 readline ssl -debug -eap-sim -fasteap -gnutls -madwifi (-ps3) (-selinux) -wimax -wps" 

 

```

# wpa_supplicant -i wlan0 -D wext -c /etc/wpa_supplicant/wpa_supplicant.conf

wlan0: Trying to associate with 00:1d:7e:bc:e8:63 (SSID='xxx' freq=2447 MHz)

wlan0: Associated with 00:1d:7e:bc:e8:63

wlan0: CTRL-EVENT-DISCONNECTED bssid=00:1d:7e:bc:e8:63 reason=0

wlan0: Trying to associate with 00:1d:7e:bc:e8:63 (SSID='luoqi@snafu.de' freq=2447 MHz)

wlan0: Associated with 00:1d:7e:bc:e8:63

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

.

.

.

```

double-double checked the psswd. that's correct!

my router config looks like this

 *Quote:*   

> 
> 
> Wireless
> 
> MAC Address	00:1D:7E:BC:E8:63
> ...

 

where do i start?

cheers!

----------

## khayyam

lo-jay ...

If your psk is the maximum key length (63 chars) then you should remove the quotes on psk= ... wpa_supplicant will truncate the psk to that length and so the first quote included as part of the key. I'm somewhat guessing this is the issue, as the linksys/cisco is probably using WPS and provided a key of max length.

HTH & best ...

khay

----------

## lo-jay

khayyam,

did that, but same same:

```
wlan0: Trying to associate with 00:1d:7e:bc:e8:63 (SSID='xxx' freq=2447 MHz)

wlan0: Authentication with 00:1d:7e:bc:e8:63 timed out.

wlan0: Trying to associate with 00:1d:7e:bc:e8:63 (SSID='xxx' freq=2447 MHz)

wlan0: Associated with 00:00:00:00:00:00

wlan0: CTRL-EVENT-DISCONNECTED bssid=00:1d:7e:bc:e8:63 reason=0

wlan0: Trying to associate with 00:1d:7e:bc:e8:63 (SSID='xxx' freq=2447 MHz)

wlan0: Authentication with 00:1d:7e:bc:e8:63 timed out.

```

  :Confused: 

cheers!

----------

## khayyam

 *lo-jay wrote:*   

> did that, but same same:

 

lo-jay ... no not the same. The first is an ASSOC failure, the second a timeout. The former you might expect with an authentication error, the latter with signal level (or general radio interference). So, there is no obvious cause here, but an ASSOC failure can be caused by poor signal.

The obvious questions: can you authenticate with another AP? Or similarly with the AP, can you authenticate using another machine and/or OS? What kind of link quality/signal level do you have to the AP?

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

Have you checked the airspace to see what else is using the wireless frequency?

best ... khay

----------

## lo-jay

hi,

my linksys router running tomato is directly next to my laptop. and yes i can connect

without problems with my smartphone & nokia n810...

cheers again!

ps: wicd, as the wpa backend shows 94% signal strength

----------

## lo-jay

here we go:

```
awk '{RS="Cell"}/xxx/' <(iwlist wlan0 scan)

 02 - Address: 00:1D:7E:BC:E8:63

                    Channel:8

                    Frequency:2.447 GHz (Channel 8)

                    Quality=42/70  Signal level=-68 dBm  

                    Encryption key:on

                    ESSID:"xxx"

                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s

                              24 Mb/s; 36 Mb/s; 54 Mb/s

                    Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 48 Mb/s

                    Mode:Master

                    Extra:tsf=000000082f74f599

                    Extra: Last beacon: 280ms ago

                    IE: Unknown: 000E6C756F716940736E6166752E6465

                    IE: Unknown: 010882848B962430486C

                    IE: Unknown: 030108

                    IE: Unknown: 2A0100

                    IE: Unknown: 2F0100

                    IE: IEEE 802.11i/WPA2 Version 1

                        Group Cipher : TKIP

                        Pairwise Ciphers (1) : TKIP

                        Authentication Suites (1) : PSK

                    IE: Unknown: 32040C121860

                    IE: Unknown: DD06001018020000

          

```

----------

## khayyam

 *lo-jay wrote:*   

> ps: wicd, as the wpa backend shows 94% signal strength

 

lo-jay ... if you have wicd running how are you to know that wpa_supplicant is doing its job? This is probably a classic NetworkManager/wicd autofail. So, disable wicd, otherwise trying to debug this is impossible.

Also, being right next to the AP is no guarentee of signal quality ... just like any radio signal being too close to the transmitter can cause the reciever to be over powered, some distance is generally recommended.

best ... khayLast edited by khayyam on Mon Jul 23, 2012 8:48 pm; edited 1 time in total

----------

## lo-jay

no,

wcid is not running - just used it to check the signal strength.

and is wcid not just a backend - will say based on wpa?

cheers again!

----------

## khayyam

 *lo-jay wrote:*   

> 
> 
> ```
> awk '{RS="Cell"}/xxx/' <(iwlist wlan0 scan)
> 
> ...

 

lo-jay ... this already tells me there is another AP in the vacinity with a higher signal level. If this AP is also using 2447mhz (channel 8) then this will be enough to cause signal degredation and bleed-over.

best ... khay

----------

## lo-jay

wow!

i see - could i try changing to another channel/frequency on my router -

which one???

cheers  :Cool: 

----------

## khayyam

 *lo-jay wrote:*   

> i see - could i try changing to another channel/frequency on my router - which one?

 

lo-jay ... that entirely depends on what channels are currently in use, and the strength of the signal. So, if you happen to be in the vacinity of an AP which is boosting its signal with an antenna then you want to set your channel to be as far away from that channel as possible, its just like any other radio signal.

The best way to discover what your airspace looks like is to install a scanner like net-wireless/aircrack-ng ...

best ... khay

----------

## lo-jay

hmm,

now it gets confusing: changed from channnel 8 to 14 / 2.484 mhz on my router

& now i can't see any wifi anymore with any device  :Embarassed: 

cheers again!

----------

## lo-jay

now on channel 3 - 14 did not work for some reason:

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

 13 - Address: 00:1D:7E:BC:E8:63

                    Channel:3

                    Frequency:2.422 GHz (Channel 3)

                    Quality=70/70  Signal level=-31 dBm  

                    Encryption key:on

                    ESSID:"xxx"

                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s

                              24 Mb/s; 36 Mb/s; 54 Mb/s

                    Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 48 Mb/s

                    Mode:Master

                    Extra:tsf=000000000316a186

                    Extra: Last beacon: 704ms ago

                    IE: Unknown: 000E6C756F716940736E6166752E6465

                    IE: Unknown: 010882848B962430486C

                    IE: Unknown: 030103

                    IE: Unknown: 2A0100

                    IE: Unknown: 2F0100

                    IE: IEEE 802.11i/WPA2 Version 1

                        Group Cipher : TKIP

                        Pairwise Ciphers (1) : TKIP

                        Authentication Suites (1) : PSK

                    IE: Unknown: 32040C121860

                    IE: Unknown: DD06001018020000

          

tux5 jan # wpa_supplicant -i wlan0 -D wext -c /etc/wpa_supplicant/wpa_supplicant.conf

wlan0: Trying to associate with 00:1d:7e:bc:e8:63 (SSID='xxx' freq=2422 MHz)

wlan0: Associated with 00:00:00:00:00:00

wlan0: CTRL-EVENT-DISCONNECTED bssid=00:1d:7e:bc:e8:63 reason=0

wlan0: Trying to associate with 00:1d:7e:bc:e8:63 (SSID='xxx' freq=2422 MHz)

wlan0: Associated with 00:1d:7e:bc:e8:63

wlan0: CTRL-EVENT-DISCONNECTED bssid=00:1d:7e:bc:e8:63 reason=0

wlan0: Trying to associate with 00:1d:7e:bc:e8:63 (SSID='xxx' freq=2422 MHz)

wlan0: Authentication with 00:1d:7e:bc:e8:63 timed out.

```

which value tells me about the bleeding?

cheers!

----------

## khayyam

 *lo-jay wrote:*   

> now on channel 3 - 14 did not work for some reason

 

lo-jay ... the spectrum of 2.4000/2.4835ghz is divided into 13 channels.

```
Quality=70/70  Signal level=-31 dBm
```

Although these values are not truely reflective of actual signal quality, the above is what you'd expect of a good connection, and better than the previous channel. 

 *lo-jay wrote:*   

> which value tells me about the bleeding?

 

Its radio ... there is no way to measure such things.

As for the connection ... there is no way to tell why its failing without more verbose output from wpa_supplicant, enable the 'debug' use, re-emerge and add a log file and debug level to wpa_supplicants options ...

```
wpa_supplicant_wlan0="-Dwext -d -f /var/log/wpa_supplicant.log"
```

Then pastebin the logfile.

best ... khay

----------

