monapi
Posts: 45
Joined: Tue Aug 07, 2018 7:53 am

switch between access point mode and none access point

Mon Aug 27, 2018 7:10 pm

hello
i use https://www.raspberrypi.org/documentati ... s-point.md tutorial to make my raspberry pi 3 an access point with it's built in WiFi. so when the access point mode start the pi internet disconnects.
now i want to switch to the mode before turning to access point(station mode) which works with raspberry built in WiFi.
what are the commands?
is it possible to do it with only on or two command and doesn't reboot the raspberry?

monapi
Posts: 45
Joined: Tue Aug 07, 2018 7:53 am

Re: switch between access point mode and none access point

Tue Aug 28, 2018 5:57 am

i used the answer in this link https://raspberrypi.stackexchange.com/q ... lient-mode
and type the command like:
sudo apt-get update
sudo apt-get install wpasupplicant
#systemctl disable hostapd.service
#systemctl disable isc-dhcp-server.service
#systemctl stop hostapd.service
#systemctl stop isc-dhcp-server.service
#systemctl stop wpa_supplicant.service
#systemctl disable wpa_supplicant.service
#systemctl stop wpa_supplicant.service && systemctl start hostapd.service && systemctl start isc-dhcp-service.service
and after that reboot the pi.
but nothing change what should i do?
i appreciate your help if you can.

monapi
Posts: 45
Joined: Tue Aug 07, 2018 7:53 am

Re: switch between access point mode and none access point

Tue Aug 28, 2018 6:50 pm

i can't restore the original setting

Code: Select all

#stop hostapd and dnsmasq services.
service hostapd stop
service dnsmasq stop
 #remove the dnsmasq autostart 
/usr/sbin/update-rc.d -f dnsmasq remove
 #uninstall and purge the hostapd and dnsmasq packages
sudo apt-get autoremove --purge hostapd -yqq
sudo apt-get autoremove --purge dnsmasq -yqq
 #delete all the config files
rm -rf /etc/dnsmasq.conf
rm -rf /etc/hostapd/hostapd.conf
rm -rf /etc/network/interfaces
 #restore original network config
mv /etc/network/interfaces.backup /etc/network/interfaces
 #restart your device
reboot
with these commands. none can guide me and tell me what the problem is.
when i use

Code: Select all

service hostapd stop
service dnsmasq stop
the wifi just disable.

Return to “Beginners”