Show Contents

# 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:

- From Linux, in a running system.
- In Digi Embedded Yocto, to use your preferred networking setup for the generated images.

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

- Client infrastructure mode
- Access point mode
- Wi-Fi direct
- Concurrent modes

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

- WLAN0_STATIC_IP is the static IP address for wlan0 interface.
- WLAN0_STATIC_NETMASK is the netmask address for wlan0 interface.
- WLAN0_STATIC_GATEWAY is the default gateway address.
- WLAN0_STATIC_DNS is the name resolution server IP address. You can add several servers as a space-separated list. Note that if different interfaces define DNS entries, the target's /etc/resolv.conf file uses the last entry defined.

### Configure dynamic IP

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

    WLAN0_MODE = "dhcp"

© 2018 Digi International Inc. All rights reserved.
Configure Wi-Fi settings updated on 24 January 2018 10:28:55 AM