¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

How to Chang/Add wi-fi networis


 

Ok I googled how to do it on Raspberry pi?

but remain confused
Anyone have a suggestion. I know one way to change but not to add.


 
Edited

On an RPi, wifi is controlled by /etc/wpa_suplicant/wpa_suplicant.conf. Here is an example from one of my Pi Zero Ws:
---------------------------------->8?? 8<-----------------------------------------
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=US

network={
?? ?ssid="Home Network"
?? ?psk="some-password"
?? ?priority=2
}

network={
?? ?ssid="TAEiPhone"
?? ?psk="some-other-passwrd"
?? ?priority=1
}
---------------------------------->8?? 8<-----------------------------------------
Each network you want your system to potentially use is in a network={} definition. ssid is the name of the network and psk is the password. Note that my home network is a higher priority. This Pi Zero will first try to connect to my home network. If it's not available, then it will try my iPhone. If you don't specify a priority, that network's value will be 0. I believe the assigned priority can even be a negative number, if you want.

PS. If you're building a new "headless" image for a Pi Zero W, you can put your wpa_supplicant.conf in the /boot directory, along with an empty file called "ssh". Then, on first boot, the OS will move the wpa_supplication.conf file to the correct location and enable ssh. In this way you can build an RPi Zero W without ever having to hook up a monitor and keyboard.


 

Ended up going back to Pi-star.UK and making a new supplicant file. So now it's connected to the new router and I can access the dash. BUT alas I can no longer SSH into it Oh it responds but rejects the password.. I'll fix it when I have more hardware up here or can burn a new raspberien inmage if all else fails. Thanks for the help


"Nothing adds excitement like something that is none of your business" Note I am not a doctor, I don't even play one on television John F Davis
On Tuesday, October 20, 2020, 12:40:55 PM EDT, Tom Early <n7tae@...> wrote:


[Edited Message Follows]

On an RPi, wifi is controlled by /etc/wpa_suplicant/wpa_suplicant.conf. Here is an example from one of my Pi Zero Ws:
---------------------------------->8?? 8<-----------------------------------------
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=US

network={
?? ?ssid="Home Network"
?? ?psk="some-password"
?? ?priority=2
}

network={
?? ?ssid="TAEiPhone"
?? ?psk="some-other-passwrd"
?? ?priority=1
}
---------------------------------->8?? 8<-----------------------------------------
Each network you want your system to potentially use is in a network={} definition. ssid is the name of the network and psk is the password. Note that my home network is a higher priority. This Pi Zero will first try to connect to my home network. If it's not available, then it will try my iPhone. If you don't specify a priority, that network's value will be 0. I believe the assigned priority can even be a negative number, if you want.

PS. If you're building a new "headless" image for a Pi Zero W, you can put your wpa_supplicant.conf in the /boot directory, along with an empty file called "ssh". Then, on first boot, the OS will move the wpa_supplication.conf file to the correct location and enable ssh. In this way you can build an RPi Zero W without ever having to hook up a monitor and keyboard.