You are not logged in.

#1 2012-09-03 14:37:41

DerEnt
Member
Registered: 2012-09-03
Posts: 8

netcfg, wpa_supplicant and not-existing /var/run/wpa_supplicant

Hi altogether,
i'm an ArchLinux Newbie and have the problem described in this thread which
is marked as solved;
still, the solution doesn't work for me. I want to establish a wireless connection via netcfg and get a wpa_supplicant error (see also the
above mentioned thread):

netcfg mynetworkprofile
----
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory

Here's my wpa_supplicant.conf

cat /etc/wpa_supplicant/wpa_supplicant.conf
----
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=network
update_config=1

The problem seems to be that /var/run/wpa_supplicant simply does not exist.
The problem has been described in this post
as well (but seemingly not solved since 2007).

I set up Wicd now and things are working great, but i would still be interested
in a solution for netcfg.

Please post if you need more information- i installed Arch for the first time yesterday and i'm a
bit unsure with selecting information that might be useful to you.

Thank you!

Last edited by DerEnt (2012-09-03 14:41:04)

Offline

#2 2012-09-03 15:47:30

HungGarTiger
Member
From: nz/auckland/
Registered: 2012-06-27
Posts: 187

Re: netcfg, wpa_supplicant and not-existing /var/run/wpa_supplicant

Have you enabled netcfg.service?

systemctl enable netcfg.service

Have you been able to connect manually with wpa_supplicant? The wiki suggests this before moving on to an "auto connect" netcfg/networkmanager/etc


"No sympathy for the devil. If you buy the ticket, take the ride."
- Hunter S. Thompson

Offline

#3 2012-09-03 17:05:59

bgc1954
Member
From: Edmonton, AB, Canada
Registered: 2006-03-14
Posts: 1,160

Re: netcfg, wpa_supplicant and not-existing /var/run/wpa_supplicant

I think you really need to look at the wpa_supplicant wiki. https://wiki.archlinux.org/index.php/WPA_supplicant

Your wpa_supplicant.conf looks very short and seems to be missing alot of relavent info.  Also your conf file should be located at /etc/wpa_supplicant.conf.  It's all in the wiki. wink

Last edited by bgc1954 (2012-09-03 17:08:11)


Time is a great teacher, but unfortunately it kills all its pupils ... - Louis Hector Berlioz

Offline

#4 2012-09-03 18:39:32

brain0
Developer
From: Aachen - Germany
Registered: 2005-01-03
Posts: 1,382

Re: netcfg, wpa_supplicant and not-existing /var/run/wpa_supplicant

DerEnt wrote:

Hi altogether,
i'm an ArchLinux Newbie and have the problem described in this thread which
is marked as solved;
still, the solution doesn't work for me. I want to establish a wireless connection via netcfg and get a wpa_supplicant error (see also the
above mentioned thread):

netcfg mynetworkprofile
----
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory

Here's my wpa_supplicant.conf

cat /etc/wpa_supplicant/wpa_supplicant.conf
----
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=network
update_config=1

Your wpa_supplicant.conf does not matter at all, netcfg creates its own file in /run/network/wpa.wlan0/wpa.conf and uses that.

Offline

#5 2012-09-03 20:41:40

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: netcfg, wpa_supplicant and not-existing /var/run/wpa_supplicant

Did you set up netcfg?  Namely, copying the relevant example from /etc/network.d/examples to /etc/network.d/mynetworkprofile and editing the contents.  Otherwise running a netcfg mynetworkprofile isn't going to do sh*t...

Offline

#6 2012-09-05 09:15:11

DerEnt
Member
Registered: 2012-09-03
Posts: 8

Re: netcfg, wpa_supplicant and not-existing /var/run/wpa_supplicant

bgc1954 wrote:

I think you really need to look at the wpa_supplicant wiki. https://wiki.archlinux.org/index.php/WPA_supplicant

Your wpa_supplicant.conf looks very short and seems to be missing alot of relavent info.  Also your conf file should be located at /etc/wpa_supplicant.conf.  It's all in the wiki. wink

I was thinking that netcfg is taking care of the editing process for wpa_supplicant.conf- which would be more elegant for managing several networks; still your're right from a didactic point of view, setting up wpa_supplicant manually should give me more understanding.

I will do that when i got the time for it and post my insights.

@wonderwoofy: Yes, i copied the example file for wireless-wpa to /etc/network.d/myprofile and edited the relevant sections (i will post the file when i have internet connection on my laptop again, due to other technical problems i cannot transfer it to the local computer i'm writing from right now).
Also static IP ethernet connection
works like a charm with netcfg! So there should be no problem with my setup of netcfg.


Edit:
Got the static IP issues in the office solved now, so here you go:

 
CONNECTION='wireless'
DESCRIPTION='A simple WPA encrypted wireless connection'
INTERFACE='wlan0'
SECURITY='wpa'

ESSID='Rock_n_Roll_WG'
## Uncomment if the supplied ESSID is hexadecimal
#ESSID_TYPE='hex'
KEY='s:myASCII-StringKey>'

IP='dhcp' 

# Uncomment this if your ssid is hidden
#HIDDEN=yes
TIMEOUT=60 # added this to rule out low connection

For now, i'm quite sure there is something weird going on with this ominous /var/run/wpa_supplicant
file which doesn't exist. Also "find /var/ | grep wpa_supplicant" doesn't return such a file at all.

Last edited by DerEnt (2012-09-05 09:57:14)

Offline

#7 2012-09-05 15:05:34

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: netcfg, wpa_supplicant and not-existing /var/run/wpa_supplicant

You know, /var/run/wpa_supplicant should not exist if you are not connected to anything (using wpa_supplicant).  It dynamically creates and destroys it depending on its status.  /var/run/wpa_supplicant is actually a directory, and it contains a single file called "wlan0=" when I am connected.

Sometimes if I do not shut down my network correctly it will tell me to remove /var/run/wpa_supplicant manually.  So I find that if I simply use either "netcfg down" first, or "netcfg reconnect <SSID>" it seems to reset whatever it is having the issue with.  I have not investigated what it is actually looking at when it reports that /var/run/wpa_supplicant is there, as this seems to solve my problem. 

I was using wicd to set up some networking, and I forgot to disconnect and killed the daemon (which disconnected me, just not cleanly).  So when I restarted net-auto-wireless, this is when I discovered that issue.  I am not even sure if I would consider my situation an issue rather than my own stupidity


Edit: I am not sure if this will help you, or even if it is related to your issue, but since you seemed to be stuck on the wpa_supplicant thing, I thought I would just tell you the issue it can sometimes give me.

Last edited by WonderWoofy (2012-09-05 15:06:35)

Offline

Board footer

Powered by FluxBB