Access point mode
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 soft AP mode by adding a wlan1 entry in the /etc/network/interfaces. The hostapd daemon is started when the interface is brought up and stopped when it is brought down.
Digi Embedded Yocto provides a mechanism to support a different configuration file per wireless interface, allowing you to run multiple hostapd instances at the same time.
The init scrip /etc/init.d/hostapd automatically selects the appropriate configuration file /etc/hostapd_wlanX.conf (where X is the index of the wlan interface) to each interface.
Note The hostapd package provides a default configuration file /etc/hostapd.conf as a reference for the different available settings. This file is not used by Digi Embedded Yocto init scripts.
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:
/etc/network/interfaces
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 init script /etc/init.d/hostapd. This script launches the hostapd daemon using the configuration file /etc/hostapd_wlan1.conf. SoftAP configuration examples are described below.
802.11a/n/ac WPA2-PSK authentication with CCMP/AES encryption
This is the default configuration used by Digi Embedded Yocto.
/etc/hostapd_wlan1.conf
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
/etc/hostapd_wlan1.conf
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