Skip to contentSkip to conversation

How to get WPA working?

ath9k-devel takuan 3 participants 6 messages Feb 5, 2009 – Feb 9, 2009

lore
Share & tools
lore

takuan

author
#0 lore raw

Sorry for the simple question but I have looked all over and could not find much information about how to get WPA working with ath9k.

I am running Gentoo 2.6.28-r1 on a MacBook (AR5418).

It seems that most people report it is not working but some people say they have it working with wpa_supplicant.
However, I can not get it to work for the life of me so any advice would be appreticated.

wpa_supplicant.conf:
eapol_version=1
ap_scan=2
fast_reauth=1

network={
ssid="SSIDNAME"
proto=WPA
key_mgmt=WPA-PSK
pairwise=TKIP
group=TKIP
psk="PASSWORD"
}

Here is the output from the command line:
wpa_supplicant -c /etc/wpa_supplicant/wpa_supplicant.conf -i ath8 -D wext -d
Initializing interface 'ath8' conf '/etc/wpa_supplicant/wpa_supplicant.conf' driver 'wext' ctrl_interface 'N/A' bridge 'N/A'
Configuration file '/etc/wpa_supplicant/wpa_supplicant.conf' -> '/etc/wpa_supplicant/wpa_supplicant.conf'
Reading configuration file '/etc/wpa_supplicant/wpa_supplicant.conf' ctrl_interface='/var/run/wpa_supplicant'
eapol_version=1
ap_scan=2
fast_reauth=1
Priority group 0
id=0 ssid='XXXXXXXX'
Initializing interface (2) 'ath8'
Interface ath8 set UP - waiting a second for the driver to complete initialization
SIOCGIWRANGE: WE(compiled)=22 WE(source)=21 enc_capa=0xf
capabilities: key_mgmt 0xf enc 0xf flags 0x0
WEXT: Operstate: linkmode=1, operstate=5
Own MAC address: 00:1b:63:c7:37:cc
wpa_driver_wext_set_wpa
wpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=3 set_tx=0 seq_len=0 key_len=0 wpa_driver_wext_set_countermeasures wpa_driver_wext_set_drop_unencrypted
RSN: flushing PMKID list in the driver
Setting scan request: 0 sec 100000 usec
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: KEY_RX entering state NO_KEY_RECEIVE
EAPOL: SUPP_BE entering state INITIALIZE
EAP: EAP entering state DISABLED
Added interface ath8
State: DISCONNECTED -> SCANNING
Trying to associate with SSID 'XXXXXXXXX'
Cancelling scan request
WPA: clearing own WPA/RSN IE
Automatic auth_alg selection: 0x1
WPA: No WPA/RSN IE available from association info
WPA: Set cipher suites based on configuration
WPA: Selected cipher suites: group 8 pairwise 8 key_mgmt 2 proto 1
WPA: clearing AP WPA IE
WPA: clearing AP RSN IE
WPA: using GTK TKIP
WPA: using PTK TKIP
WPA: using KEY_MGMT WPA-PSK
WPA: Set own WPA IE default - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50 f2 02 01 00 00 50 f2 02 01 00 00 50 f2 02
No keys have been configured - skip key clearing wpa_driver_wext_set_drop_unencrypted
State: SCANNING -> ASSOCIATING
wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)
WEXT: Operstate: linkmode=-1, operstate=5 wpa_driver_wext_associate
wpa_driver_wext_set_psk
Setting authentication timeout: 60 sec 0 usec
EAPOL: External notification - EAP success=0
EAPOL: External notification - EAP fail=0
EAPOL: External notification - portControl=Auto
Ignore event for foreign ifindex 16
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'ath8' added
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'ath8' added
Wireless event: cmd=0x8b06 len=8
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'ath8' added
Wireless event: cmd=0x8b06 len=8
EAPOL: disable timer tick

^CCTRL-EVENT-TERMINATING - signal 2 received Removing interface ath8
State: ASSOCIATING -> DISCONNECTED wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)
WEXT: Operstate: linkmode=-1, operstate=5
No keys have been configured - skip key clearing
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0 wpa_driver_wext_set_wpa wpa_driver_wext_set_drop_unencrypted wpa_driver_wext_set_countermeasures
No keys have been configured - skip key clearing Cancelling scan request
Cancelling authentication timeout
WEXT: Operstate: linkmode=0, operstate=6

It just hangs there and never connects or even associates correctly it
seems.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ath9k.org/pipermail/ath9k-devel/attachments/20090205/0296b7ee/attachment.htm

#1 lore raw
Quoted 5 lines · takuan

Sorry for the simple question but I have looked all over and could not find much information about how to get WPA working with ath9k.

wpa_supplicant.conf:
ap_scan=2

Change that to ap_scan=1

- Jouni

author
#2 lore raw

Jouni,

Thanks for the reply, however I have tried ap_scan=1 and ap_scan=0 with no luck.
When I set it to 1 it just goes in an infinite loop scanning for APs although the SSID of my AP is not being broadcast so it probably will not find it.
Before I run the command I manually set the SSID with
iwconfig ath8 essid "ssidname"
ifconfig ath8 up
wpa_supplicant -d -D wext -i ath8 -c /etc/wpa_supplicant/wpa_supplicant.conf Initializing interface 'ath8' conf '/etc/wpa_supplicant/wpa_supplicant.conf' driver 'wext' ctrl_interface 'N/A' bridge 'N/A'
Configuration file '/etc/wpa_supplicant/wpa_supplicant.conf' -> '/etc/wpa_supplicant/wpa_supplicant.conf'
Reading configuration file '/etc/wpa_supplicant/wpa_supplicant.conf' ctrl_interface='/var/run/wpa_supplicant'
eapol_version=1
ap_scan=1
fast_reauth=1
Priority group 0
id=0 ssid='ssidname'
Initializing interface (2) 'ath8'
SIOCGIWRANGE: WE(compiled)=22 WE(source)=21 enc_capa=0xf
capabilities: key_mgmt 0xf enc 0xf flags 0x0
WEXT: Operstate: linkmode=1, operstate=5
Own MAC address: 00:xx:63:xx:37:cc
wpa_driver_wext_set_wpa
wpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=3 set_tx=0 seq_len=0 key_len=0 wpa_driver_wext_set_countermeasures wpa_driver_wext_set_drop_unencrypted
RSN: flushing PMKID list in the driver
Setting scan request: 0 sec 100000 usec
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: KEY_RX entering state NO_KEY_RECEIVE
EAPOL: SUPP_BE entering state INITIALIZE
EAP: EAP entering state DISABLED
Added interface ath8
State: DISCONNECTED -> SCANNING
Starting AP scan (broadcast SSID)
Trying to get current scan results first without requesting a new scan to speed up initial association
Received 0 bytes of scan results (0 BSSes) CTRL-EVENT-SCAN-RESULTS
Selecting BSS from priority group 0
Try to find WPA-enabled AP
Try to find non-WPA AP
No suitable AP found.
Setting scan request: 0 sec 0 usec
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'ath8' added
Wireless event: cmd=0x8b06 len=8
Starting AP scan (broadcast SSID)
Scan requested (ret=0) - scan timeout 5 seconds
EAPOL: disable timer tick
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'ath8' added
Wireless event: cmd=0x8b19 len=8
Received 4005 bytes of scan results (12 BSSes) CTRL-EVENT-SCAN-RESULTS
Selecting BSS from priority group 0
Try to find WPA-enabled AP
0: 00:0d:0b:88:5e:52 ssid='' wpa_ie_len=22 rsn_ie_len=0 caps=0x11
skip - SSID mismatch
1: 00:0d:0b:88:5c:4e ssid='' wpa_ie_len=22 rsn_ie_len=0 caps=0x11
skip - SSID mismatch
2: 00:0d:0b:88:5e:ec ssid='' wpa_ie_len=22 rsn_ie_len=0 caps=0x11
skip - SSID mismatch
3: 00:0d:0b:70:12:f3 ssid='' wpa_ie_len=22 rsn_ie_len=0 caps=0x11
skip - SSID mismatch
4: 00:0d:0b:88:5c:51 ssid='' wpa_ie_len=22 rsn_ie_len=0 caps=0x11
skip - SSID mismatch
5: 00:0d:0b:92:e1:a6 ssid='' wpa_ie_len=22 rsn_ie_len=0 caps=0x11
skip - SSID mismatch
6: 00:0d:0b:88:76:d1 ssid='' wpa_ie_len=22 rsn_ie_len=0 caps=0x11
skip - SSID mismatch
7: 00:0d:0b:92:e1:90 ssid='' wpa_ie_len=22 rsn_ie_len=0 caps=0x11
skip - SSID mismatch
8: 00:19:56:3b:47:d0 ssid='' wpa_ie_len=0 rsn_ie_len=0 caps=0x11
skip - no WPA/RSN IE
9: 00:0d:02:33:xx:xx ssid='WARPSTAR' wpa_ie_len=0 rsn_ie_len=0 caps=0x11
skip - no WPA/RSN IE
10: 00:90:4b:xx:xx:73 ssid='Motorola' wpa_ie_len=0 rsn_ie_len=0 caps=0x11
skip - no WPA/RSN IE
11: 00:07:40:f2:27:4b ssid='' wpa_ie_len=0 rsn_ie_len=0 caps=0x11
skip - no WPA/RSN IE
Try to find non-WPA AP
0: 00:0d:0b:88:5e:52 ssid='' wpa_ie_len=22 rsn_ie_len=0 caps=0x11
skip - SSID mismatch
1: 00:0d:0b:88:5c:4e ssid='' wpa_ie_len=22 rsn_ie_len=0 caps=0x11
skip - SSID mismatch
2: 00:0d:0b:88:5e:ec ssid='' wpa_ie_len=22 rsn_ie_len=0 caps=0x11
skip - SSID mismatch
3: 00:0d:0b:70:12:f3 ssid='' wpa_ie_len=22 rsn_ie_len=0 caps=0x11
skip - SSID mismatch
4: 00:0d:0b:88:5c:51 ssid='' wpa_ie_len=22 rsn_ie_len=0 caps=0x11
skip - SSID mismatch
5: 00:0d:0b:92:e1:a6 ssid='' wpa_ie_len=22 rsn_ie_len=0 caps=0x11
skip - SSID mismatch
6: 00:0d:0b:88:76:d1 ssid='' wpa_ie_len=22 rsn_ie_len=0 caps=0x11
skip - SSID mismatch
7: 00:0d:0b:92:e1:90 ssid='' wpa_ie_len=22 rsn_ie_len=0 caps=0x11
skip - SSID mismatch
8: 00:19:56:3b:47:d0 ssid='' wpa_ie_len=0 rsn_ie_len=0 caps=0x11
skip - SSID mismatch
9: 00:0d:02:33:xx:xx ssid='WARPSTAR-F' wpa_ie_len=0 rsn_ie_len=0 caps=0x11
skip - SSID mismatch
10: 00:90:4b:85:5c:73 ssid='Motorola' wpa_ie_len=0 rsn_ie_len=0 caps=0x11
skip - SSID mismatch
11: 00:07:40:f2:27:4b ssid='' wpa_ie_len=0 rsn_ie_len=0 caps=0x11
skip - SSID mismatch
No suitable AP found.
Setting scan request: 5 sec 0 usec

I had this script working fine with the madwifi-ng drivers using the exact same commands except for using the madwifi driver with wpa_supplicant in replace of wext with ath9k. (Although, the my connection would always crash after 10 or so minutes of use with WPA+madwifi which is one of the reasons I want to switch to ath9k if it is stable.)
So I am not sure why it won't connect.

Any other things I could try?

Quoted 4 lines · Jouni Malinen
Quoted 2 lines · takuan

Sorry for the simple question but I have looked all over and could not find much information about how to get WPA working with ath9k.

Quoted 9 lines
Quoted 2 lines

wpa_supplicant.conf:
ap_scan=2

Change that to ap_scan=1

- Jouni

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ath9k.org/pipermail/ath9k-devel/attachments/20090206/9ca734c8/attachment.htm

#3 lore raw

2009/2/5 takuan <[email protected]>:

Quoted 117 lines

Jouni,

Thanks for the reply, however I have tried ap_scan=1 and ap_scan=0 with no luck.
When I set it to 1 it just goes in an infinite loop scanning for APs although the SSID of my AP is not being broadcast so it probably will not find it.
Before I run the command I manually set the SSID with
iwconfig ath8 essid "ssidname"
ifconfig ath8 up
wpa_supplicant -d -D wext -i ath8 -c /etc/wpa_supplicant/wpa_supplicant.conf Initializing interface 'ath8' conf '/etc/wpa_supplicant/wpa_supplicant.conf' driver 'wext' ctrl_interface 'N/A' bridge 'N/A'
Configuration file '/etc/wpa_supplicant/wpa_supplicant.conf' -> '/etc/wpa_supplicant/wpa_supplicant.conf'
Reading configuration file '/etc/wpa_supplicant/wpa_supplicant.conf' ctrl_interface='/var/run/wpa_supplicant'
eapol_version=1
ap_scan=1
fast_reauth=1
Priority group 0
id=0 ssid='ssidname'
Initializing interface (2) 'ath8'
SIOCGIWRANGE: WE(compiled)=22 WE(source)=21 enc_capa=0xf
capabilities: key_mgmt 0xf enc 0xf flags 0x0
WEXT: Operstate: linkmode=1, operstate=5
Own MAC address: 00:xx:63:xx:37:cc
wpa_driver_wext_set_wpa
wpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=3 set_tx=0 seq_len=0 key_len=0 wpa_driver_wext_set_countermeasures wpa_driver_wext_set_drop_unencrypted
RSN: flushing PMKID list in the driver
Setting scan request: 0 sec 100000 usec
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: KEY_RX entering state NO_KEY_RECEIVE
EAPOL: SUPP_BE entering state INITIALIZE
EAP: EAP entering state DISABLED
Added interface ath8
State: DISCONNECTED -> SCANNING
Starting AP scan (broadcast SSID)
Trying to get current scan results first without requesting a new scan to speed up initial association
Received 0 bytes of scan results (0 BSSes) CTRL-EVENT-SCAN-RESULTS
Selecting BSS from priority group 0
Try to find WPA-enabled AP
Try to find non-WPA AP
No suitable AP found.
Setting scan request: 0 sec 0 usec
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'ath8' added
Wireless event: cmd=0x8b06 len=8
Starting AP scan (broadcast SSID)
Scan requested (ret=0) - scan timeout 5 seconds
EAPOL: disable timer tick
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'ath8' added
Wireless event: cmd=0x8b19 len=8
Received 4005 bytes of scan results (12 BSSes) CTRL-EVENT-SCAN-RESULTS
Selecting BSS from priority group 0
Try to find WPA-enabled AP
0: 00:0d:0b:88:5e:52 ssid='' wpa_ie_len=22 rsn_ie_len=0 caps=0x11
skip - SSID mismatch
1: 00:0d:0b:88:5c:4e ssid='' wpa_ie_len=22 rsn_ie_len=0 caps=0x11
skip - SSID mismatch
2: 00:0d:0b:88:5e:ec ssid='' wpa_ie_len=22 rsn_ie_len=0 caps=0x11
skip - SSID mismatch
3: 00:0d:0b:70:12:f3 ssid='' wpa_ie_len=22 rsn_ie_len=0 caps=0x11
skip - SSID mismatch
4: 00:0d:0b:88:5c:51 ssid='' wpa_ie_len=22 rsn_ie_len=0 caps=0x11
skip - SSID mismatch
5: 00:0d:0b:92:e1:a6 ssid='' wpa_ie_len=22 rsn_ie_len=0 caps=0x11
skip - SSID mismatch
6: 00:0d:0b:88:76:d1 ssid='' wpa_ie_len=22 rsn_ie_len=0 caps=0x11
skip - SSID mismatch
7: 00:0d:0b:92:e1:90 ssid='' wpa_ie_len=22 rsn_ie_len=0 caps=0x11
skip - SSID mismatch
8: 00:19:56:3b:47:d0 ssid='' wpa_ie_len=0 rsn_ie_len=0 caps=0x11
skip - no WPA/RSN IE
9: 00:0d:02:33:xx:xx ssid='WARPSTAR' wpa_ie_len=0 rsn_ie_len=0 caps=0x11
skip - no WPA/RSN IE
10: 00:90:4b:xx:xx:73 ssid='Motorola' wpa_ie_len=0 rsn_ie_len=0 caps=0x11
skip - no WPA/RSN IE
11: 00:07:40:f2:27:4b ssid='' wpa_ie_len=0 rsn_ie_len=0 caps=0x11
skip - no WPA/RSN IE
Try to find non-WPA AP
0: 00:0d:0b:88:5e:52 ssid='' wpa_ie_len=22 rsn_ie_len=0 caps=0x11
skip - SSID mismatch
1: 00:0d:0b:88:5c:4e ssid='' wpa_ie_len=22 rsn_ie_len=0 caps=0x11
skip - SSID mismatch
2: 00:0d:0b:88:5e:ec ssid='' wpa_ie_len=22 rsn_ie_len=0 caps=0x11
skip - SSID mismatch
3: 00:0d:0b:70:12:f3 ssid='' wpa_ie_len=22 rsn_ie_len=0 caps=0x11
skip - SSID mismatch
4: 00:0d:0b:88:5c:51 ssid='' wpa_ie_len=22 rsn_ie_len=0 caps=0x11
skip - SSID mismatch
5: 00:0d:0b:92:e1:a6 ssid='' wpa_ie_len=22 rsn_ie_len=0 caps=0x11
skip - SSID mismatch
6: 00:0d:0b:88:76:d1 ssid='' wpa_ie_len=22 rsn_ie_len=0 caps=0x11
skip - SSID mismatch
7: 00:0d:0b:92:e1:90 ssid='' wpa_ie_len=22 rsn_ie_len=0 caps=0x11
skip - SSID mismatch
8: 00:19:56:3b:47:d0 ssid='' wpa_ie_len=0 rsn_ie_len=0 caps=0x11
skip - SSID mismatch
9: 00:0d:02:33:xx:xx ssid='WARPSTAR-F' wpa_ie_len=0 rsn_ie_len=0 caps=0x11
skip - SSID mismatch
10: 00:90:4b:85:5c:73 ssid='Motorola' wpa_ie_len=0 rsn_ie_len=0 caps=0x11
skip - SSID mismatch
11: 00:07:40:f2:27:4b ssid='' wpa_ie_len=0 rsn_ie_len=0 caps=0x11
skip - SSID mismatch
No suitable AP found.
Setting scan request: 5 sec 0 usec

Quoted 8 lines

I had this script working fine with the madwifi-ng drivers using the exact same commands except for using the madwifi driver with wpa_supplicant in replace of wext with ath9k. (Although, the my connection would always crash after 10 or so minutes of use with WPA+madwifi which is one of the reasons I want to switch to ath9k if it is stable.)
So I am not sure why it won't connect.

Any other things I could try?

You can try the latest ath9k:

http://wireless.kernel.org/en/users/Drivers/ath9k#Getthelatestath9kdriver

Also get these two guys:

http://wireless.kernel.org/en/developers/Regulatory#Codereleases

Luis

#4 lore raw
In reply to takuan
Quoted 5 lines · takuan

Thanks for the reply, however I have tried ap_scan=1 and ap_scan=0 with no luck.
When I set it to 1 it just goes in an infinite loop scanning for APs although the SSID of my AP is not being broadcast so it probably will not find it.

You will need to add scan_ssid=1 into the network block to find the hidden SSID.

- Jouni

author
#5 lore raw

Thanks so much!
That fixed it.
It also seems much more stable than the ath_pci madwifi drivers as well. =)

Quoted 7 lines · Jouni Malinen
Quoted 5 lines · takuan

Thanks for the reply, however I have tried ap_scan=1 and ap_scan=0 with no luck.
When I set it to 1 it just goes in an infinite loop scanning for APs although the SSID of my AP is not being broadcast so it probably will not find it.

Quoted 7 lines

You will need to add scan_ssid=1 into the network block to find the hidden SSID.

- Jouni

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ath9k.org/pipermail/ath9k-devel/attachments/20090209/ba22caed/attachment.htm