WiFi ===== This guide will show you how to use the WIFI interface on the phyCORE-i.MX8X development kit carrier board. .. image:: ../../images/phycore-imx8x/pcm-065_wifi.webp :width: 800px .. note:: To use the WIFI interface on the development kit you must boot from eMMC. See this :ref:`flasheMMC-8x` 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 ----------------------------- * Make sure switch S8 is set to WIFI. * Make sure switch S10 is set to boot from eMMC. .. image:: ../../images/phycore-imx8x/pcm-065_emmc-bootswitch.webp :width: 500px * Power on the development kit and stop in Barebox. You need to configure the WIFI device tree overlay before booting into Linux. .. code-block:: none :caption: Target (U-Boot) setenv overlay_files phytec-imx8qxp-wifi.dtbo boot 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 "" and "" to the corresponding credentials for your target network. Make sure keep the quotes. .. code-block:: none :caption: Target (Linux) 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 .. code-block:: none :caption: wpa_supplicant.conf ctrl_interface=/var/run/wpa_supplicant ctrl_interface_group=0 update_config=1 network={ ssid="" key_mgmt=WPA-PSK psk="" } Establish the Connection -------------------------- * Load the credentials from the wpa_supplicant.conf file and establish the link. .. code-block:: none :caption: Target (Linux) wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf -B .. code-block:: none :caption: Expected Output 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. .. code-block:: none :caption: Target (Linux) iw dev wlan0 link .. code-block:: none :caption: Expected Output Connected to b0:b9:8a:5c:15:dc (on wlan0) SSID: 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. .. code-block:: none :caption: Target (Linux) rfkill unblock 0 rfkill list .. code-block:: none :caption: Expected Output 0: phy0: Wireless LAN Soft blocked: no Hard blocked: no * Launch the WIFI client. .. code-block:: none :caption: Target (Linux) udhcpc -i wlan0 .. code-block:: none :caption: Expected Output udhcpc: started, v1.31.0 udhcpc: sending discover udhcpc: sending select for udhcpc: lease of obtained, lease time 604800 /etc/udhcpc.d/50default: Adding DNS * Verify that the "/etc/resolv.conf" file has your local nameserver ip address set. .. code-block:: none :caption: Target (Linux) vi /etc/resolv.conf .. code-block:: none :caption: Expected Output # Generated by Connection Manager nameserver * Test your connection .. code-block:: none :caption: Target (Linux) ping www.google.com -c 5 .. code-block:: none :caption: Expected Output 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.