diff options
author | Parth Pancholi <parth.pancholi@toradex.com> | 2025-01-17 10:18:29 +0100 |
---|---|---|
committer | Parth Pancholi <parth.pancholi@toradex.com> | 2025-01-22 09:11:52 +0100 |
commit | f5388b275233b480f9e3eb64a738ab80dead2c62 (patch) | |
tree | afbe43c271e6303a36443d952bf8a5d2bf3df168 | |
parent | c3983b73e4c2c41e3fdebe4a738dd10164b36b7e (diff) |
recipes-connectivity: add hostapd-example.service for aquila-am69
The Aquila AM69 platform currently uses the ath11k Linux driver, which does
not support separate wireless interfaces for station mode and access point
mode. This change adds the Toradex hostapd-example service for Aquila AM69
which creates a virtual uap0 interface and ensures the wlan0 interface is
brought down before setting up the wireless access point. This change
ensures a proper cleanup by removing uap0 and bringig up wlan0 interface
post stopping the service.
This resolves the issue where "systemctl start hostapd-example" command
fails to initialize the wireless access point on Aquila AM69.
Related-to: ELB-6137
Signed-off-by: Parth Pancholi <parth.pancholi@toradex.com>
(cherry picked from commit de062b56b74134216934747e60760226e48997c9)
-rw-r--r-- | recipes-connectivity/hostapd-example/hostapd-example/aquila-am69/hostapd-example.service | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/recipes-connectivity/hostapd-example/hostapd-example/aquila-am69/hostapd-example.service b/recipes-connectivity/hostapd-example/hostapd-example/aquila-am69/hostapd-example.service new file mode 100644 index 00000000..d0d03491 --- /dev/null +++ b/recipes-connectivity/hostapd-example/hostapd-example/aquila-am69/hostapd-example.service @@ -0,0 +1,17 @@ +[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 +# Create virtual interface uap0 used for access point and make wlan0 down +ExecStartPre=@SBINDIR@/iw dev wlan0 interface add uap0 type __ap +ExecStartPre=@SBINDIR@/ip link set wlan0 down +ExecStart=@SBINDIR@/hostapd @SYSCONFDIR@/hostapd-tdx-demo-img.conf -P /run/hostapd.pid -B +# Remove uap0 and bring wlan0 up after stopping +ExecStopPost=@SBINDIR@/iw dev uap0 del +ExecStopPost=@SBINDIR@/ip link set wlan0 up + +[Install] +WantedBy=multi-user.target |