I am working on a device without NetworkManager or other niceties and am trying to connect to a WPA2 network.
For some reason, wpa_supplicant fails to associate properly to all the networks I have tried. (Example log below.)
Can somebody identify the issue from the output? If not, how do I go about diagnosing the issue?
EDIT 1:
I realised that I can provoke this behaviour on another machine when wpa_supplicant
is successfully connected to a AP and I run scan
in wpa_cli
. Even after the scan completes, the running wpa_supplicant
session stays locked in the loop shown below.
[root@device root]# wpa_passphrase "FRITZ!Box Fon WLAN 7270" >> /tmp/wpa_supplicant.conf
[root@device root]# cat /tmp/wpa_supplicantWorking.conf
ctrl_interface=/var/run/wpa_supplicant
ap_scan=1
update_config=1
# reading passphrase from stdin
network={
ssid="FRITZ!Box Fon WLAN 7270"
#psk="mypassword"
psk=5a6... snip ...a9
}
[root@device root]# wpa_supplicant -D ar6000 -i wlan0 -c /tmp/wpa_supplicant.conf -P /var/run/wpa_supplicant.wlan0.pid
drivers - ar6000 ?= ar6000
Starting AP scan (SSID: broadcast)
Wireless event: SCAN_RESULTS: Success
Trying to associate with xx:xx:xx:xx:c3:ae (SSID='FRITZ!Box Fon WLAN 7270' freq=2412 MHz signal=-43) reassociate=0 oldSSID=''
Associated to current bssid. Treating as disconnect
CTRL-EVENT-DISCONNECTED - netId=0 reason=DISC_REQUESTED BSSID=bc:05:43:8f:c3:ae
CTRL-EVENT-DISCONNECTED - netId=-1 reason=DISC_REQUESTED BSSID=00:00:00:00:00:00
Starting AP scan (SSID: broadcast)
Wireless event: SCAN_RESULTS: Success
Trying to associate with xx:xx:xx:xx:c3:ae (SSID='FRITZ!Box Fon WLAN 7270' freq=2412 MHz signal=-47) reassociate=0 oldSSID=''
Associated with xx:xx:xx:xx:c3:ae
CTRL-EVENT-DISCONNECTED - netId=0 reason=DISC_REQUESTED BSSID=bc:05:43:8f:c3:ae
Starting AP scan (SSID: broadcast)
Wireless event: SCAN_RESULTS: Success
Trying to associate with xx:xx:xx:xx:c3:ae (SSID='FRITZ!Box Fon WLAN 7270' freq=2412 MHz signal=-47) reassociate=0 oldSSID=''
Associated with xx:xx:xx:xx:c3:ae
CTRL-EVENT-DISCONNECTED - netId=0 reason=DISC_REQUESTED BSSID=bc:05:43:8f:c3:ae
Starting AP scan (SSID: broadcast)
Wireless event: SCAN_RESULTS: Success
Trying to associate with xx:xx:xx:xx:c3:ae (SSID='FRITZ!Box Fon WLAN 7270' freq=2412 MHz signal=-46) reassociate=0 oldSSID=''
Associated with xx:xx:xx:xx:c3:ae
CTRL-EVENT-DISCONNECTED - netId=0 reason=DISC_REQUESTED BSSID=bc:05:43:8f:c3:ae
Starting AP scan (SSID: broadcast)
Wireless event: SCAN_RESULTS: Success
Trying to associate with xx:xx:xx:xx:c3:ae (SSID='FRITZ!Box Fon WLAN 7270' freq=2412 MHz signal=-46) reassociate=0 oldSSID=''
Associated to current bssid. Treating as disconnect
CTRL-EVENT-DISCONNECTED - netId=0 reason=DISC_REQUESTED BSSID=bc:05:43:8f:c3:ae
CTRL-EVENT-DISCONNECTED - netId=-1 reason=DISC_REQUESTED BSSID=00:00:00:00:00:00
Starting AP scan (SSID: broadcast)
Wireless event: SCAN_RESULTS: Success
Trying to associate with xx:xx:xx:xx:c3:ae (SSID='FRITZ!Box Fon WLAN 7270' freq=2412 MHz signal=-47) reassociate=0 oldSSID=''
Associated with xx:xx:xx:xx:c3:ae
CTRL-EVENT-DISCONNECTED - netId=0 reason=DISC_REQUESTED BSSID=bc:05:43:8f:c3:ae
Starting AP scan (SSID: broadcast)
Wireless event: SCAN_RESULTS: Success
Trying to associate with xx:xx:xx:xx:c3:ae (SSID='FRITZ!Box Fon WLAN 7270' freq=2412 MHz signal=-48) reassociate=0 oldSSID=''
Associated to current bssid. Treating as disconnect
CTRL-EVENT-DISCONNECTED - netId=0 reason=DISC_REQUESTED BSSID=bc:05:43:8f:c3:ae
CTRL-EVENT-DISCONNECTED - netId=-1 reason=DISC_REQUESTED BSSID=00:00:00:00:00:00
Starting AP scan (SSID: broadcast)
Wireless event: SCAN_RESULTS: Success
dhcpcd
running for that interface?/etc/network/interfaces
, but I am currently starting things (driver, wpa_supplicant, etc) by hand. How do you think this influences wpa_supplicant?