I need to use two different network dongles in a Raspberry Pi (one realtek and one tplink) for two different networks. My wpa_supplicant.conf looks like this:
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
network={
id_str="id1"
ssid="ssid1"
scan_ssid=1
key_mgmt=WPA-EAP
eap=PEAP
pairwise=CCMP
identity="identity"
anonymous_identity="identity"
password="password"
phase1="peaplabel=0"
phase2="auth=MSCHAPV2"
priority=1
}
network={
id_str="id2"
ssid="ssid2"
scan_ssid=0
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=TKIP
psk="password"
priority=0
}
and my interface file looks like this:
auto lo
iface default inet dhcp
iface lo inet loopback
iface eth0 inet static
address 192.168.103.146
netmask 255.255.255.0
gateway 192.168.103.254
auto wlan1
allow-hotplug wlan1
iface wlan1 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
#wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
iface id2 inet static
address 192.168.0.199
netmask 255.255.255.0
gateway 192.168.0.1
auto wlan0
allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
#wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
iface id1 inet dhcp
I can not make the two interfaces work at the same time. When I make ifup wlan0, it connects correctly, but after that when I make ifup wlan1, wlan0 disconnects and wlan1 connects correctly, and viceversa.
I tried configuring one as wpa-conf and both connects correctly, but I NEED to have both in wpa-roam mode in order to reconnect.