Seeking Assistance with Automating hostapd on Qualcomm RB5 Dev Kit

Hello Qualcomm RB5 Community,

I’m currently facing a challenge with automating the hostapd service on my Qualcomm RB5 development kit running Ubuntu 20. The goal is to have hostapd start automatically on boot, but I’ve encountered an issue where it only works when I manually execute the commands post-boot, and not automatically upon system startup.

Issue Description: hostapd doesn’t start correctly upon reboot. It works flawlessly when I run the commands manually after the system has booted up, but these commands do not execute successfully on their own after a system restart.

Steps I’ve Tried:

  1. Script Creation: I’ve created a script ( with necessary commands and placed it in /usr/local/bin:


ip route del default via dev wlan0 || true
ip route del dev wlan0 || true
ip route add dev wlan0 || true
killall wpa_supplicant
ifconfig wlan0 netmask up
dnsmasq --dhcp-range=,,12h --port=5353
hostapd /data/misc/wifi/hostapd.conf &

* **Systemd Service Creation:** To automate the script, I created a systemd service file (`network_automate.service`) in `/etc/systemd/system/`:


* ```
Description=Custom Startup Script

ExecStartPre=/bin/sleep 15
ExecStart=/bin/bash /usr/local/bin/

  • Permissions and Enabling Service: Ensured the script is executable and enabled the service:


sudo chmod +x /usr/local/bin/
sudo systemctl enable network_automate.service

2. **Delay Introduction:** Based on advice from Raspberry Pi forums, I introduced a delay (15 seconds) in the service startup, but this didn't resolve the issue.
3. **Manual Service Start Works:** I can manually start the service post-boot without any issues.

**Seeking Further Advice:** Despite these steps, `hostapd` fails to start automatically upon boot. I suspect it might be related to network interfaces not being up in time or a potential conflict with other services like `wpa_supplicant`.

Has anyone in this community faced a similar issue or have insights on what might be going wrong? Any advice or recommendations would be greatly appreciated. I'm particularly interested in any Qualcomm RB5-specific configurations or nuances that I might be missing.

Thank you in advance for your time and help!