You are here: Digi Embedded Yocto > System development > Linux v4.1 Board Support Package > Devices and interfaces > Wireless > Network configuration > Configure wireless network settings

Configure wireless network settings

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

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

Set network configuration in a running system

To configure wireless interface settings in a running system you must modify the /etc/network/interfaces file accordingly:

  1. Stop the interface to configure:
#> ifdown wlan0
  1. Edit /etc/network/interfaces:
  2. Configure the wpa-supplicant.

The default wireless configuration file /etc/wpa_supplicant.conf lets the device connect to any open access point. To connect to a secure access point, edit /etc/wpa_supplicant.conf and configure the settings of your wireless network, such as the SSID of the access point, encryption, and authentication.

  1. Synchronize data on disk.
  2. #> sync
  1. Restart the configured interface to use the new settings:
  2. #> ifup wlan0

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

Set network configuration from DEY

You can change the default network settings from Digi Embedded Yocto at image creation time. You configure this in your project's conf/local.conf file:

Configure static IPs

To configure static IPs, you can use the following configuration in your conf/local.conf file:

  1. Configure the interface mode as static:
  2. WLAN0_MODE = "static"
  1. Configure the static IPs.
  2. By default, when setting static IPs, Digi Embedded Yocto images are configured with the following static IPs:

    WLAN0_STATIC_IP ?= "192.168.43.30"

    To change these default values, use the following variables:

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

Configure dynamic IP

To configure a dynamic IP, use the following configuration:

WLAN0_MODE = "dhcp"

 

© 2017 Digi International Inc. All rights reserved.
Configure wireless network settings updated on 19 June 2017 12:19:43 PM