1

I would like to have my wireless access point available at particular periods of the day and not at others. I have a RPi3+ running default Raspbian and followed https://www.raspberrypi.org/documentation/configuration/wireless/access-point.md to get the access point up and running using the onboard wifi. What is the best command line to switch the access point on and off properly? Thank you.

7

I assume you are using Raspbian and you have setup the access point with hostapd. To switch the access point this commands should do:

rpi ~$ sudo systemctl stop hostapd.service
rpi ~$ sudo systemctl start hostapd.service

It is difficult to say much more about start/stop hostapd because I don't know anything about your setup. Do you use a stand alone access point, or with a wired uplink (eth0), or with a wireless uplink (wlan0) together with wpa_supplicant? If you use a setup with systemd-networkd then you have clean control over the services with start/stop. To get an idea what I mean you may have a look at Setting up a Raspberry Pi as an access point - the easy way and Access point as WiFi repeater, optional with bridge. The last one has a tested table what happens with start/stop the services.

  • Thank you. Yes, I am using hostapd however when I tried the stop command above and waited for a few minutes for it to disappear from visible networks the access point was still available to our various devices. Is the network supposed to disappear when the stop command is run? – s.k Mar 3 at 2:38
  • @s.k I have updated the answer. If everything works as expected then the access point should disappear. – Ingo Mar 3 at 11:53
  • To clarify I have an RPi3+ running default Raspberian and followed raspberrypi.org/documentation/configuration/wireless/… to get the access point up and running using the onboard wifi. I will read the references that you provided and try again. – s.k Mar 3 at 23:36
  • Thank You very much! – Skynet Sep 27 at 13:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.