jwatte
Posts: 203
Joined: Sat Aug 13, 2011 7:28 pm

Connecting to WiFi -- wpa_supplicant trouble

Tue Feb 17, 2015 5:28 am

I've tried to follow the available wpa_supplicant resources on this forum and the greater internet.
I have the ralink 7601 module installed, and it's recognized by my kernel (for RPi 2)
When I manually run wpa_supplicant, it correctly connects to my access points:

Code: Select all

wpa_supplicant -c /etc/wpa_supplicant/wpa_supplicant.conf -i ra0 -D wext
However, I can't get this to work automatically from /etc/network/interfaces:

Code: Select all

auto lo

iface lo inet loopback
iface eth0 inet dhcp

auto ra0
allow-hotplug ra0
iface ra0 inet manual
    wpa-driver wext
    wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf

iface default inet dhcp

iface home inet dhcp
iface work inet dhcp
iface roam inet dhcp
and /etc/wpa_supplicant/wpa_supplicant.conf: (PSKs shrouded for security)

Code: Select all

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
        ssid="jwatte"
        scan_ssid=1
        psk=78cxxxxx...
        id_str="home"
        priority=1
}
network={
        ssid="imvu-guest"
        scan_ssid=1
        psk=dafxxxxx...
        id_str="work"
        priority=2
}
network={
        ssid="techshop"
        scan_ssid=1
        psk=920xxxxx...
        id_str="roam"
        priority=3
}
Here are the WPA processes started by the system:

Code: Select all

 1665 ?        Ss     0:00 /sbin/wpa_supplicant -s -B -P /var/run/wpa_supplicant.ra0.pid -i ra0 -W -D nl80211,wext -c /etc/wpa_supplicant/wpa_supplicant.conf
 1710 ?        Ss     0:00 /sbin/wpa_cli -B -P /var/run/wpa_action.ra0.pid -i ra0 -p /var/run/wpa_supplicant -a /sbin/wpa_action
Note that I specify "wext" as the wpa driver, yet it gets nl80211,wext as an argument, so perhaps that option doesn't work?

Here's how it works manually:

Code: Select all

$ sudo kill 1665 1710
$ sudo wpa_supplicant -i ra0 -D wext -c /etc/wpa_supplicant/wpa_supplicant.conf
rfkill: Cannot open RFKILL control device
ra0: Trying to associate with b4:75:0e:68:52:15 (SSID='jwatte' freq=2462 MHz)
ra0: Association request to the driver failed
ra0: Associated with b4:75:0e:68:52:15
ra0: WPA: Key negotiation completed with b4:75:0e:68:52:15 [PTK=CCMP GTK=CCMP]
ra0: CTRL-EVENT-CONNECTED - Connection to b4:75:0e:68:52:15 completed (auth) [id=0 id_str=home]

Return to “Beginners”