From 5444d3e8f82da5c3cb393baea294bfa916914a10 Mon Sep 17 00:00:00 2001 From: Isaac Hermida Date: Tue, 23 Aug 2016 10:35:56 +0200 Subject: [PATCH] recipes-connectivity: add hostapd functionality Do not autostart hostapd daemon on boot because because it will conflict with wpa-supplicant process and add a custom hostapd.conf file with WPA2-AES encryption. https://jira.digi.com/browse/DEL-2913 Signed-off-by: Isaac Hermida --- .../hostapd/hostapd-2.4/hostapd.conf | 17 +++++++++++++++++ .../hostapd/hostapd_2.4.bbappend | 9 +++++++++ 2 files changed, 26 insertions(+) create mode 100644 meta-digi-dey/recipes-connectivity/hostapd/hostapd-2.4/hostapd.conf diff --git a/meta-digi-dey/recipes-connectivity/hostapd/hostapd-2.4/hostapd.conf b/meta-digi-dey/recipes-connectivity/hostapd/hostapd-2.4/hostapd.conf new file mode 100644 index 000000000..69e69299f --- /dev/null +++ b/meta-digi-dey/recipes-connectivity/hostapd/hostapd-2.4/hostapd.conf @@ -0,0 +1,17 @@ +ctrl_interface=/var/run/hostapd +ctrl_interface_group=0 +interface=wlan0 +driver=nl80211 + +# WPA2-AES encryption +channel=5 +ssid=ap-wpa2aes +auth_algs=1 +wpa=2 +wpa_key_mgmt=WPA-PSK +wpa_pairwise=CCMP +wpa_passphrase=password-wpa2aes + +# OPEN encryption example, remove WPA2-AES setup +# channel=1 +# ssid=ap-open diff --git a/meta-digi-dey/recipes-connectivity/hostapd/hostapd_2.4.bbappend b/meta-digi-dey/recipes-connectivity/hostapd/hostapd_2.4.bbappend index 8d98fa93c..b73ffc0cd 100644 --- a/meta-digi-dey/recipes-connectivity/hostapd/hostapd_2.4.bbappend +++ b/meta-digi-dey/recipes-connectivity/hostapd/hostapd_2.4.bbappend @@ -5,5 +5,14 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${BP}:" # The recipe uses a different "$S" directory so point the patch to the hostapd # tarball directory. SRC_URI_append_ccimx6ul = " file://fix_num_probereq_cb_clearing.patch;patchdir=.." +SRC_URI += "file://hostapd.conf" + +do_install_append() { + # Overwrite the default hostapd.conf with our custom file + install -m 0644 ${WORKDIR}/hostapd.conf ${D}${sysconfdir}/hostapd.conf +} + +# Do not autostart hostapd daemon, it will conflict with wpa-supplicant. +INITSCRIPT_PARAMS = "remove" PACKAGE_ARCH = "${MACHINE_ARCH}"