skyforever
Posts: 4
Joined: Wed Jan 31, 2018 5:05 am

looking for proper wpa_supplicant.conf file for multiple network

Thu Feb 01, 2018 3:37 am

Pi Zero W; 11/29 Stretch

Code: Select all

country=US
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
	ssid="nameasidojfaoisjf"
	psk="asdasdas"
}

network={
	ssid="nameasidojfaoisjf2"
	psk="asdasdas2"
}
Every works fine when there's only one network entry, whenever I try to edit in a second network entry as the example above, the pi would not be able to connect to any routers upon reboot. The only solution after that would be to place a new wpa_supplicant.conf file into boot partition with a single entry and everything works fine again, even after rebooting.

What does your multiple network wpa_supplicant.conf file in Stretch look like? What I had worked fine in Jessie.

klricks
Posts: 7172
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: looking for proper wpa_supplicant.conf file for multiple network

Thu Feb 01, 2018 4:21 am

This works for me (RPi3B):
Tested by changing the SSID & PSK on router then restarting router. The RPI then auto connects to the active SSID after a few seconds or on reboot.
wpa file as created by GUI tool only not direct edit...

Code: Select all

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=US

network={
        ssid="SSID_1"
        psk="PSK_1"
        key_mgmt=WPA-PSK
}

network={
        ssid="SSID_2"
        psk="PSK_2"
        key_mgmt=WPA-PSK
}

Unless specified otherwise my response is based on the latest and fully updated RPiOS Buster w/ Desktop OS.

Return to “Networking and servers”