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 /etc/init.d/hostapd init script automatically selects the appropriate configuration file /etc/hostapd_wlanX.conf (where X is the index of the wlan interface) 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 /etc/init.d/hostapd start
pre-down /etc/init.d/hostapd stop
This configures wlan1 to run the /etc/init.d/hostapd init script.
This script 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.11b/g/n WPA2-PSK authentication with CCMP/AES encryption
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
interface=wlan1
driver=nl80211
# WPA2-AES encryption
ssid=ap-wlan1-wpa2aes-n
auth_algs=1
wpa=2
wpa_key_mgmt=WPA-PSK
wpa_pairwise=CCMP
wpa_passphrase=password-wpa2aes
# IEEE 802.11n auto channel
hw_mode=g
channel=10
ieee80211n=1
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.
The WLAN firmware is responsible for scanning the environment and selecting the operating channel based on the configuration provided in the firmware configuration file.
Enable and configure ACS
On QCA6564, the WLAN firmware is responsible for scanning the environment and automatically selecting the most convenient channel to operate on, basing on the firmware configuration file /lib/firmware/wlan/qcom_cfg.ini.
You can enable and configure ACS through the firmware configuration file /lib/firmware/wlan/qcom_cfg.ini, as in the following example:
# SAP auto channel selection configuration
# 0 = disable auto channel selection
# 1 = enable auto channel selection (channel provided by hostapd is ignored)
gApAutoChannelSelection=1
# SOFTAP Channel Range selection
# Defines the channel range used by ACS
gAPChannelSelectStartChannel=1
gAPChannelSelectEndChannel=11
After updating the configuration file, reboot the system to ensure the new firmware parameters are applied.
When ACS is enabled at firmware level, any ACS-related configuration in hostapd (for example channel=0 or chanlist) is ignored.
The operating channel is selected exclusively by the WLAN firmware.
|
ACS channel selection is limited to a continuous channel range defined by gAPChannelSelectStartChannel and gAPChannelSelectEndChannel.
It is not possible to exclude individual channels within the selected range.