Reputation: 1239
I would like to connect my linux board to an access point (i.e mobile phone) by using wpa_supplicant.
My mobile phone ap is configured with WPA (AES) security.
I modified the wpa_supplicant.conf as follow :
ctrl_interface=DIR=/var/run/wpa_supplicant
network={
ssid="HTC"
psk="mypasswd"
scan_ssid=1
proto=WPA2
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
priority=5
}
I set to up the mlan0 and launch wpa_supplicant as follow
root@root:~# wpa_supplicant -i mlan0 -c /etc/wpa_supplicant.conf
Successfully initialized wpa_supplicant
root@root:~# rfkill: Cannot open RFKILL control device
[ 2113.867283] IPv6: ADDRCONF(NETDEV_UP): mlan0: link is not ready
[ 2113.999385] wlan: mlan0 START SCAN
mlan0: CTRL-EVENT-SCAN-STARTED
[ 2116.924881] wlan: SCAN COMPLETED: scanned AP count=9
mlan0: Trying to associate with 84:7a:88:50:b0:a7 (SSID='HTC' freq=2437 MHz)
[ 2116.954134] ASSOC_RESP: Association Failed, status code = 17, error = 0x411, a_id = 0x0
[ 2116.962280] IOCTL failed: 9a8db800 id=0x20000, sub_id=0x20001 action=1, status_code=0x4110011
mlan0: CTRL-EVENT-ASSOC-REJECT status_code=1
[ 2117.073403] wlan: mlan0 START SCAN
mlan0: CTRL-EVENT-SCAN-STARTED
...
But connection is never established.
Upvotes: 3
Views: 11172
Reputation: 62
Just from looking at the wpa_supplicant output, it is clear that there are no problems with your interfaces mlan/wlan or your IP, as suggested by other responders.
Just to explain the output:
[ 2113.999385] wlan: mlan0 START SCAN
mlan0: CTRL-EVENT-SCAN-STARTED
[ 2116.924881] wlan: SCAN COMPLETED: scanned AP count=9
mlan0: Trying to associate with 84:7a:88:50:b0:a7 (SSID='HTC' freq=2437 MHz)
The above means that:
So, what went wrong???
[ 2116.954134] ASSOC_RESP: Association Failed, status code = 17, error = 0x411, a_id = 0x0
You got error code 17 - Association denied because AP is unable to handle additional associated stations. Will happen if you run out of AIDs on the AP(Access Point).
One of the bellow is probably true:
So, my solutions are:
Upvotes: 2
Reputation: 7
rfkill: Cannot open RFKILL control device
I got the same error message when
(And maybe it's not "mlan0", it's "wlan0"?)
In the second case, try to modify your command from
wpa_supplicant -i mlan0 -c /etc/wpa_supplicant.conf
to
wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf
Upvotes: 0
Reputation: 710
try to give static IP to your board on the same subnet as your phone having.
Upvotes: 0