diff --git a/meta-ohos-blueprints/recipes-connectivity/hostapd/files/hostapd.conf b/meta-ohos-blueprints/recipes-connectivity/hostapd/files/hostapd.conf new file mode 100644 index 0000000000000000000000000000000000000000..bab2d4515d1e01de1331d9b2a476c6680d86e015 --- /dev/null +++ b/meta-ohos-blueprints/recipes-connectivity/hostapd/files/hostapd.conf @@ -0,0 +1,49 @@ +# 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 diff --git a/meta-ohos-blueprints/recipes-connectivity/hostapd/files/hostapd.service b/meta-ohos-blueprints/recipes-connectivity/hostapd/files/hostapd.service new file mode 100644 index 0000000000000000000000000000000000000000..db958b11f305346931669b5e56dbdb0d477f0940 --- /dev/null +++ b/meta-ohos-blueprints/recipes-connectivity/hostapd/files/hostapd.service @@ -0,0 +1,10 @@ +[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 diff --git a/meta-ohos-blueprints/recipes-connectivity/hostapd/hostapd_%.bbappend b/meta-ohos-blueprints/recipes-connectivity/hostapd/hostapd_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..a6062eb6c6d92741e5f294c0b6e334dfd56c21ad --- /dev/null +++ b/meta-ohos-blueprints/recipes-connectivity/hostapd/hostapd_%.bbappend @@ -0,0 +1,9 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +SRC_URI_append = "file://hostapd.conf \ + file://hostapd.service \ + " + +do_install_append() { + install -m 0644 ${WORKDIR}/hostapd.conf ${D}${sysconfdir} +}