Using M.2 WiFi in Linux

This application note shows how to implement a WiFi client with the STM32H7 running Linux. The functionality described below is available from the rootfs.uImage project provided by Emcraft for the STM32H7 SOM soldered onto the STM32H7-BSB Rev 4A baseboard.

Emcraft tested the functionality documented below using the 2AE M.2 Embedded Artist module. If you are using some different M.2 WiFi module, then it may require enabling/porting/implementing the appropriate device drivers in the Linux kernel and/or addition of the appropriate firmware to the initramfs file system.

Plug-in the M.2 WiFi module to the J11 connector on the STM32H7-BSB Rev 4A baseboard, then power on the board and let the Linux boot.

Start wpa_supplicant to be able to connect to WiFi access points:

/ # wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf -B Successfully initialized wpa_supplicant rfkill: Cannot open RFKILL control device / #

Scan for available WiFi access points:

/ # wpa_cli -i wlan0 scan OK / # wpa_cli -i wlan0 scan_results bssid / frequency / signal level / flags / ssid 14:59:c0:8d:73:25 2417 -30 [WPA2-PSK-CCMP][ESS] NETGEAR13 ... / #

Connect to the access point of your choice and proceed with creating a new wireless network.