Digi Embedded Yocto uses the hostapd package to manage the software access point (SoftAP) mode.
When configured in this mode, client stations can connect to the device to communicate with other stations on the same Basic Service Set (BSS).
The default configuration includes SoftAP mode by adding a wlan1 entry in /etc/network/interfaces.
The hostapd daemon is started when the interface is brought up and stopped when it is brought down.
Enable Access Point mode
Manually enable wlan1
The wlan1 interface is disabled by default to improve the performance of the wlan0 interface in client infrastructure mode.
You can bring it up manually with the following command:
# ifup wlan1
Enable automatic bring-up
You can also enable automatic bring-up by uncommenting the "auto wlan1" line in /etc/network/interfaces.
Digi Embedded Yocto provides a mechanism to support a different configuration file per Wi-Fi interface, allowing you to run multiple hostapd instances at the same time.
The hostapd@.service systemd service automatically selects the appropriate configuration file /etc/hostapd_X.conf (where X is the interface that is passed to the service) for each interface.
|
The hostapd package provides a default configuration file See http://w1.fi/cgit/hostap/tree/hostapd/hostapd.conf for a reference of all hostapd configuration options. |
For example, a static wlan1 configuration entry configured in SoftAP mode would be:
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
This configures wlan1 to run the hostapd@wlan1.service systemd service.
This service launches the hostapd daemon using the configuration file /etc/hostapd_wlan1.conf.
SoftAP configuration examples
802.11a/n/ac WPA2-PSK authentication with CCMP/AES encryption
This is the default configuration used by Digi Embedded Yocto.
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
interface=wlan1
driver=nl80211
# WPA2-AES encryption
ssid=ap-wlan1-wpa2aes-a
auth_algs=1
wpa=2
wpa_key_mgmt=WPA-PSK
wpa_pairwise=CCMP
wpa_passphrase=password-wpa2aes
# IEEE 802.11ac channel 36
hw_mode=a
channel=36
ieee80211ac=1
ieee80211n=1
802.11ax mixed WPA2-AES/WPA3-SAE authentication
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
interface=wlan1
driver=nl80211
# SSID to identify the network
ssid=ap-wlan1-9983
# 802.11a (5 GHz) mode
hw_mode=a
# Specify the channel to use. If 0 (ACS), channel will be automatically selected
channel=44
# IEEE 802.11i, mixed WPA2-AES/WPA3-SAE encryption
auth_algs=1
wpa=2
wpa_key_mgmt=WPA-PSK SAE
wpa_pairwise=CCMP
wpa_passphrase=password-wpa2aes
sae_password=password-wpa3sae
# IEEE 802.11n (Wi-Fi 4) features
ieee80211n=1
ht_capab=[HT20][HT40+][HT40-][SHORT-GI-20][SHORT-GI-40]
# IEEE 802.11ac (Wi-Fi 5) features
ieee80211ac=1
vht_oper_chwidth=0
vht_capab=[SHORT-GI-80]
# IEEE 802.11ax (Wi-Fi 6) features
ieee80211ax=1
he_su_beamformer=1
he_su_beamformee=1
802.11ax only WPA3-SAE authentication
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
interface=wlan1
driver=nl80211
# SSID to identify the network
ssid=ap-wlan1-9983
# 802.11a (5 GHz) mode
hw_mode=a
# Set the channel to use. If 0 (ACS), channel will be automatically selected
channel=44
# IEEE 802.11i, only WPA3 encryption with SAE authentication
ieee80211w=2
rsn_pairwise=CCMP
wpa_key_mgmt=SAE
wpa_passphrase=password-wpa3only
# IEEE 802.11n (Wi-Fi 4) features
ieee80211n=1
ht_capab=[HT20][HT40+][HT40-][SHORT-GI-20][SHORT-GI-40]
# IEEE 802.11ac (Wi-Fi 5) features
ieee80211ac=1
vht_oper_chwidth=0
vht_capab=[SHORT-GI-80]
# IEEE 802.11ax (Wi-Fi 6) features
ieee80211ax=1
he_su_beamformer=1
he_su_beamformee=1
Wifi 6E (6 GHz network) only WPA3-SAE authentication
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
interface=wlan1
driver=nl80211
# SSID to identify the network
ssid=ap-wlan1-9983
# IEEE 802.11ax (HE) on 6 GHz
hw_mode=a
# Set the channel from 6 GHz band to use.
channel=21
# IEEE 802.11w, only WPA3-Personal encryption with SAE authentication
auth_algs=1
wpa=2
wpa_key_mgmt=SAE
rsn_pairwise=CCMP
sae_pwe=2
sae_password=password
# Management Frame Protection (MFP)
ieee80211w=2
# IEEE 802.11ax (HE) is enabled
ieee80211ax=1
# Operating Class, 131 = 20 MHz channel width
op_class=131
# Fix 6 GHz HE Antenna Pattern capabilities
he_6ghz_rx_ant_pat=0
he_6ghz_tx_ant_pat=0
Automatic Channel Selection (ACS)
ACS (Automatic Channel Selection) automatically selects the best Wi-Fi channel for an Access Point based on the detected RF environment.