ogs
ogs

Reputation: 1239

wpa_supplicant Association Failed

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

Answers (3)

AlexBriskin
AlexBriskin

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:

  1. wpa_supplicant launched successfully.
  2. wpa_supplicant started a wireless scan of nearby BSS's (Basic Service Set).
  3. wpa_supplicant found 9 nearby BSS's, one of them is 'HTC'.
  4. wpa_supplicant started an association sequence with 'HTC' on 2437 Mhz frequency i.e. channel 6.

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:

  1. Your AP is a Hotspot with limited number of stations or you are using an inferior AP that doesn't support enough stations.
  2. You tried to connect to very busy Access Point

So, my solutions are:

  1. Try to configure your AP to enable larger number of stations.
  2. Try to connect to different network to see if the problem reproduces.
  3. If your AP configurations are OK and it is not very busy (low number of associated stations), this might be indicative of a problem. You won't be able to connect any new station. I'd suggest AP reboot.

Upvotes: 2

X12koni
X12koni

Reputation: 7

rfkill: Cannot open RFKILL control device

I got the same error message when

  1. forgot to plug in the WiFi dongle
  2. the interface specified in -i flag does not exist.

(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

SHASHI BHUSAN
SHASHI BHUSAN

Reputation: 710

try to give static IP to your board on the same subnet as your phone having.

Upvotes: 0

Related Questions