WiFi
The phyCORE-AM65x SOM comes equipped with a WiFi module. This guide shows you how to connect and use this interface.
Note
The phyCORE-AM65x cannot boot from an SD card and utilize the WiFi module at the same time as they share the same bus. This guide assumes that you are booting from eMMC. See Flashing and Booting from eMMC for more information.
Set up Software Configuration
In order to be accessible in Linux, the WIFI module needs to be configured in the Linux device tree. PHYTEC has provided a sample device tree overlay which configures the MMC bus to utilize the WiFi module instead of the SD Card slot at X13. To enable this device tree overlay:
The device tree overlay is set in U-Boot.
To enter U-Boot, hit any key within 3 seconds of powering or resetting the board to exit autoboot.
If the board is powered on to begin with you will need to reset the board by pushing the Cold Reset button (S1) or use the following command to power off:
poweroff
Modify the “extra_overlays” variable to point to the sample dtbo: “k3-am65xx-phytec-wlan.dtbo”. The “default_overlays” variable does not need to be changed.
setenv extra_overlays k3-am65xx-phytec-wlan.dtbo saveenv
Now boot into Linux using the following command in U-Boot:
boot
Configure WiFi
A ‘wpa_supplicant’ file must contain the necessary credentials to connect to your network.
vi /etc/wpa_supplicant.conf
Ensure that this file reflects the following contents (replace NETWORKNAME and NETWORKPASSWORD to the corresponding credentials for your target network):
Tip
The vi text editor begins in “Command Mode” and you must first hit the ‘i’ key in order to enter “Insert Mode”. Using the arrow keys to navigate, make the necessary changes and then hit ESC to go back to “Command mode”. Now enter “:wq” to write the file and quit.
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
update_config=1
network={
ssid="NETWORKNAME"
key_mgmt=WPA-PSK
psk="NETWORKPASSWORD"
}
Establish the Connection
Load the credentials from the previous step:
wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant.conf
Launch the WiFi client
udhcpc -i wlan0
Wait until you obtain an IP address.
Test your connection
ping google.comroot@am65xx-phycore-kit:~# ping google.com PING google.com (172.217.14.206): 56 data bytes 64 bytes from 172.217.14.206: seq=0 ttl=53 time=15.934 ms 64 bytes from 172.217.14.206: seq=1 ttl=53 time=16.603 ms 64 bytes from 172.217.14.206: seq=2 ttl=53 time=15.380 ms 64 bytes from 172.217.14.206: seq=3 ttl=53 time=13.408 ms
Enter Ctrl + C to stop pinging.
Revert to the Default Software Configuration
This guide required enabling a device tree overlay that disabled use of the SD Card slot at X13. In order to revert back to the default overlay settings, the following needs to be run in U-Boot:
To enter U-Boot, hit any key within 3 seconds of powering or resetting the board to exit autoboot.
To revert back to the original device tree (which would again disable WiFi), enter the following command in U-Boot:
env default -f -a saveenv
Now use this command to boot into Linux with the original device tree enabled (no WiFi):
boot