Currently I can connect to my pi through the wifi that it's broadcasting and then I change a few things through ssh and get it connected to my home wifi (which closes the wifi that the pi is broadcasting. My problem is that I can't get the local wifi from the pi to broadcast again after I disconnect it from the home wifi unless I reboot.

What I've been doing is changing the network interfaces file to have dhcp and the home wifi name and password and then

sudo ifdown wlan0 
sudo ifup wlan0

At this point, my pi is connected to the home wifi. However, when I change my network interfaces file back exactly how it was before and then repeat the ifdown/ipup commands, my local wifi doesn't broadcast.

The purpose is to basically get the local wifi working again in case of a wrong login so I guess if there is a way to just check if the credentials would work from within the command line, that'd be a huge help too.


I noticed after some digging that the wifi dongle is actually turning off when I change my /etc/network/interfaces back to my local wifi settings and then then sudo ifdown wlan0/ ifup wlan0 (or at least isn't blinking green anymore). It does blink again when I ifdown wlan0, but when I ifup wlan0, it turns back off.

1 Answer 1


What I figured out through way too many attempts is to bring down the wlan0

sudo ifdown wlan0

and then change your /etc/network/interfaces file back from

iface wlan0 inet dhcp
     wpa-ssid "network"
     wpa-psk "password"

to the static version

iface wlan0 inet static 
     address 192.168.xx.x

(This address and netmask could change depending on what you have)

and then bring your wlan0 back up

sudo ifup wlan0

Now we want to reset the hostapd. I'm assuming it reassociates itself with the ip? Maybe someone else could explain that reason further. I just know it worked for me.

sudo service hostapd stop
sudo service hostapd start

Then, it should be broadcasting local wifi again!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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