Concurrent mode shares the Wi-Fi interface between multiple functionalities — for example station, access point, and Wi-Fi Direct — using different virtual interfaces for each. By default, Digi Embedded Yocto configures the Wi-Fi interface in client infrastructure mode. Refer to Access point mode or Wi-Fi Direct to enable that interface.

Maximum performance is achieved on the physical wlan0 when the Wi-Fi 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.
Digi programs one MAC address for the Wi-Fi interface during manufacturing of the SOM. This MAC address is stored in the Wi-Fi chip OTP bits, and read from there at the initialization process. A copy of this MAC address is saved in U-Boot environment variable wlanaddr. This is the MAC address used for the wlan0 interface.

Inspecting valid combinations

To determine the supported modes and combinations (STA, AP, P2P, AP+P2P, etc), run the iw phy command.

# iw phy
.....
        valid interface combinations:
                 * #{ managed, AP, monitor, P2P-client, P2P-GO } <= 4,
                   total <= 4, #channels <= 1
                 * #{ managed } <= 2, #{ P2P-device } <= 1, #{ P2P-client, P2P-GO } <= 1,
                   total <= 3, #channels <= 2

In this generic example:

  • Combination 1 can work simultaneously with up to four interfaces as STA, AP or P2P; additionally, those interfaces are restricted to work in the same channel.

  • Combination 2 can work simultaneously with up to two STA interfaces plus one P2P interface, and they can work in different channels.

Multi client station

You can configure the ConnectCore MP13 as two simultaneous client stations in infrastructure mode: one Wi-Fi interface connected to an access point and another Wi-Fi interface connected to a different access point.

NetworkManager cannot manage access points, so DEY configures it not to manage wlan1 by default. Create the virtual interface wlan1 with the following command:

# iw dev wlan0 interface add wlan1 type managed

Create a new configuration file /etc/wpa_supplicant_wlan1.conf for the second Wi-Fi interface. To create the file, use the following command and add the necessary information.

# vi /etc/wpa_supplicant_wlan1.conf
/etc/wpa_supplicant_wlan1.conf
ctrl_interface=/var/run/wpa_supplicant
update_config=1

network={
        ssid="SSID"
        scan_ssid=1
        key_mgmt=WPA-PSK
        psk="PASSWORD"
}

Now configure the interface to load the configuration file. To do so, modify the /etc/network/interfaces with the information of the wlan1 interface.

# vi /etc/network/interfaces
/etc/network/interfaces
auto wlan1
iface wlan1 inet static
        address 192.168.46.30
        netmask 255.255.255.0
        wpa-driver nl80211
        wpa-conf /etc/wpa_supplicant_wlan1.conf

Now bring the interface up to load the configuration. Reboot the system to load the new configuration.

# ifup wlan1

This causes the second Wi-Fi interface to connect to the AP specified in the wpa_suplicant_wlan1 file.

Multi access point

You can configure the ConnectCore MP13 as two simultaneous access points working on the same band. To do this, you must disable the default STA behavior of wlan0. Bring the interface down with:

# nmcli con down wlan0

Since NetworkManager cannot manage access points, you must configure it not to manage wlan0, which will now work as another access point.

Add wlan0 to the list of unmanaged-devices in the configuration file /etc/NetworkManager/NetworkManager.conf. After the change, the file will look like this:

[main]
plugins=ifupdown,keyfile
no-auto-default=type:ethernet

[ifupdown]
managed=false

[keyfile]
unmanaged-devices=interface-name:p2p*;interface-name:wlan1;interface-name:wlan0

Now configure the /etc/network/interfaces file as follows:

  • Configure wlan0 to work as access point, with a static IP.

  • Assign a second post-up service to launch the hostapd instance. Make sure to pass the correct interface name to the service; in this case, it should be hostapd@wlan0.service.

  • Assign one pre-down service to stop the hostapd instance.

/etc/network/interfaces
auto wlan0
iface wlan0 inet static
address 192.168.43.30
netmask 255.255.255.0
post-up systemctl start hostapd@wlan0.service
pre-down systemctl stop hostapd@wlan0.service

auto wlan1
iface wlan1 inet static
address 192.168.46.30
netmask 255.255.255.0
post-up systemctl start hostapd@wlan1.service
pre-down systemctl stop hostapd@wlan1.service

Bring up the wlan0 and wlan1 interfaces:

# ifup wlan0
# ifup wlan1