How do I configure AP-Sta mode using nmcli?

Answer

An Ezurio Wi-Fi module can be configured for AP-Sta mode with the following nmcli commands:

  • iw dev wlan0 interface add wlan1 type __ap
  • nmcli con add con-name myap ifname wlan1 type wifi ssid myapssid autoconnect yes 802.11-wireless.mode ap ipv4.method shared
  • nmcli con add con-name mysta ifname wlan0 type wifi ssid mystassid

This is assumes that you have the iw and dnsmasq packages installed in your build.

Note: In the above configuration, the Access Point will follow the channel that the station associates to. Therefore it is reccomended that the client is configured to use a 2.4 GHz channel or the U-NII-1 channels in the 5 GHz band as the Ezurio radios will not work as DFS masters and do not support AP mode in the rest for the 5 GHz channels nor in the 6 GHz band.>