# WPA-PSK and AES - how?

## dr.d3m0n

Hello @ all.

I have a trouble.

that is log after start wpa_supplicant

```

1160054596.076802: Starting AP scan (broadcast SSID)

1160054599.076987: Scan timeout - try to get results

1160054599.077094: Received 1222 bytes of scan results (4 BSSes)

1160054599.077103: Scan results: 4

1160054599.077113: Selecting BSS from priority group 2

1160054599.077121: 0: 00:15:0c:7c:c5:61 ssid='WG' wpa_ie_len=0 rsn_ie_len=22 caps=0x11

1160054599.077134: skip - no WPA/RSN proto match

1160054599.077141: 1: 00:15:0c:91:7c:21 ssid='FRITZ!Box Fon WLAN 7170' wpa_ie_len=24 rsn_ie_len=0 caps=0x11

1160054599.077152: skip - SSID mismatch

1160054599.077158: 2: 00:0f:b5:d8:3d:20 ssid='NETGEAR' wpa_ie_len=0 rsn_ie_len=0caps=0x11

1160054599.077169: skip - no WPA/RSN IE

1160054599.077175: 3: 00:03:c9:7a:23:e6 ssid='WLAN' wpa_ie_len=0 rsn_ie_len=0 caps=0x1

1160054599.077184: skip - no WPA/RSN IE

1160054599.077191: No suitable AP found.

1160054599.077202: Setting scan request: 5 sec 0 usec

```

my wpa_supplicant.conf

```

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=0

eapol_version=1

ap_scan=1

fast_reauth=1

# Example blocks:

# WPA-PSK

network={

scan_ssid=0

proto=WPA

key_mgmt=WPA-PSK

pairwise=CCMP TKIP

group=CCMP TKIP WEP104 WEP40

ssid="WG"

psk=password

priority=2

}

```

the AP (accespoint) is with WPA-PSK with AES, it works in windows but in gentoo .......

help me please.

----------

## Princess Nell

Two issues:

- if your AP has SSID broadcast disabled, you'll have to set scan_ssid=1

- you want to set proto=RSN

The rest of the config looks ok to me, pretty much like my own, which works in Gentoo and FreeBSD.

----------

## dr.d3m0n

i doesnt help me, everbody some ideas?

my wpa_supplicant.conf

```

#ctrl_interface=/var/run/wpa_supplicant

#ctrl_interface_group=0

#eapol_version=1

ap_scan=2

#fast_reauth=1

# WPA-PSK

network={

        scan_ssid=1

        proto=RSN

        key_mgmt=WPA-PSK

        pairwise=CCMP TKIP

        group=CCMP TKIP WEP104 WEP40

        ssid="WG"

        psk=32241a19949728cab4c8ad7717d950e995ee520a038f523c5014ebfd9f1a8b56

        priority=2

}

```

and after start  "wpa_supplicant -dd -K -t -iwlan0 -Dndiswrapper -c /etc/wpa_supplicant.conf "

```

1160341446.189418: Initializing interface 'wlan0' conf '/etc/wpa_supplicant.conf' driver 'ndiswrapper' ctrl_interface 'N/A' bridge 'N/A'

1160341446.191512: Configuration file '/etc/wpa_supplicant.conf' -> '/etc/wpa_supplicant.conf'

1160341446.193284: Reading configuration file '/etc/wpa_supplicant.conf'

1160341446.195075: ap_scan=2

1160341446.196719: Line: 9 - start of a new network block

1160341446.198426: scan_ssid=1 (0x1)

1160341446.200089: proto: 0x2

1160341446.201729: key_mgmt: 0x2

1160341446.203369: pairwise: 0x18

1160341446.206134: group: 0x1e

1160341446.207810: ssid - hexdump_ascii(len=2):

     57 47                                             WG              

1160341446.211168: PSK - hexdump(len=32): 32 24 1a 19 94 97 28 ca b4 d8 cd 99 27 d9 50 e9 95 ee 54 0a 03 8f 52 3c 50 15 eb fd 9f 1a 8b 59

1160341446.213017: priority=2 (0x2)

1160341446.214710: Priority group 2

1160341446.216367:    id=0 ssid='WG'

1160341446.218030: Initializing interface (2) 'wlan0'

1160341446.225489: EAPOL: SUPP_PAE entering state DISCONNECTED

1160341446.227196: EAPOL: KEY_RX entering state NO_KEY_RECEIVE

1160341446.228940: EAPOL: SUPP_BE entering state INITIALIZE

1160341446.230638: EAP: EAP entering state DISABLED

1160341446.232363: EAPOL: External notification - portEnabled=0

1160341446.234081: EAPOL: External notification - portValid=0

1160341446.235997: SIOCGIWRANGE: WE(compiled)=20 WE(source)=18 enc_capa=0xf

1160341446.237727:   capabilities: key_mgmt 0xf enc 0xf

1160341446.239478: WEXT: Operstate: linkmode=1, operstate=5

1160341446.256888: Own MAC address: 00:14:a4:38:f4:07

1160341446.258825: Driver does not support WPA.

1160341446.260504: wpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0

1160341446.262260: wpa_driver_wext_set_key: alg=0 key_idx=1 set_tx=0 seq_len=0 key_len=0

1160341446.264004: wpa_driver_wext_set_key: alg=0 key_idx=2 set_tx=0 seq_len=0 key_len=0

1160341446.266136: wpa_driver_wext_set_key: alg=0 key_idx=3 set_tx=0 seq_len=0 key_len=0

1160341446.267935: Setting scan request: 0 sec 100000 usec

1160341446.269640: Added interface wlan0

1160341446.271350: Wireless event: cmd=0x8b06 len=12

1160341446.273036: RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added

1160341446.274760: RTM_NEWLINK, IFLA_IFNAM

```

and /etc/init.d/net.wlan0 start

```

 * Starting wlan0

 *   Starting wpa_supplicant on wlan0 ...                                 [ ok ]

 *   Starting wpa_cli on wlan0 ...                                        [ ok ]

 *     Failed to configure wlan0 in the background                        [ !! ]

```

what i do false. help me.

or everbody write a small howto? please.

----------

## Hefistion

I have the same problem with my fonera but i have a conceptronic c54rc with a chip ratlink 2500. 

I do not use wpa_supplicant, use the wireless-tools-28 and rt2500-1.1.0_beta4 drivers in a amd64 box

it works in windows but no in gentoo 

Did you find the solution?

----------

## Paczesiowa

what version of ndiswrapper do you use? I had exact same problem with 1.33 problem was that ndiswrapper was reporting bad values from scanning air (wpa_ie_len=0) try other versions of ndiswrapper (start with 1.32 it worked for me with exactly same cfg) and remember about rmmod and modprobe after changing ndiswrapper version. then try "iwlist wlan0 scan" and as long as this scan doesn't return some info about WPA in your network (tkip or ccmp and this kind of stuff) don't bother with wpa_supplicant.

Hefistion don't use native drivers because they suck. I spent maaaaany hours and couldn't get them to work with anything more complicated than wep. with ndiswrapper I got working everything there is (wpa, wpa2, psk, enterprise, tkip, ccmp in all combinations) and I use rt2500 only for kismet

----------

## Hefistion

Now I connect with a router wifi by means of wpa but I have problems with the router of fon, it will try with ndiswrapper to see if I am lucky, thanks.

----------

