--- /dev/null
+SUMMARY = "Change hostapd.conf file"
+DESCRIPTION = "Enable 80211n-mode and WPA2-PSK security and change SSID to hostname and password to hostname1234"
+
+LICENSE = "MIT"
+
+SYSTEMD_SERVICE_${PN} = " hostapd.service"
+SYSTEMD_AUTO_ENABLE_${PN} = "enable"
+
+do_install_append () {
+ echo "#content hostapd.conf" > ${D}/etc/hostapd.conf
+ echo "interface=wlan0" >> ${D}/etc/hostapd.conf
+ echo "ssid=${MACHINE}" >> ${D}/etc/hostapd.conf
+ echo "channel=6" >> ${D}/etc/hostapd.conf
+ echo "auth_algs=1" >> ${D}/etc/hostapd.conf
+ echo "wpa=2 # WPA2 only" >> ${D}/etc/hostapd.conf
+ echo "wpa_key_mgmt=WPA-PSK" >> ${D}/etc/hostapd.conf
+ echo "rsn_pairwise=CCMP" >> ${D}/etc/hostapd.conf
+ echo "wpa_passphrase=${MACHINE}1234" >> ${D}/etc/hostapd.conf
+ echo "" >> ${D}/etc/hostapd.conf
+ echo "hw_mode=g" >> ${D}/etc/hostapd.conf
+ echo "ieee80211n=1" >> ${D}/etc/hostapd.conf
+ echo "wmm_enabled=1" >> ${D}/etc/hostapd.conf
+}