I have a raspberry pi running raspbian. I got it connected to my home network via wifi without issue.
However, after returning home from work with the pi (it was powered on the whole day), it did not auto-reconnect to the network.
Here is my /etc/network/interfaces configuration:
auto lo
iface lo inet loopback
iface eth0 inet dhcp
auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
And here is my /etc/wpa_supplicant/wpa_supplicant.conf configuration:
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="SSID"
psk="mypasswordishere"
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP
auth_alg=OPEN
}
Does anyone know how to make it auto-reconnect to a wifi network when it is in range?
Been frustrated over this...
wpa-roam
(this is from memory) but you also need to fix the other errors in your file. – Milliways Jan 11 '16 at 22:43iface wlan0 inet dhcp
should probably beiface wlan0 inet manual
. But I'm not quite sure I understand your question. Do you want it to autoconnect to different networks or only automatically connect to your home network. Yourwpa_supplicant.conf
doesn't seem right either. I thinkauth_alg=OPEN
is for WEP, butkey_mgmt
is set to WPA-PSK – Diederik de Haas Jan 12 '16 at 10:58