I need to set up the pi so, that when one network comes in range it would disconnect from existing one and connect to that one more preferred.
Here is my interfaces file:
auto lo
iface lo inet loopback
# Built in eth interface
allow-hotplug eth0
iface eth0 inet static
address 192.168.0.11
gateway 192.168.0.10
netmask 255.255.255.0
network 192.168.0.0
#broadcast
auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
allow-hotplug eth1
iface eth1 inet dhcp
And here is the wpa_supplicant.conf:
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="network(1)"
psk="xxx"
priority=5
}
network={
ssid="network(2)"
psk="xxx"
priority=10
}
What I am missing here? Or does it just not work that way?