WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Run hostapd at boot  (Read 2064 times)

Offline Franxoois

  • Newbie
  • *
  • Posts: 18
Run hostapd at boot
« on: December 05, 2014, 12:11:29 PM »
Hi,

I would like to run hostapd at boot with TC 5.3.1.

Code: [Select]
#!/bin/sh

ifconfig wlan0 10.10.0.1 &
udhcpd /mnt/mmcblk0p2/udhcpd.conf &

hostapd /mnt/mmcblk0p2/tools/hostapd.conf &

I call it in /opt/bootlocal.sh.

Code: [Select]
/bin/sh /mnt/mmcblk0p2/tools/hotspot.sh > /var/log/hotspot.log &

When I reboot the raspberry, wlan0 is not up, nothing in log.

Something strange when I write the commands

Code: [Select]
tc@XXX:~$ sudo hostapd /mnt/mmcblk0p2/FLink.io/tools/hostapd.conf
Don't run this as root.
tc@XXX:~$ hostapd /mnt/mmcblk0p2/FLink.io/tools/hostapd.conf
tc@XXX:~$ sudo hostapd /mnt/mmcblk0p2/FLink.io/tools/hostapd.conf
Configuration file: /mnt/mmcblk0p2/tools/hostapd.conf
Using interface wlan0 with hwaddr 10:0d:7f:39:d9:11 and ssid "FLink.io"
wlan0: interface state UNINITIALIZED->ENABLED
wlan0: AP-ENABLED

The first time I run hostapd with sudo, I have this friendly error message "Don't run this as root", then I try to run with tc rights nothing happens and if I try again with sudo, everything is OK.

Do you have an idea how to debug ?