LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory error (https://www.linuxquestions.org/questions/slackware-14/failed-to-connect-to-wpa_supplicant-wpa_ctrl_open-no-such-file-or-directory-error-945620/)

Malacoda93 05-17-2012 08:50 PM

Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory error
 
I've had slack setup for a couple months now, and after a few abortive attempts to manually get my network setup using wpa_supplicant, I decided, partially due to the frequency with which I use a wide variety of networks, that it would just be easier to let a pre-built program do the trick, and so I downloaded and installed Wicd, which has been working fine.

However, during those abortive attempts I did something which has caused for an extremely time-consuming and annoying error message, the aforementioned Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory, to occur on startup. And when I say occur, I mean occur. It is repeated probably around thirty times with a period of about one second, and that is one annoying half of a minute that I don't want to have to deal with. I should note by the way that it is preceded by a series of error messages, usually "failed to parse..." before just about every line in the wpa_supplicant. I currently have the wpa_supplicant blank:

Code:

# This line enables the use of wpa_cli which is used by rc.wireless
# if possible (to check for successful association)
ctrl_interface=
# By default, only root (group 0) may use wpa_cli
ctrl_interface_group=
eapol_version=
ap_scan=
fast_reauth=1

    # WPA protected network, supply your own ESSID and WPAPSK here:
    network={
    scan_ssid=
    ssid=
    proto=
    key_mgmt=
    pairwise=
    #group=CCMP TKIP WEP104 WEP40
    #psk below was made with wpa_passphrase
    psk=

    }

But have tried to fill it out to the setup for my primary network, which didn't work whatsoever. In addition, wpa_ctrl_open, which I think is supposed to be set by default to /var/run/wpa_supplicant (basing that on looking around trying to solve this on my own), has a single file named wlan0 in it, which is completely blank.

It isn't the most pressing issue because it's more of an annoyance than anything, but if somebody has had this issue before and would be willing to help me solve it, I'd be very thankful. I'm more than willing to post the contents of any other files if need be.

XGizzmo 05-18-2012 05:50 AM

You probably need to remove any reference to your wireless interfaces from /etc/rc.d/rc.inet1.conf

markush 05-18-2012 08:22 AM

Well, I'm using wpa2 encryption and my wpa_supplicant.conf looks like this (for two different wireless networks)
Code:


ctrl_interface=/var/run/wpa_supplicant GROUP=0

network={
      ssid="Wlan-13"
      proto=WPA RSN
      key_mgmt=WPA-PSK
      pairwise=TKIP AES
      eap=TLS
      psk="************************"
}

network={
        ssid="homenetwork"
        proto=WPA RSN
        key_mgmt=WPA-PSK
        pairwise=CCMP
        psk="***********************"
}

I have disabled rc.inet1 and instead have the following startscript (which resides as /etc/rc.d/rc.startwlan on my system) which is also started from rc.M
Code:

#!/bin/bash
ifconfig lo up
ifconfig wlan0 up
wpa_supplicant -iwlan0 -Dwext -c/etc/wpa_supplicant.conf &
dhcpcd wlan0 &

This works for me. You can add an entry for several networks in your wpa_supplicant.conf, it will automatically connect you to the available wireless network.

I'd strongly recommend to get rid of wcid, this tool never worked for me.

Markus

Malacoda93 05-18-2012 08:50 AM

Well, it does work for me, although I'll keep that in mind if it starts acting up.

Quote:

Originally Posted by XGizzmo (Post 4681651)
You probably need to remove any reference to your wireless interfaces from /etc/rc.d/rc.inet1.conf

That did the trick. Thanks a lot.

FeyFre 05-18-2012 11:12 AM

I have similar, but opposite problem:
I don not use any wicd or similar stuff(and shall not!).
I have setup my /etc/rc.d/rc.inet1.conf to activate my wlan0 interface
I have setup my /etc/wpa_supplicant.conf for my wireless network environment.
So when I booting up my laptop(or changing runlevel 1<->3<->4), I also get those messages for a few minutes. I see a few reasons of it:
1. It is because my wireless adapter turned off by hardware button above keyboard(and it intended to be so! - I usually do not turn on extra energy consumers when I have not external power supply).
2. Either because my location does not has any wireless networks I configured in wpa_supplicant.conf
How I can get rid of those annoying messages?! During boot-up I cannot ^C or ^U it because there is no terminal, during switching runlevel I end up with read-only mounted / for error-messages duration. I mean, I want my system to continue boot farther(or switch runlevel) regardless of wireless environment, but be ready if I turn-on adapter and/or walk into configured environment.

markush 05-18-2012 12:08 PM

Well, my experience is that the repeated message comes when I use rc.inet1 in the default manner
Code:

/etc/rc.d/rc.inet1 wlan0_start
but when I use wpa_supplicant directly
Code:

wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf &
the message does not show up. You'll only have to call dhcpcd manually if you don't use a static IP.

BTW: I would also like to learn where the message comes from, I always thought that it's a bug anywhere.

Markus

Surka 02-17-2013 10:20 PM

Since private messages were disabled:

The variable that send that annoying message is: WLAN_WPAWAIT at rc.inet1.conf. By default it is 30. Thats why you get 30 messages.


All times are GMT -5. The time now is 10:52 PM.