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.
try to give static IP to your board on the same subnet as your phone having.