The Yocto Project on Raspberry Pi 5 Episode 8: Connecting to Wi-Fi with ConnMan Network Manager
ConnMan (short for Connection Manager) is an open-source, command-line network manager tailored for embedded Linux devices. It focuses on fast connection handling and low-latency resolution times, making it especially suitable for resource-constrained environments such as IoT gateways, development boards, and automotive systems. Unlike heavier alternatives such as NetworkManager, ConnMan is designed with a small footprint and minimal dependencies, which allows it to run efficiently on systems with limited memory and storage.
First released in 2008, ConnMan is written in C, licensed under the GNU GPL, and its source code is hosted on kernel.org. It was originally developed by Intel Open Source Technology Center with the goal of providing a modular, lightweight, and extensible framework for managing various types of network connections. ConnMan supports a wide range of networking technologies, including Ethernet and Wi-Fi.
Episode 8 of my Yocto Project and OpenEmbedded tutorial series shows how to add ConnMan to core-image-base and use it to scan for and connect to a Wi-Fi network on the Raspberry Pi 5.
Using ConnMan
1. Bring up the Wi-Fi interface wlan0:
rfkill unblock wifi
ip link set wlan0 up
2. Start the ConnMan CLI:
connmanctl
3. Enable Wi-Fi:
technologies
enable wifi
4. Scan for available Wi-Fi networks:
scan wifi
5. List discovered networks (note the service name like wifi_[MAC_ADDR]_[SSID_HEX]_managed_psk):
services
6. Turn on the agent (to handle prompts like passwords):
To bring up the Wi-Fi interface automatically at boot on embedded Linux distributions that use systemd, create the file /etc/systemd/network/10-wlan0.network with the following content: