jbden
Posts: 5
Joined: Sat Nov 05, 2016 3:51 pm

Connecting to multiple networks

Tue Jun 18, 2019 1:56 am

I am trying to setup a headless pi zero w running raspbian stretch lite to connect to multiple networks , like at home, work and school, automatically , but all the tutorials on line seem to be outdated and don’t work with stretch lite. Can anyone direct me as to how to configure stretch lite to do this?

PhatFil
Posts: 1341
Joined: Thu Apr 13, 2017 3:55 pm
Location: Oxford UK

Re: Connecting to multiple networks

Tue Jun 18, 2019 3:55 am

add "wpa_supplicant.conf" to your search string ;) thats the file you want to edit..
iirc its found in /etc/wpa_supplicant (not on a pi atm..)



add entries like:

Code: Select all

network={
    ssid="WORK NETWORK NAME"
    psk="WORK PASSWORD"
    id_str="work"
}

network={
    ssid="HOME NETWORK NAME"
    psk="HOME PASSWORD"
    id_str="home"
}
and your pi should join whichever network is within range.

jbden
Posts: 5
Joined: Sat Nov 05, 2016 3:51 pm

Re: Connecting to multiple networks

Tue Jun 18, 2019 11:08 am

I tried your suggestion but it failed to connect to my home wifi network after making the change. Changed the file back to the original way and boots again. Do I have to modify something in etc/ dhcpcd.conf in Stretch Lite?

PhatFil
Posts: 1341
Joined: Thu Apr 13, 2017 3:55 pm
Location: Oxford UK

Re: Connecting to multiple networks

Tue Jun 18, 2019 12:02 pm

are you using a static ip addy?
viewtopic.php?t=199081


Return to “Raspbian”