-
Notifications
You must be signed in to change notification settings - Fork 0
Feature Guides Wireless Configuration
Alex J Lennon edited this page Oct 5, 2025
·
1 revision
This document explains how to add a default WiFi connection to your image for testing purposes without committing sensitive credentials to the repository.
Copy the example configuration and customize it with your network details:
cd recipes-support/default-network-manager/default-network-manager/
cp wifi-config.local.example wifi-config.local
Edit wifi-config.local
(this file is git-ignored):
# Example WiFi configuration for local testing
WIFI_SSID="YourTestNetwork"
WIFI_PASSWORD="YourPassword"
WIFI_CONNECTION_NAME="test-wifi"
# Optional: Priority (higher number = higher priority)
WIFI_PRIORITY="10"
# Optional: Auto-connect on boot
WIFI_AUTOCONNECT="yes"
Build your image as usual. The WiFi connection will be automatically configured on first boot.
-
Package Installation: The
default-network-manager
package is included in the eink image - First Boot Service: A systemd service runs once on first boot to set up network connections
-
Local Configuration: The service looks for
wifi-config.local
and creates an nmcli connection - Auto-Disable: The service disables itself after running once
On first boot, you'll see log messages like:
Found local WiFi configuration, setting up connection...
Creating WiFi connection 'test-wifi' for SSID 'YourTestNetwork'...
WiFi connection 'test-wifi' created successfully
Attempting to connect...
You can also test the script manually after boot:
# SSH into your device and run:
/usr/bin/setup-default-connections.sh
systemctl status setup-default-connections.service
journalctl -u setup-default-connections.service
# List connections
nmcli con show
# Check WiFi status
nmcli dev wifi
# Connect manually
nmcli con up test-wifi
nmcli con delete test-wifi
- The
wifi-config.local
file is added to.gitignore
and will not be committed - WiFi passwords are stored in NetworkManager's connection files on the target device
- This is intended for development/testing only, not production deployment
You can also set WiFi credentials via environment variables in your build system:
export TEST_WIFI_SSID="YourNetwork"
export TEST_WIFI_PASSWORD="YourPassword"
# Then modify the script to use these if wifi-config.local doesn't exist
For production, consider:
- Using NetworkManager's keyfile format with proper permissions
- Implementing a proper onboarding/provisioning system
- Using WPA Enterprise with certificates instead of PSK