Configure Wi-Fi settings

Digi Embedded Yocto is configured by default to use DHCP to get both wired and wireless IP addresses. While DHCP works well for most devices, you may prefer to set static IP addresses.

The network settings can be directly configured:

Additionally, the following Wi-Fi modes are available to configure:

By default, Digi Embedded Yocto configures wlan0 with client infrastructure mode, leaving the rest of wlan virtual interfaces down. When using concurrent mode, the interface is shared between all functionalities so overall performance is affected.

CAUTION! Maximum performance is achieved on the physical wlan0 when the wireless interface is not shared between multiple functionalities. Digi recommends you always use the physical wlan0 interface and only configure virtual interfaces when using concurrent modes.

Set up network configuration on a running system

To configure the wireless settings in a running system use nmcli command line tool.

Configure static IPs

To configure the static IP for the Wireless interface you can use this nmcli command:

# nmcli con edit wlan0
===| nmcli interactive connection editor |===
Editing existing '802-11-wireless' connection: 'wlan0'
Type 'help' or '?' for available commands.
Type 'describe [<setting>.<prop>]' for detailed property description.
You may edit the following settings: connection, 802-11-wireless (wifi), 802-11-wireless-security (wifi-sec), 802-1x, ipv4, ipv6
nmcli> set wifi.ssid <AP_name>
nmcli> set wifi-sec.key-mgmt <encryption_method>
nmcli> set wifi-sec.psk <password>
nmcli> set ipv4.method manual
nmcli> set ipv4.address 192.168.104.87/16
nmcli> set ipv4.gateway 192.168.104.10
nmcli> set ipv4.dns 8.8.8.8
nmcli> save
nmcli> quit

Restart the wireless interface to make sure it will use the new configuration.

# nmcli con up wlan0

Configure dynamic IP

To configure a dynamic IP, use the following nmcli command on your target.

# nmcli con edit wlan0
===| nmcli interactive connection editor |===
Editing existing '802-11-wireless' connection: 'wlan0'
Type 'help' or '?' for available commands.
Type 'describe [<setting>.<prop>]' for detailed property description.
You may edit the following settings: connection, 802-11-wireless (wifi), 802-11-wireless-security (wifi-sec), 802-1x, ipv4, ipv6
nmcli> set wifi.ssid <AP_name>
nmcli> set wifi-sec.key-mgmt <encryption_method>
nmcli> set wifi-sec.psk <password>
nmcli> set ipv4.method auto
set ipv4.dns
Enter 'dns' value:
nmcli> set ipv4.gateway
Enter 'gateway' value:
nmcli> save
nmcli> quit

Restart the wireless interface to make sure it will use the new configuration.

# nmcli con up wlan0

CAUTION! Digi Embedded Yocto default configuration includes SoftAP mode by adding a wlan1 entry in the /etc/network/interfaces. See Access Point mode.

Set up network configuration from DEY

You can change the default network settings from Digi Embedded Yocto at image-creation time. See Set NetworkManager configuration.

Configure static IPs

To configure static IPs, use the following configuration in your project's conf/local.conf file:

1. Configure the interface mode as static:

WLAN0_MODE = "static"

2. Configure the static IP settings:

WLAN0_STATIC_IP = "<ip address>"
WLAN0_STATIC_NETMASK = "<netmask>"
WLAN0_STATIC_GATEWAY = "<gateway ip address>"
WLAN0_STATIC_DNS = "<dns server ip address>"

where

Configure dynamic IP

To configure a dynamic IP, use the following configuration in your project's conf/local.conf file:

WLAN0_MODE = "dhcp"