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).

To configure a ConnectCore 6UL in soft AP mode, the wlan0 entry in the /etc/network/interfaces file needs to be modified to point to the /etc/hostapd.conf configuration file and start/stop the hostapd daemon when the interface is brought up or down.

Digi Embedded Yocto provides a default hostapd.conf file which is part of the hostapd package, and its configuration options are defined here. This file can be customized and overridden on a custom Yocto layer.

For example, a static wlan0 configuration entry configured in softAP mode would be:

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

 The above will configure wlan0 as an access point with the configuration options in /etc/hostapd.conf. 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.conf
ctrl_interface=/var/run/hostapd                                                                                                                                                                                                                                               
ctrl_interface_group=0                                                                                                                                                                                                                                                        
interface=wlan0                                                                                                                                                                                                                                                               
driver=nl80211                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                
# WPA2-AES encryption                                                                                                                                                                                                                                                         
ssid=ap-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                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
# IEEE 802.11d - Country Code                                                                                                                                                                                                                                                 
ieee80211d=1                                                                                                                                                                                                                                                                  
country_code=US

802.11b/g/n WPA2-PSK authentication with CCMP/AES encryption

/etc/hostapd.conf 
ctrl_interface=/var/run/hostapd                                                                                                                                                                                                                                               
ctrl_interface_group=0                                                                                                                                                                                                                                                        
interface=wlan0                                                                                                                                                                                                                                                               
driver=nl80211                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                
# WPA2-AES encryption                                                                                                                                                                                                                                                         
ssid=ap-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                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
# IEEE 802.11d - Country Code                                                                                                                                                                                                                                                 
ieee80211d=1                                                                                                                                                                                                                                                                  
country_code=US