Skip to content
Snippets Groups Projects
Commit c6eaf1aa authored by Stefan Schmidt's avatar Stefan Schmidt
Browse files

hostapd: Gateway blueprint WiFi AP configuration

Basic WiFi AP configuration for nl80211 driver with WPA-PSK to avoid
opening up your networking accidentally to everyone.

The appended systemd service file fixes an issue with the upstream one
on the command-line argument ordering. The conf file has to be last or
the service does not start for me.

Fixes: https://git.ostc-eu.org/OSTC/planning/core-os/-/issues/83



Signed-off-by: default avatarStefan Schmidt <stefan.schmidt@huawei.com>
parent 54cd084b
No related branches found
No related tags found
No related merge requests found
# The Wi-Fi interface configured for static IPv4 addresses
# FIXME: the interface name used here is working in our current
# hardware setup for the blueprint, but we need to ensure it will work
# in all cases. Either by link renaming to ensure the correct
# interface name or by passing the correct interface in the service
# file to hostapd on the commandline.
interface=wlan0
# Use the 802.11 Netlink interface driver
driver=nl80211
# The user-defined name of the network
ssid=All Scenarios OS WiFi
# Use the 2.4GHz band
hw_mode=g
# Use channel 6
channel=6
# Enable 802.11n
ieee80211n=1
# Enable WMM
wmm_enabled=1
# Enable 40MHz channels with 20ns guard interval
ht_capab=[HT40][SHORT-GI-20][DSSS_CCK-40]
# Accept all MAC addresses
macaddr_acl=0
# Use WPA authentication
auth_algs=1
# Require clients to know the network name
ignore_broadcast_ssid=0
# Use WPA2
wpa=2
# Use a pre-shared key
wpa_key_mgmt=WPA-PSK
# The network passphrase
wpa_passphrase=12345678
# Use AES, instead of TKIP
rsn_pairwise=CCMP
[Unit]
Description=Hostapd IEEE 802.11 AP, IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator
After=network.target
[Service]
Type=simple
ExecStart=@SBINDIR@/hostapd @SYSCONFDIR@/hostapd.conf
[Install]
WantedBy=multi-user.target
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SRC_URI_append = "file://hostapd.conf \
file://hostapd.service \
"
do_install_append() {
install -m 0644 ${WORKDIR}/hostapd.conf ${D}${sysconfdir}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment