hary
Posts: 78
Joined: Wed Jan 18, 2017 8:17 am

RPI3 as Access point / start service at boot time automatically

Thu Oct 05, 2017 7:40 am

Hi.

I've almost successfully been following this tutorialhttps://frillip.com/using-your-raspberr ... h-hostapd/ on how to use a RPI3 as AP and station.

The only remaining point is that it's not starting on its own at boot time.
I need to go to a terminal and type :
"sudo /usr/sbin/hostapd /etc/hostapd/hostapd.conf" as it is indicated at the end of the "Configure hostapd" part of the tutorial.

I'd like to know how I could get it starting automatically at the start of the RPI

tpylkko
Posts: 409
Joined: Tue Oct 14, 2014 5:21 pm

Re: RPI3 as Access point / start service at boot time automatically

Thu Oct 05, 2017 9:06 am

most daemons like that already have a service file that comes with them when you install them. you can enable it with

Code: Select all

sudo systemctl enable (name[ of service goes here, e.g hostapd)/code]. With "enable" it will try to start it at boot, with "start" it will try now.

If not, you can make one, it's quite easy. Search for "systemd service".
Last edited by tpylkko on Thu Oct 05, 2017 9:09 am, edited 1 time in total.

epoch1970
Posts: 5131
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: RPI3 as Access point / start service at boot time automatically

Thu Oct 05, 2017 9:08 am

Also look at /etc/default/hostapd.
You probably need to edit the file to enable startup at boot.
With Debian and Raspbian, /etc/default is an important place to visit once you've installed a program.
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

Return to “General discussion”