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.
Asked
Active
Viewed 1,038 times
1 Answers
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.

Ingo
- 42,107
- 20
- 85
- 197
-
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 03 '19 at 02:38
-
@s.k I have updated the answer. If everything works as expected then the access point should disappear. – Ingo Mar 03 '19 at 11:53
-
To clarify I have an RPi3+ running default Raspberian and followed https://www.raspberrypi.org/documentation/configuration/wireless/access-point.md 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 03 '19 at 23:36