You are not logged in.

#1 2008-12-17 02:35:27

dmlawrence
Member
Registered: 2008-10-01
Posts: 21

[SOLVED] Problems with wifi on 1st-gen MacBook

UPDATE: problem solved by running iwpriv ath0 bgscan 0.

Original post:

I have a first generation MacBook.  wpa_supplicant does not associate successfully.  Here's some relevant information:

lspci | grep Atheros

02:00.0 Ethernet controller: Atheros Communications Inc. AR242x 802.11abg Wireless PCI Express Adapter (rev 01)

lsmod | grep ath

ath5k 100352 0
mac80211 158876 1 ath5k
cfg80211 25224 2 ath5k,mac80211
led_class 5508 2 ath5k,applesmc

ifconfig wlan0 up
(no output)

iwlist wlan0 scan

wlan0 Scan completed :
Cell 01 - Address: 00:16:B6:50:13:82
ESSID:"lawrence"
...

iwconfig wlan0 essid lawrence
(no output)

cat /etc/wpa_supplicant.conf

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

network={
ssid="lawrence"
psk=#########long hexadecimal key generated by wpa_passphrase#########
}

wpa_supplicant -i wlan0 -Dwext -c /etc/wpa_supplicant.conf -dd

Initializing interface 'wlan0' conf '/etc/wpa_supplicant.conf' driver 'wext' ctrl_interface 'N/A' bridge 'N/A'
Configuration file '/etc/wpa_supplicant.conf' -> '/etc/wpa_supplicant.conf'
Reading configuration file '/etc/wpa_supplicant.conf'
ctrl_interface='DIR=/var/run/wpa_supplicant GROUP=wheel'
Line: 3 - start of a new network block
ssid - hexdump_ascii(len=8):
     6c 61 77 72 65 6e 63 65                           lawrence        
PSK - hexdump(len=32): [REMOVED]
Priority group 0
   id=0 ssid='lawrence'
Initializing interface (2) 'wlan0'
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
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
SIOCGIWRANGE: WE(compiled)=22 WE(source)=21 enc_capa=0xf
  capabilities: key_mgmt 0xf enc 0xf
WEXT: Operstate: linkmode=1, operstate=5
Own MAC address: 00:16:cb:bb:89:8d
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
Setting scan request: 0 sec 100000 usec
ctrl_interface_group=10 (from group name 'wheel')
Added interface wlan0
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
Wireless event: cmd=0x8b06 len=8
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)
Scan results: 0
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
Starting AP scan (broadcast SSID)
Scan requested (ret=0) - scan timeout 5 seconds
Scan timeout - try to get results
ioctl[SIOCGIWSCAN]: Resource temporarily unavailable
Scan results: -1
Failed to get scan results
Failed to get scan results - try scanning again
Setting scan request: 1 sec 0 usec
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
Wireless event: cmd=0x8b19 len=8
Received 274 bytes of scan results (1 BSSes)
Scan results: 1
Selecting BSS from priority group 0
Try to find WPA-enabled AP
0: 00:16:b6:50:13:82 ssid='lawrence' wpa_ie_len=0 rsn_ie_len=22 caps=0x11
   selected based on RSN IE
   selected WPA AP 00:16:b6:50:13:82 ssid='lawrence'
Try to find non-WPA AP
Trying to associate with 00:16:b6:50:13:82 (SSID='lawrence' freq=2412 MHz)
Cancelling scan request
WPA: clearing own WPA/RSN IE
Automatic auth_alg selection: 0x1
RSN: using IEEE 802.11i/D9.0
WPA: Selected cipher suites: group 16 pairwise 16 key_mgmt 2 proto 2
WPA: clearing AP WPA IE
WPA: set AP RSN IE - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00
WPA: using GTK CCMP
WPA: using PTK CCMP
WPA: using KEY_MGMT WPA-PSK
WPA: Set own WPA IE default - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00
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
Setting authentication timeout: 10 sec 0 usec
EAPOL: External notification - EAP success=0
EAPOL: External notification - EAP fail=0
EAPOL: External notification - portControl=Auto
RSN: Ignored PMKID candidate without preauth flag
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
Wireless event: cmd=0x8b06 len=8
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
Wireless event: cmd=0x8b04 len=12
Authentication with 00:16:b6:50:13:82 timed out.
Added BSSID 00:16:b6:50:13:82 into blacklist
No keys have been configured - skip key clearing
State: ASSOCIATING -> DISCONNECTED
wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)
WEXT: Operstate: linkmode=-1, operstate=5
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
EAPOL: External notification - EAP success=0
Setting scan request: 0 sec 0 usec
State: DISCONNECTED -> SCANNING
Starting AP scan (broadcast SSID)
Scan requested (ret=0) - scan timeout 30 seconds
Ignore event for foreign ifindex 2
Ignore event for foreign ifindex 2
Ignore event for foreign ifindex 2
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
Wireless event: cmd=0x8b19 len=8
Received 274 bytes of scan results (1 BSSes)
Scan results: 1
Selecting BSS from priority group 0
Try to find WPA-enabled AP
0: 00:16:b6:50:13:82 ssid='lawrence' wpa_ie_len=0 rsn_ie_len=22 caps=0x11
   selected based on RSN IE
   selected WPA AP 00:16:b6:50:13:82 ssid='lawrence'
Try to find non-WPA AP
Trying to associate with 00:16:b6:50:13:82 (SSID='lawrence' freq=2412 MHz)
Cancelling scan request
WPA: clearing own WPA/RSN IE
Automatic auth_alg selection: 0x1
RSN: using IEEE 802.11i/D9.0
WPA: Selected cipher suites: group 16 pairwise 16 key_mgmt 2 proto 2
WPA: clearing AP WPA IE
WPA: set AP RSN IE - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00
WPA: using GTK CCMP
WPA: using PTK CCMP
WPA: using KEY_MGMT WPA-PSK
WPA: Set own WPA IE default - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00
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
Setting authentication timeout: 10 sec 0 usec
EAPOL: External notification - EAP success=0
EAPOL: External notification - EAP fail=0
EAPOL: External notification - portControl=Auto
RSN: Ignored PMKID candidate without preauth flag
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
Wireless event: cmd=0x8b06 len=8
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
Wireless event: cmd=0x8b04 len=12
^CCTRL-EVENT-TERMINATING - signal 2 received
Removing interface wlan0
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
Removed BSSID 00:16:b6:50:13:82 from blacklist (clear)
Cancelling scan request
Cancelling authentication timeout
WEXT: Operstate: linkmode=0, operstate=6
[dmlawrence@dmlawrence ~]$ sudo wpa_supplicant -i wlan0 -Dwext -c /etc/wpa_supplicant.conf -d
Initializing interface 'wlan0' conf '/etc/wpa_supplicant.conf' driver 'wext' ctrl_interface 'N/A' bridge 'N/A'
Configuration file '/etc/wpa_supplicant.conf' -> '/etc/wpa_supplicant.conf'
Reading configuration file '/etc/wpa_supplicant.conf'
ctrl_interface='DIR=/var/run/wpa_supplicant GROUP=wheel'
Priority group 0
   id=0 ssid='lawrence'
Initializing interface (2) 'wlan0'
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
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
SIOCGIWRANGE: WE(compiled)=22 WE(source)=21 enc_capa=0xf
  capabilities: key_mgmt 0xf enc 0xf
WEXT: Operstate: linkmode=1, operstate=5
Own MAC address: 00:16:cb:bb:89:8d
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
Setting scan request: 0 sec 100000 usec
ctrl_interface_group=10 (from group name 'wheel')
Added interface wlan0
RTM_NEWLINK: operstate=0 ifi_flags=0x1002 ()
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
Wireless event: cmd=0x8b06 len=8
Ignore event for foreign ifindex 3
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
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
ioctl[SIOCGIWSCAN]: Resource temporarily unavailable
Scan results: -1
Failed to get scan results
Failed to get scan results - try scanning again
Setting scan request: 0 sec 0 usec
Starting AP scan (broadcast SSID)
Scan requested (ret=0) - scan timeout 5 seconds
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
Wireless event: cmd=0x8b19 len=8
Received 274 bytes of scan results (1 BSSes)
Scan results: 1
Selecting BSS from priority group 0
Try to find WPA-enabled AP
0: 00:16:b6:50:13:82 ssid='lawrence' wpa_ie_len=0 rsn_ie_len=22 caps=0x11
   selected based on RSN IE
   selected WPA AP 00:16:b6:50:13:82 ssid='lawrence'
Try to find non-WPA AP
Trying to associate with 00:16:b6:50:13:82 (SSID='lawrence' freq=2412 MHz)
Cancelling scan request
WPA: clearing own WPA/RSN IE
Automatic auth_alg selection: 0x1
RSN: using IEEE 802.11i/D9.0
WPA: Selected cipher suites: group 16 pairwise 16 key_mgmt 2 proto 2
WPA: clearing AP WPA IE
WPA: set AP RSN IE - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00
WPA: using GTK CCMP
WPA: using PTK CCMP
WPA: using KEY_MGMT WPA-PSK
WPA: Set own WPA IE default - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00
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
Setting authentication timeout: 10 sec 0 usec
EAPOL: External notification - EAP success=0
EAPOL: External notification - EAP fail=0
EAPOL: External notification - portControl=Auto
RSN: Ignored PMKID candidate without preauth flag
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
Wireless event: cmd=0x8b06 len=8
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
Wireless event: cmd=0x8b04 len=12
Authentication with 00:16:b6:50:13:82 timed out.
Added BSSID 00:16:b6:50:13:82 into blacklist
No keys have been configured - skip key clearing
State: ASSOCIATING -> DISCONNECTED
wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)
WEXT: Operstate: linkmode=-1, operstate=5
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
EAPOL: External notification - EAP success=0
Setting scan request: 0 sec 0 usec
State: DISCONNECTED -> SCANNING
Starting AP scan (broadcast SSID)
Scan requested (ret=0) - scan timeout 30 seconds
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
Wireless event: cmd=0x8b19 len=8
Received 274 bytes of scan results (1 BSSes)
Scan results: 1
Selecting BSS from priority group 0
Try to find WPA-enabled AP
0: 00:16:b6:50:13:82 ssid='lawrence' wpa_ie_len=0 rsn_ie_len=22 caps=0x11
   selected based on RSN IE
   selected WPA AP 00:16:b6:50:13:82 ssid='lawrence'
Try to find non-WPA AP
Trying to associate with 00:16:b6:50:13:82 (SSID='lawrence' freq=2412 MHz)
Cancelling scan request
WPA: clearing own WPA/RSN IE
Automatic auth_alg selection: 0x1
RSN: using IEEE 802.11i/D9.0
WPA: Selected cipher suites: group 16 pairwise 16 key_mgmt 2 proto 2
WPA: clearing AP WPA IE
WPA: set AP RSN IE - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00
WPA: using GTK CCMP
WPA: using PTK CCMP
WPA: using KEY_MGMT WPA-PSK
WPA: Set own WPA IE default - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00
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
Setting authentication timeout: 10 sec 0 usec
EAPOL: External notification - EAP success=0
EAPOL: External notification - EAP fail=0
EAPOL: External notification - portControl=Auto
RSN: Ignored PMKID candidate without preauth flag
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
Wireless event: cmd=0x8b06 len=8
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
Wireless event: cmd=0x8b04 len=12
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
Wireless event: cmd=0x8b15 len=20
Wireless event: new AP: 00:00:00:00:00:00
BSSID 00:16:b6:50:13:82 blacklist count incremented to 2
CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
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_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0
ioctl[SIOCSIWENCODEEXT]: No such file or directory
Driver did not support SIOCSIWENCODEEXT
State: ASSOCIATING -> DISCONNECTED
wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)
WEXT: Operstate: linkmode=-1, operstate=5
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
EAPOL: External notification - EAP success=0
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
Wireless event: cmd=0x8b15 len=20
Wireless event: new AP: 00:00:00:00:00:00
Added BSSID 00:00:00:00:00:00 into blacklist
CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
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_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0
ioctl[SIOCSIWENCODEEXT]: No such file or directory
Driver did not support SIOCSIWENCODEEXT
State: DISCONNECTED -> DISCONNECTED
wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)
WEXT: Operstate: linkmode=-1, operstate=5
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
EAPOL: External notification - EAP success=0
Authentication with 00:00:00:00:00:00 timed out.
BSSID 00:00:00:00:00:00 blacklist count incremented to 2
No keys have been configured - skip key clearing
State: DISCONNECTED -> DISCONNECTED
wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)
WEXT: Operstate: linkmode=-1, operstate=5
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
EAPOL: External notification - EAP success=0
Setting scan request: 0 sec 0 usec
State: DISCONNECTED -> SCANNING
Starting AP scan (broadcast SSID)
Scan requested (ret=0) - scan timeout 30 seconds
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
Wireless event: cmd=0x8b19 len=8
Received 274 bytes of scan results (1 BSSes)
Scan results: 1
Selecting BSS from priority group 0
Try to find WPA-enabled AP
0: 00:16:b6:50:13:82 ssid='lawrence' wpa_ie_len=0 rsn_ie_len=22 caps=0x11
   skip - blacklisted
Try to find non-WPA AP
0: 00:16:b6:50:13:82 ssid='lawrence' wpa_ie_len=0 rsn_ie_len=22 caps=0x11
   skip - blacklisted
No APs found - clear blacklist and try again
Removed BSSID 00:00:00:00:00:00 from blacklist (clear)
Removed BSSID 00:16:b6:50:13:82 from blacklist (clear)
Selecting BSS from priority group 0
Try to find WPA-enabled AP
0: 00:16:b6:50:13:82 ssid='lawrence' wpa_ie_len=0 rsn_ie_len=22 caps=0x11
   selected based on RSN IE
   selected WPA AP 00:16:b6:50:13:82 ssid='lawrence'
Try to find non-WPA AP
Trying to associate with 00:16:b6:50:13:82 (SSID='lawrence' freq=2412 MHz)
Cancelling scan request
WPA: clearing own WPA/RSN IE
Automatic auth_alg selection: 0x1
RSN: using IEEE 802.11i/D9.0
WPA: Selected cipher suites: group 16 pairwise 16 key_mgmt 2 proto 2
WPA: clearing AP WPA IE
WPA: set AP RSN IE - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00
WPA: using GTK CCMP
WPA: using PTK CCMP
WPA: using KEY_MGMT WPA-PSK
WPA: Set own WPA IE default - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00
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
Setting authentication timeout: 10 sec 0 usec
EAPOL: External notification - EAP success=0
EAPOL: External notification - EAP fail=0
EAPOL: External notification - portControl=Auto
RSN: Ignored PMKID candidate without preauth flag
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
Wireless event: cmd=0x8b06 len=8
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
Wireless event: cmd=0x8b04 len=12
Authentication with 00:16:b6:50:13:82 timed out.
Added BSSID 00:16:b6:50:13:82 into blacklist
No keys have been configured - skip key clearing
State: ASSOCIATING -> DISCONNECTED
wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)
WEXT: Operstate: linkmode=-1, operstate=5
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
EAPOL: External notification - EAP success=0
Setting scan request: 0 sec 0 usec
State: DISCONNECTED -> SCANNING
Starting AP scan (broadcast SSID)
Scan requested (ret=0) - scan timeout 30 seconds
^CCTRL-EVENT-TERMINATING - signal 2 received
Removing interface wlan0
State: SCANNING -> 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
...

...and these messages continue to repeat.

ONCE, wpa_supplicant successfully associated and I was able to obtain an IP address.  The connection was lost after a few seconds.

Thanks in advance for your assistance.

Last edited by dmlawrence (2009-03-11 23:06:01)

Offline

#2 2008-12-19 18:04:59

dmlawrence
Member
Registered: 2008-10-01
Posts: 21

Re: [SOLVED] Problems with wifi on 1st-gen MacBook

Another odd observation...

Before running wpa_supplicant, iwconfig lists the wifi frequency as 2.412 GHz.  After wpa_supplicant is run, the card is set to 5.255 GHz.  The card does not support 802.11n.

Ideas?

Offline

#3 2008-12-19 18:35:22

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: [SOLVED] Problems with wifi on 1st-gen MacBook

802.11n is not the only standard to use the 5 Ghz band. 802.11a is 5 Ghz exclusively. And your card does support 802.11a...


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#4 2008-12-20 13:41:12

dmlawrence
Member
Registered: 2008-10-01
Posts: 21

Re: [SOLVED] Problems with wifi on 1st-gen MacBook

After switching from the ath5k to ath_pci driver, wpa_supplicant seems to authenticate correctly.  I am testing the connection now.

Offline

#5 2008-12-20 15:23:35

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: [SOLVED] Problems with wifi on 1st-gen MacBook

Nice to see you're making progress. It might be an idea to keep your problem centralised though - you have another topic open for your interface not being brought up correctly... It may confuse people if they have to switch between topics wink.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#6 2008-12-20 16:14:47

dmlawrence
Member
Registered: 2008-10-01
Posts: 21

Re: [SOLVED] Problems with wifi on 1st-gen MacBook

I originally thought that I was having two distinct problems, because they did not necessarily occur simultaneously.  Now it turns out they were both driver issues.  Both of these problems have been resolved, but...

I'm having a new problem with the ath_pci driver.  (Actually, I don't even know if my problem is caused by the driver -- I was never able to get this far with any other drivers.)  Every ~2 minutes, the connection is "lost."  By this, I mean that all network utilities (ping, synergy, firefox, ...) simultaneously stop working.  There are no messages in the system log that pertain to any potential problems.  The connection starts working again in about 10 seconds without any user intervention.  This problem occurs repeatedly.

Other than the fact that everything stops working, I can find no evidence of a problem.


David

Update:  My router's WPA key renewal is set to 300 seconds.  Could this periodic key renewal be causing a problem?

Last edited by dmlawrence (2008-12-20 16:28:27)

Offline

#7 2008-12-20 17:27:25

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: [SOLVED] Problems with wifi on 1st-gen MacBook

That is 5 minutes. Do your router's logs indicate anything?


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#8 2008-12-21 01:47:46

dmlawrence
Member
Registered: 2008-10-01
Posts: 21

Re: [SOLVED] Problems with wifi on 1st-gen MacBook

There are no events reported in my routers' logs for this timeframe.

These dropouts occur sporadically, about every two minutes, and last for less than 20 seconds.

Here's the output of a ping command.  There seems to be some odd network behavior (latencies) even when the connection is not lost:

PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_seq=1 ttl=150 time=1.96 ms
64 bytes from 192.168.1.1: icmp_seq=2 ttl=150 time=3.65 ms
64 bytes from 192.168.1.1: icmp_seq=3 ttl=150 time=1.04 ms
64 bytes from 192.168.1.1: icmp_seq=4 ttl=150 time=1.06 ms
64 bytes from 192.168.1.1: icmp_seq=5 ttl=150 time=1.02 ms
64 bytes from 192.168.1.1: icmp_seq=6 ttl=150 time=2.54 ms
64 bytes from 192.168.1.1: icmp_seq=7 ttl=150 time=3.51 ms
64 bytes from 192.168.1.1: icmp_seq=8 ttl=150 time=3.55 ms
64 bytes from 192.168.1.1: icmp_seq=9 ttl=150 time=1.02 ms
64 bytes from 192.168.1.1: icmp_seq=10 ttl=150 time=1.08 ms
64 bytes from 192.168.1.1: icmp_seq=11 ttl=150 time=1.00 ms
64 bytes from 192.168.1.1: icmp_seq=12 ttl=150 time=73.2 ms
64 bytes from 192.168.1.1: icmp_seq=13 ttl=150 time=153 ms
64 bytes from 192.168.1.1: icmp_seq=14 ttl=150 time=1149 ms
64 bytes from 192.168.1.1: icmp_seq=15 ttl=150 time=398 ms
64 bytes from 192.168.1.1: icmp_seq=16 ttl=150 time=143 ms
64 bytes from 192.168.1.1: icmp_seq=17 ttl=150 time=391 ms
64 bytes from 192.168.1.1: icmp_seq=18 ttl=150 time=1.12 ms
64 bytes from 192.168.1.1: icmp_seq=19 ttl=150 time=0.987 ms
64 bytes from 192.168.1.1: icmp_seq=20 ttl=150 time=1.02 ms
64 bytes from 192.168.1.1: icmp_seq=21 ttl=150 time=1.00 ms
64 bytes from 192.168.1.1: icmp_seq=22 ttl=150 time=2.22 ms
64 bytes from 192.168.1.1: icmp_seq=23 ttl=150 time=16.6 ms
64 bytes from 192.168.1.1: icmp_seq=24 ttl=150 time=0.996 ms
64 bytes from 192.168.1.1: icmp_seq=25 ttl=150 time=1.09 ms
64 bytes from 192.168.1.1: icmp_seq=26 ttl=150 time=1.09 ms
64 bytes from 192.168.1.1: icmp_seq=27 ttl=150 time=3.47 ms
64 bytes from 192.168.1.1: icmp_seq=28 ttl=150 time=1.20 ms
64 bytes from 192.168.1.1: icmp_seq=29 ttl=150 time=1.01 ms
64 bytes from 192.168.1.1: icmp_seq=30 ttl=150 time=1.61 ms
64 bytes from 192.168.1.1: icmp_seq=31 ttl=150 time=1.03 ms
64 bytes from 192.168.1.1: icmp_seq=32 ttl=150 time=1.35 ms
64 bytes from 192.168.1.1: icmp_seq=33 ttl=150 time=5.31 ms
64 bytes from 192.168.1.1: icmp_seq=34 ttl=150 time=2.26 ms
64 bytes from 192.168.1.1: icmp_seq=35 ttl=150 time=1.11 ms

--- 192.168.1.1 ping statistics ---
35 packets transmitted, 35 received, 0% packet loss, time 34134ms
rtt min/avg/max/mdev = 0.987/67.885/1149.219/208.502 ms, pipe 2

Here's the most suspicious section of a much longer ping command, with a few dropped packets:

64 bytes from 192.168.1.1: icmp_seq=157 ttl=150 time=734 ms
64 bytes from 192.168.1.1: icmp_seq=158 ttl=150 time=481 ms
64 bytes from 192.168.1.1: icmp_seq=159 ttl=150 time=1227 ms
64 bytes from 192.168.1.1: icmp_seq=163 ttl=150 time=223 ms
64 bytes from 192.168.1.1: icmp_seq=165 ttl=150 time=219 ms
64 bytes from 192.168.1.1: icmp_seq=166 ttl=150 time=39.1 ms
64 bytes from 192.168.1.1: icmp_seq=168 ttl=150 time=1115 ms
64 bytes from 192.168.1.1: icmp_seq=169 ttl=150 time=118 ms
64 bytes from 192.168.1.1: icmp_seq=171 ttl=150 time=0.926 ms
64 bytes from 192.168.1.1: icmp_seq=172 ttl=150 time=24.8 ms
64 bytes from 192.168.1.1: icmp_seq=174 ttl=150 time=2.25 ms
64 bytes from 192.168.1.1: icmp_seq=175 ttl=150 time=1.06 ms
64 bytes from 192.168.1.1: icmp_seq=176 ttl=150 time=1.01 ms
64 bytes from 192.168.1.1: icmp_seq=177 ttl=150 time=1.07 ms
64 bytes from 192.168.1.1: icmp_seq=178 ttl=150 time=1.00 ms
64 bytes from 192.168.1.1: icmp_seq=179 ttl=150 time=5.50 ms
64 bytes from 192.168.1.1: icmp_seq=180 ttl=150 time=1.18 ms

Ping works fine under Mac OS, so I am sure that this is an issue with the local software (rather than with the network).

Last edited by dmlawrence (2008-12-21 15:33:24)

Offline

#9 2008-12-21 14:02:13

dmlawrence
Member
Registered: 2008-10-01
Posts: 21

Re: [SOLVED] Problems with wifi on 1st-gen MacBook

I have determined that I am in fact experiencing two different problems.

The first is that the connection occasionally drops, as described in the iwevent logs below:

13:41:59.446314   ath0     New Access Point/Cell address:Not-Associated
13:42:05.746575   ath0     Scan request completed
13:42:05.747024   ath0     Set Mode:Managed
13:42:05.747489   ath0     Set Frequency:2.412 GHz (Channel 1)
13:42:21.929838   ath0     Scan request completed
13:42:21.930284   ath0     Set Mode:Managed
13:42:21.930778   ath0     Set Frequency:2.412 GHz (Channel 1)
13:42:38.007509   ath0     Scan request completed
13:42:38.007642   ath0     Set Mode:Managed
13:42:38.007716   ath0     Set Frequency:2.412 GHz (Channel 1)
13:42:54.179891   ath0     Scan request completed
13:42:54.180252   ath0     Set Mode:Managed
13:42:54.180704   ath0     Set Frequency:2.412 GHz (Channel 1)
13:43:10.253211   ath0     Scan request completed
13:43:10.253560   ath0     Set Mode:Managed
13:43:10.253973   ath0     Set Frequency:2.412 GHz (Channel 1)
13:43:26.439900   ath0     Scan request completed
13:43:26.440353   ath0     Set Mode:Managed
13:43:26.440820   ath0     Set Frequency:2.412 GHz (Channel 1)
13:43:42.936518   ath0     Scan request completed
13:43:42.937016   ath0     Set Mode:Managed
13:43:42.937564   ath0     Set Frequency:2.412 GHz (Channel 1)
13:43:59.319894   ath0     Scan request completed
13:43:59.320164   ath0     Set Mode:Managed
13:43:59.320596   ath0     Set Frequency:2.412 GHz (Channel 1)
13:43:59.855208   ath0     New Access Point/Cell address:00:16:B6:50:13:82
15:21:55.667500   ath0     New Access Point/Cell address:00:16:B6:50:13:82
15:22:05.672405   ath0     New Access Point/Cell address:Not-Associated
15:22:05.672460   ath0     Custom driver event:STA-TRAFFIC-STAT
mac=00:16:b6:50:13:82
rx_packets=4
rx_bytes=1484
tx_packets=10
tx_bytes=1218

15:22:05.672499   ath0     New Access Point/Cell address:Not-Associated
15:22:35.675976   ath0     Set Mode:Managed
15:22:35.676412   ath0     Set Frequency:2.412 GHz (Channel 1)
15:22:35.692982   ath0     New Access Point/Cell address:00:16:B6:50:13:82
15:22:45.699091   ath0     New Access Point/Cell address:Not-Associated
15:22:45.699130   ath0     Custom driver event:STA-TRAFFIC-STAT
mac=00:16:b6:50:13:82
rx_packets=3
rx_bytes=894
tx_packets=4
tx_bytes=701

This sequence of events coincides with a few of the service interruptions, but not all.

The other interruptions coincide with the unusually large latencies reported by ping.  I have experienced latencies of over 10000 ms.  I disabled background scanning (iwpriv ath0 bgscan 0) but the latencies continue to occur.

Last edited by dmlawrence (2008-12-21 15:34:54)

Offline

#10 2008-12-29 00:49:28

dmlawrence
Member
Registered: 2008-10-01
Posts: 21

Re: [SOLVED] Problems with wifi on 1st-gen MacBook

I have discovered that my wireless connection works perfectly out of the box with Ubuntu 8.10 and NetworkManager.  This configuration uses ath_pci.

This is proof that it's possible to get my hardware working... is there any useful information that I could extract from the working Ubuntu configuration?

Offline

Board footer

Powered by FluxBB