WiFi
This guide will show you how to use the WIFI interface on the phyCORE-i.MX8X development kit carrier board.
Note
To use the WIFI interface on the development kit you must boot from eMMC. See this eMMC guide for more information.
The kit switch configurations do not allow WIFI connectivity while being booted from an SD card because they share the same bus.
Hardware and Software Setup
Configure WiFi
Open the “wpa_supplicant” file to add your network credentials.
Edit the file to match the contents below but be sure to change “<your_network_name>” and “<your_network_password>” to the corresponding credentials for your target network. Make sure keep the quotes.
vi /etc/wpa_supplicant.conf
Tip
Hit ‘i’ key to enter “Insert Mode”. Using the arrow keys to navigate. ESC to go back to “Command mode”. Now enter “:wq” to write (save) the file and quit. More information about the editor can be found here: https://www.guru99.com/the-vi-editor.html
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
update_config=1
network={
ssid="<your_network_name>"
key_mgmt=WPA-PSK
psk="<your_network_password>"
}
Establish the Connection
Load the credentials from the wpa_supplicant.conf file and establish the link.
wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf -B
Successfully initialized wpa_supplicant [ 127.580778] ieee80211 phy0: brcmf_cfg80211_add_iface: iface validation failed: err=-16 Failed to create interface p2p-dev-wlan0: -16 (Device or resource busy) nl80211: Failed to create a P2P Device interface p2p-dev-wlan0 P2P: Failed to enable P2P Device interface root@imx8x-phycore-kit:~# [ 128.906744] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
Confirm wlan0 is connected to the network.
iw dev wlan0 link
Connected to b0:b9:8a:5c:15:dc (on wlan0) SSID: <your_network_name> freq: 2422 RX: 4442 bytes (13 packets) TX: 4330 bytes (24 packets) signal: -72 dBm rx bitrate: 1.0 MBit/s tx bitrate: 11.0 MBit/s bss flags: short-preamble short-slot-time dtim period: 2 beacon int: 200
Verify that WIFI is unblocked.
rfkill unblock 0 rfkill list
0: phy0: Wireless LAN Soft blocked: no Hard blocked: no
Launch the WIFI client.
udhcpc -i wlan0
udhcpc: started, v1.31.0 udhcpc: sending discover udhcpc: sending select for <obtained_ip_address> udhcpc: lease of <obtained_ip_address> obtained, lease time 604800 /etc/udhcpc.d/50default: Adding DNS <DNS_ip_address>
Verify that the “/etc/resolv.conf” file has your local nameserver ip address set.
vi /etc/resolv.conf
# Generated by Connection Manager nameserver <DNS_ip_address>
Test your connection
ping www.google.com -c 5
PING google.com (142.250.69.206) 56(84) bytes of data. 64 bytes from sea30s08-in-f14.1e100.net (142.250.69.206): icmp_seq=1 ttl=116 time=15.3 ms 64 bytes from sea30s08-in-f14.1e100.net (142.250.69.206): icmp_seq=2 ttl=116 time=28.1 ms 64 bytes from sea30s08-in-f14.1e100.net (142.250.69.206): icmp_seq=3 ttl=116 time=29.7 ms 64 bytes from sea30s08-in-f14.1e100.net (142.250.69.206): icmp_seq=4 ttl=116 time=26.9 ms 64 bytes from sea30s08-in-f14.1e100.net (142.250.69.206): icmp_seq=5 ttl=116 time=13.3 ms --- google.com ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 4006ms rtt min/avg/max/mdev = 13.339/22.677/29.674/6.889 ms
Note
If the nameserver is not automatically generated you will need to use the ip address of the website/network location you are trying to reach.