Configure Wi-Fi settings

Note This section contains Linux BSP documentation for kernel v4.1. Click here for v4.9 BSP documentation.

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.

You can configure network settings from Linux directly in a running system, or you can configure Digi Embedded Yocto to use your preferred networking setup for the generated images.

Set up network configuration on a running system

To configure the wireless setting in a running system, modify the /etc/NetworkManager/system-connections/nm.wlanX file (where X is the interface index starting at 0) or use nmcli.

For example, edit the configuration file:

[connection]
id=wlan0
type=wifi
interface-name=wlan0
 
[wifi]
ssid=
 
[wifi-security]
key-mgmt=
pairwise=
proto=
 
[ipv4]
method=

Or use the command line tool nmcli:

# 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> save
nmcli> quit

Once you have made these configuration changes, you must restart the interface. You can either restart the NetworkManager itself, which will restart all the interfaces managed by NetworkManager:

# /etc/init.d/networkmanager restart

or you can restart the interface whose configuration has changed:

# nmcli con load /etc/NetworkManager/system-connections/<file_name>
# nmcli dev disconnect wlan0
# nmcli dev connect wlan0

CAUTION! 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:

WLAN0_MODE = "dhcp"

 

© 2018 Digi International Inc. All rights reserved.
Configure Wi-Fi settings updated on 22 January 2018 02:43:37 PM