summaryrefslogtreecommitdiff
path: root/recipes-connectivity/hostapd-example/hostapd-example
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-connectivity/hostapd-example/hostapd-example')
-rw-r--r--recipes-connectivity/hostapd-example/hostapd-example/enable-wifi.service13
-rw-r--r--recipes-connectivity/hostapd-example/hostapd-example/hostapd-example.network5
-rw-r--r--recipes-connectivity/hostapd-example/hostapd-example/hostapd-example.service12
-rw-r--r--recipes-connectivity/hostapd-example/hostapd-example/hostapd-tdx-demo-img.conf8
4 files changed, 38 insertions, 0 deletions
diff --git a/recipes-connectivity/hostapd-example/hostapd-example/enable-wifi.service b/recipes-connectivity/hostapd-example/hostapd-example/enable-wifi.service
new file mode 100644
index 0000000..623c281
--- /dev/null
+++ b/recipes-connectivity/hostapd-example/hostapd-example/enable-wifi.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Enable Wifi
+BindsTo=sys-subsystem-net-devices-uap0.device
+After=sys-subsystem-net-devices-uap0.device
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/connmanctl enable wifi
+ExecStop=
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target
diff --git a/recipes-connectivity/hostapd-example/hostapd-example/hostapd-example.network b/recipes-connectivity/hostapd-example/hostapd-example/hostapd-example.network
new file mode 100644
index 0000000..b498584
--- /dev/null
+++ b/recipes-connectivity/hostapd-example/hostapd-example/hostapd-example.network
@@ -0,0 +1,5 @@
+[Match]
+Name=uap0
+[Network]
+Address=192.168.8.1/24
+DHCPServer=yes
diff --git a/recipes-connectivity/hostapd-example/hostapd-example/hostapd-example.service b/recipes-connectivity/hostapd-example/hostapd-example/hostapd-example.service
new file mode 100644
index 0000000..9f576ef
--- /dev/null
+++ b/recipes-connectivity/hostapd-example/hostapd-example/hostapd-example.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Hostapd IEEE 802.11 AP, IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator
+Requires=enable-wifi.service
+
+[Service]
+Type=forking
+PIDFile=/run/hostapd.pid
+ExecStart=@SBINDIR@/hostapd @SYSCONFDIR@/hostapd-tdx-demo-img.conf -P /run/hostapd.pid -B
+
+
+[Install]
+WantedBy=multi-user.target
diff --git a/recipes-connectivity/hostapd-example/hostapd-example/hostapd-tdx-demo-img.conf b/recipes-connectivity/hostapd-example/hostapd-example/hostapd-tdx-demo-img.conf
new file mode 100644
index 0000000..bc93609
--- /dev/null
+++ b/recipes-connectivity/hostapd-example/hostapd-example/hostapd-tdx-demo-img.conf
@@ -0,0 +1,8 @@
+interface=uap0
+ssid=testwifi
+hw_mode=a
+channel=40
+ieee80211n=1
+own_ip_addr=192.168.8.1
+wpa=2
+wpa_passphrase=testwifipw