2

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.

1 Answer 1

-1

Finnaly! I figure it out!

This shell script cause two adaptor "wpa-roam" never work! So fix it yourself :) The script's description:


If an ifplugd managed interface is brought up, disconnect any

wpa-roam managed interfaces so that only one "roaming" interface

remains active on the system.


Fix it yourself:

sudo vim /etc/wpa_supplicant/action_wpa.sh

Comment out the follow line

#if wpa_action "${IFACE}" check; then
#       wpa_cli -i "${IFACE}" "${COMMAND}"
#fi

That's it! You've got two adaptor roaming work now!

1
  • Does anyone know what is the reason to have only one "roaming" interface? Commented Nov 9, 2015 at 17:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.