
First, edit file /etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1 network={ ssid="SSID_1" psk="PASSWORD_1" } network={ ssid="SSID_2" psk="PASSWORD_2" }
Second, edit file /etc/network/interfaces
# The loopback network interface auto lo iface lo inet loopback # The primary wired network interface iface eth0 inet dhcp # The wireless network interface allow-hotplug wlan0 iface wlan0 inet manual wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf # Default iface default inet dhcp
Reboot the Pi after the edits. This approach uses DHCP for connecting to the network.
]]>