3

My old wpa_supplicant and interfaces config not work!

/etc/wpa_supplicant/wpa_supplicant.conf

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
    ssid="MySSID"
    psk="topsecret"
    key_mgmt=WPA-PSK
}

/etc/network/interfaces

iface lo inet loopback    
iface eth0 inet manual

auto wlan0
allow-hotplug wlan0
iface wlan0 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

I tried enable interface or restart with this command but:

sudo ifup --force wlan0

output message:

wpa_supplicant: /sbin/wpa_supplicant daemon failed to start
run-parts: /etc/network/if-pre-up.d/wpasupplicant exited with return code 1
Failed to bring up wlan0.

But, I fixed this overriding supplicant config on interfaces:

auto lo
iface lo inet loopback

iface eth0 inet manual

auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-ssid "MySSID"
wpa-psk "topsecret"
#wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

Any idea? thanks

System:
Linux raspberrypi 4.1.19-v7+ #858 SMP 
Distributor ID: Raspbian
Description:    Raspbian GNU/Linux 8.0 (jessie)
Release:    8.0
Codename:   jessie
Bus 001 Device 004: ID 0bda:8176 Realtek RTL8188CUS 
  • Try executing sudo wpa_cli reconfigure, then reboot – Tes3awy Mar 23 '17 at 18:03
  • the issue was in a old raspbian version, when I tried to migrate from jessie to a new raspbian, I think that is a deprecated issue. – Hpsaturn Aug 7 at 8:58
1

Try to rewrite your WPA_supplicant.conf file.

first set your keboard to US (or the one you use)

it worked for me.

else try add:

network={
ssid="YOURSSID"
psk="YOURPASS"
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
auth_alg=OPEN
}

if you use an SSH client like putty. try to write with "echo"

like this:

echo '
network={
ssid="YOURSSID"
psk="YOURPASS"
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
auth_alg=OPEN
}
' >> /etc/wpa_supplicant/wpa_supplicant.conf
0

If anyone is having a similar issue, check dmesg. In my case it gave the error:

[ 2587.167643] ieee80211 phy1:rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'
[ 2587.167717] rt2800usb 1-1.2:1.0: firmware: failed to load rt2870.bin (-2)
[ 2587.167737] ieee80211 phy1: rt2x00lib_request_firmware: error - Failed to request Firmware

The solution was to install firmware-ralink. This is probably caused because I installed Raspbian using the netinstaller. The WiFi dongle itself is a "Joy-it NET04-M" (apparently using the Ralink chipset).

Note that using wpa-ssid and wpa-psk did not solve the issue for me.

0

I migrated all stuff to the last Raspbian image.. strange problem.. closed for me. Many thanks guys.

0

I had this problem using a Raspberry Pi Zero W on Raspberian Stretch.

After spending an enormous amount of time and research into the issue - the solution was to downgrade to Raspberian Jessie.

After doing so - Wifi worked perfectly with nothing more than the wifi information placed into /boot/wpa_supplicant.conf - i.e. no messing with interfaces files or anything else.

0

I had the same problem, I solved it trying to keep the /etc/wpa_supplicant/wpa_supplicant.conf as simple as possible.
So I suggest to write only the options you really need:

network={
  ssid="<ssid>"
  psk="<password>"
}

Without adding multiple networks.

0

Had a similar problem and it appeared to be linked to an update to python3 (my /usr/bin/python link move from python2 to python3). This led to problems while installing / upgrading with apt-get. Moved back to python2, then apt-get update and upgrade did the trick.

0

REMINDER: you access the wpa_supplicant.conf file on the command line by typing: sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

Below is what the default wpa_supplicant.conf file looks like for my home network:

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=US

network={
    ssid="name-of-wifi-network"
    psk="password"
    key_mgmt=WPA-PSK
}

=============for Enterprise Network =====================

    network={
    ssid="name-of-wifi-network"
    priority=1
    proto=RSN
    key_mgmt=WPA-EAP
    pairwise=CCMP
    auth_alg=OPEN
    eap=PEAP
    identity="username"
    password="password"
    phase1="peaplabel=0"
    phase2="auth=MSCHAPV2"
    }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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