Reference info for wpa_supplicant.conf:
I got tired of looking through pages of documents to find the information I mostly use for setting up wpa_supplicant.conf on my Raspberry Pi devices. So, I'm putting it here.
If you are looking for a way to setup DHCP or Static settings for your networks follow the example under ### Other Options ###.
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
#
# home network; allow all valid ciphers
network={
ssid="home"
scan_ssid=1
key_mgmt=WPA-PSK
psk="very secret passphrase"
priority=5
}
# This will connect to any open wifi connection
# if no other connection is available.
network={
key_mgmt=NONE
priority=-1
}
### Other Options ###
network={
ssid="SCHOOLS NETWORK NAME"
psk="SCHOOLS PASSWORD"
id_str="school"
}
network={
ssid="HOME NETWORK NAME"
psk="HOME PASSWORD"
id_str="home"
}
The following is part of the ### Other Options ### setup. Edit /etc/network/interfaces
with iface school inet static
and iface home inet dhcp
in it so it looks something like this:
auto lo
iface lo inet loopback
iface eth0 inet dhcp
allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface school inet static
address 192.0.2.7
gateway 192.0.2.254
netmask 255.255.255.0
iface home inet dhcp
No comments:
Post a Comment