You are not logged in.

#1 2008-10-25 17:36:59

finferflu
Forum Fellow
From: Manchester, UK
Registered: 2007-06-21
Posts: 1,899
Website

[SOLVED] netcfg and wpa_supplicant

After being so frustrated with NetworkManager and Wicd, I decided to come back to netcfg, but this time I have an encrypted WPA.

I have been trying to figure out how to configure netcfg with wpa_supplicant but so far I haven't been able to have any success.
Following this wiki page, I am able to successfully connect to my ESSID, with the following commands:

wpa_supplicant -B -Dwext -i wlan0 -c /etc/wpa_supplicant.conf
dhcpcd wlan0

However with the following netcfg profile I am unable to connect:

CONNECTION="wireless"
DESCRIPTION="Home connection"
INTERFACE=wlan0
SCAN="yes"
SECURITY="wpa-config"
ESSID="myessid"
IP="dhcp"
WPA_OPTS="-Dwext"
WPA_CONF="/etc/wpa_supplicant.conf"
DHCP_TIMEOUT=10

Before failing, it spits an error:

Failed to connect to wpa_supplicant - wpa_ctrl_open: Success

If I put SECURITY="wpa" instead, it fails without the above error (and I don't know which one is better tongue).

My wireless card is an Intel BCM4312, using the ndiswrapper driver.

Thanks for your time smile


Have you Syued today?
Free music for free people! | Earthlings

"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery

Offline

#2 2008-10-25 17:42:46

uastasi
Member
From: Salento - Italy
Registered: 2007-11-27
Posts: 247

Re: [SOLVED] netcfg and wpa_supplicant

Did you try to add some tweaks such as prescan and wpaessid into QUIRKS array?
You could also use SECURITY="wpa" instead of "wpa-config" if you don't need particular security settings.


Till the last battle, till the last bottle.
aur - twitter

Offline

#3 2008-10-25 17:56:54

finferflu
Forum Fellow
From: Manchester, UK
Registered: 2007-06-21
Posts: 1,899
Website

Re: [SOLVED] netcfg and wpa_supplicant

I tried with those tweaks as you suggested, but it didn't work.
Also, as I said, either wpa or wpa-config do not work... perhaps the only change I could see was this:

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

Have you Syued today?
Free music for free people! | Earthlings

"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery

Offline

#4 2008-10-25 18:06:38

uastasi
Member
From: Salento - Italy
Registered: 2007-11-27
Posts: 247

Re: [SOLVED] netcfg and wpa_supplicant

I'd try to change some parameters like this:
SCAN="no"
DHCP_TIMEOUT=20

and finally would check is /var/run/wpa_supplicant is created when netcfg2 is running.


Till the last battle, till the last bottle.
aur - twitter

Offline

#5 2008-10-25 18:20:33

finferflu
Forum Fellow
From: Manchester, UK
Registered: 2007-06-21
Posts: 1,899
Website

Re: [SOLVED] netcfg and wpa_supplicant

I did that: if I leave the profile with the QUIRKS enabled, I get this error:

:: home up  - wpa_supplicant did not start, possible configuration err

Else, I get the usual:

Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
> ls /var/run | grep wpa_supplicant

So it's not created (I had created it manually before, noticing the weird behaviour, but what is weirder is that the folder has disappeared now).


Have you Syued today?
Free music for free people! | Earthlings

"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery

Offline

#6 2008-10-26 03:04:43

my0pic
Member
From: Melbourne, Australia
Registered: 2008-05-23
Posts: 206

Re: [SOLVED] netcfg and wpa_supplicant

finferflu have you seen moljac024's post? Might be relevant to your issue.

Offline

#7 2008-10-26 05:01:02

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: [SOLVED] netcfg and wpa_supplicant

Finferflu: please post the ENTIRE output, not just the pieces you believe are relevant.

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

This message is totally harmless.

To check for association netcfg keeps checking wpa_cli status until it get's the state "COMPLETED". Occassionally wpa_supplicant takes a bit longer to start up and isn't ready for wpa_cli, so wpa_cli fails with the above message. The loop ignores this and keeps going as usually the second time around wpa_supplicant is ready to be interrogated by wpa_cli.

Also, WPA_OPTS="-Dwext" is redundant, that's already passed by netcfg, so remove the variable.

Last edited by iphitus (2008-10-26 05:03:04)

Offline

#8 2008-10-26 10:54:15

finferflu
Forum Fellow
From: Manchester, UK
Registered: 2007-06-21
Posts: 1,899
Website

Re: [SOLVED] netcfg and wpa_supplicant

Apparently it was a driver issue. I have ditched ndiswrapper for broadcom-wl, and it worked straight away.

Iphitus, the output I posted was the whole output (I just skipped the prompt).

Thank you all for your support smile


Have you Syued today?
Free music for free people! | Earthlings

"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery

Offline

Board footer

Powered by FluxBB