NXP Semiconductors
UM11490
Feature Configuration Guide for NXP-based Wireless Modules on i.MX 8M Quad EVK
2.4.5 Configure WPA2 to connect with the AP using an open source supplicant
This section describes the configuration for wpa_supplicant to configure WPA2 security
and connect with the Access Point.
Edit the configuration
Command to configure WPA2 to connect with the AP for an open source supplicant:
root@imx8mqevk:~# nano /etc/wpa_supplicant.conf
Configuration file content:
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
update_config=1
network={
ssid="NXP_Demo"
key_mgmt=WPA-PSK
psk="123456789"
}
Connect with the AP
Run the following commands to connect the device with the WPA2-based AP:
root@imx8mqevk:~# killall wpa_supplicant
root@imx8mqevk:~# killall hostapd
root@imx8mqevk:~# wpa_supplicant -i mlan0 -Dnl80211 -c /etc/
wpa_supplicant.conf
Command output example:
Successfully initialized wpa_supplicant
rfkill: Cannot open RFKILL control device
[33831.070886] wlan: mlan0 START SCAN
[33835.714782] wlan: SCAN COMPLETED: scanned AP count=19
mlan0: Trying to associate with 44:82:e5:10:2c:38 (SSID='NXP_Demo'
freq=2427 MHz)
[33835.735938] wlan: Connected to bssid 44:XX:XX:XX:2c:38 successfully
mlan0: Associated with 44:82:e5:10:2c:38
mlan0: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
mlan0: CTRL-EVENT-REGDOM-CHANGE init=COUNTRY_IE type=COUNTRY alpha2=IN
mlan0: WPA: Key negotiation compl[33835.760667] IPv6:
ADDRCONF(NETDEV_CHANGE): mlan0: link becomes ready
eted with 44:82:e5:10:2c:38 [PTK=[33835.770113]
woal_cfg80211_set_rekey_data return: gtk_rekey_offload is DISABLE
CCMP GTK=TKIP]
mlan0: CTRL-EVENT-CONNECTED - Connection to 44:82:e5:10:2c:38
completed [id=0 id_str=]
UM11490
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2021. All rights reserved.
User manual
Rev. 2 — 29 January 2021
20 / 88