Client infrastructure mode

Digi Embedded Yocto uses the NetworkManager software package to manage any kind of wireless configuration on a wireless network. When the wireless interface is brought up NetworkManager will read the /etc/NetworkManager/system-connections/nm-wlan0 configuration file and will apply the corresponding actions for the wireless interface. The NetworkManager configuration is kept in /etc/NetworkManager/NetworkManager.conf, and the interface configuration is kept at /etc/NetworkManager/system-connections

By default Digi Embedded Yocto configures NetworkManager to use the wireless interface in client infrastructure mode without open authentication, no encryption and no SSID. In this mode NetworkManager will not connect to any access point (AP).

Digi Embedded Yocto provides a default nm-wlan0 file which is part of the networkmanager package. This file can be customized and overridden on a custom Yocto layer or during system run time.

Configuring the NetworkManager

The nmcli is a command line tool which allows the user to interact with NetworkManager. You can use the nmcli tool to establish a manual connection for different authentication and encryption configurations.

To show information on the command line tool parameters, call nmcli without a parameter. 

You can use nmcli's edit or modify sub-commands to do any configuration or else change the configuration file itself and then restart the interface to use the new setup. The following examples show different configurations of the wireless interface using either the configuration file or the command line interface.

Open authentication and no encryption

Via configuration file

[connection]
...
 
[wifi]
ssid=<AP_name>
mac-address-blacklist=
seen-bssids=
 
[ipv4]
dns-search=
method=auto
...

Via command line interface

~# 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 (wi6
nmcli> set wifi.ssid <AP_name>
nmcli> save
nmcli> quit

In both cases, to load the new configuration file and tell NetworkManager to connect to that access point execute the following commands in the console.

~# nmcli con load /etc/NetworkManager/system-connections/nm.wlan0
~# nmcli dev disconnect wlan0
~# nmcli dev connect wlan0

The disconnect command might only be necessary if the wireless interface had previously been connected to a different AP. 

WPA2-PSK authentication with AES-CCMP encryption

Via configuration file

[connection]
...
 
[wifi]
ssid=<AP_name>
mac-address-blacklist=
seen-bssids=
 
[wifi-security]
key-mgmt=wpa-psk
group=
pairwise=
proto=
psk=<AP_passphrase>
...

Via command line interface

~# 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 (wi6
nmcli> set wifi.ssid <AP_name>
nmcli> set wifi-sec.key-mgmt wpa-psk
nmcli> set wifi-sec.psk <AP_passphrase>
nmcli> remove wifi-sec.group
nmcli> remove wifi-sec.proto
nmcli> remove wifi-sec.pairwise
nmcli> save
nmcli> quit

In both cases, to load the new configuration file and tell NetworkManager to connect to that access point execute the following commands in the console.

~# nmcli con load /etc/NetworkManager/system-connections/nm.wlan0
~# nmcli dev disconnect wlan0
~# nmcli dev connect wlan0

The disconnect command might only be necessary if the wireless interface had previously been connected to a different AP.

By keeping the proto and the pairwise parameters empty, NetworkManager is able to resolve the authentication and encryption combination used by the access point. This way, you can use the same configuration to connect to an access point with any of the following encryption combinations:

  • WPA-PSK authentication with TKIP encryption

  • WPA-PSK authentication with CCMP/AES encryption

  • WPA2-PSK authentication with TKIP encryption

Fast roaming (802.11r)

Roaming in the context of 802.11 wireless networks occurs when a client with an established association to an access point (AP) migrates the connection within the same Extended Service Set (ESS) to another AP within an area of overlapping coverage. The fast roaming (802.11r) standard introduces a fast transition mechanism which performs the handshake with the new access point before the roaming starts, allowing the client and AP to perform the Pairwise Transient Key (PTK) calculation in advance. This allows fast transitions without reauthentication, and reduces handshaking overheads while providing security and Quality of Service.

The wireless chip on the ConnectCore 6 Plus supports the fast roaming standard. To make use of it you need a group of access points that support the 802.11r mechanisms for fast roaming, and you need to configure them as a Mobility Domain so that they can coordinate to exchange client station details and perform pre-authentication with the clients prior to the roam.

You can customize the transition between the different access points that compound the wireless infrastructure by tweaking the transition threshold values. These threshold values are saved in the configuration file /lib/firmware/wlan/qcom_cfg.ini:

  • gNeighborLookupThreshold: When the signal of the current Wi-Fi connection is weaker than this dBm value, the wireless chip performs a background scan to see if there are access points with a better signal.

  • gNeighborReassocThreshold: When the signal of the current Wi-Fi connection is weaker than this dBm value and there is another access point with a better signal, the wireless chip connects to that alternate access point.

You can decrease these threshold values to switch to a better quality access point before the signal of your current connection degrades too much:

gNeighborLookupThreshold=66
gNeighborReassocThreshold=71