You are not logged in.

#1 2009-04-11 04:01:08

SubGothius
Member
Registered: 2009-04-07
Posts: 13

[SOLVED]Hidden ssid + WPA fails w/ netcfg, but comes up fine manually?

Greets,

Just got Arch installed on my ThinkPad T42p and updated with pacman -Syu, trying to get my wifi using WPA-PSK and a hidden ssid to connect automatically at boot, or even bring it up at all with a netcfg profile.  I've got an Atheros 5k card, using madwifi (since the ath5k driver doesn't seem to work with wpa_supplicant yet?), and I can bring up a connection manually just fine with this procedure:

# ifconfig ath0 up
# iwconfig ath0 essid mySSIDgoesHere
# wpa_supplicant -B -Dwext -i ath0 -c /etc/wpa_supplicant.conf
# dhcpcd ath0

That success suggests my /etc/wpa_supplicant.conf is fine:

/etc/wpa_supplicant.conf

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel

network={
  ssid="mySSIDgoesHere"
  psk="myHexKeyGoesHere"
}

However, I can't bring it up using a netcfg profile, neither automatically during boot nor invoking by shell command 'netcfg home' after boot, always results in a "Wireless association failed" error, regardless of how high I set the TIMEOUT= variable.  This suggests there's something amiss in my /etc/network.d/home profile config:

/etc/network.d/home

CONNECTION="wireless"
INTERFACE="ath0"
SECURITY="wpa"
ESSID="mySSIDgoesHere"
KEY="myHexKeyGoesHere"
IP="dhcp"
TIMEOUT=30

I've also tried this alternate config, based on stuff I've read around here:

/etc/network.d/home

CONNECTION="wireless"
INTERFACE="ath0"
SECURITY=wpa-config
WPA_CONF=/etc/wpa_supplicant.conf
IP="dhcp"
TIMEOUT=30

Here's my /etc/rc.conf (excerpt of relevant lines):

...
MODULES=(... !ath5k ath_hal ath_pci wlan ...)
...
#ath0="dhcp" # netcfg wiki says this is unnecessary
#INTERFACES=(ath0) # netcfg wiki says this is unnecessary
...
gateway="default gw 192.168.0.1"
ROUTES=(!gateway)
...
NETWORKS="home ethernet" # 'ethernet' profile for wired cxn, works fine when plugged in
AUTO_NETWORKS="home ethernet"
...
DAEMONS=(net-profiles net-auto @syslog-ng netfs @crond) # netcfg wiki says 'network' is unnecessary here

So folks, what am I missing? hmm

Last edited by SubGothius (2009-04-12 11:02:47)


Best regards,
-Tye
"In theory, there's no difference between theory and practice, but in practice, there is." (-Jan L.A. van de Snepscheut)

Offline

#2 2009-04-11 06:26:28

hokasch
Member
Registered: 2007-09-23
Posts: 1,461

Re: [SOLVED]Hidden ssid + WPA fails w/ netcfg, but comes up fine manually?

Try adding

WPA_OPTS="-Dwext"
SCAN=no

to your netcfg profile.

edit: if you want to use madwifi drivers, you may have to rebuild wpa_supplicant.

Last edited by hokasch (2009-04-11 06:34:51)

Offline

#3 2009-04-11 06:34:08

area
Member
Registered: 2008-09-18
Posts: 43

Re: [SOLVED]Hidden ssid + WPA fails w/ netcfg, but comes up fine manually?

1) try adding this to your supplicant config

key_mgmt=WPA-PSK

2) have you tried the ath5k driver? I have a 9k series card and the stock driver works fine with wpa_supplicent, etc..

Last edited by area (2009-04-11 06:36:29)

Offline

#4 2009-04-12 09:47:37

SubGothius
Member
Registered: 2009-04-07
Posts: 13

Re: [SOLVED]Hidden ssid + WPA fails w/ netcfg, but comes up fine manually?

SOLVED! cool

Thanks for the suggestions; sadly, they didn't work, but something else finally resolved the issue for me.

I had to add scan_ssid=1 to the network={} block of my /etc/wpa_supplicant.conf, and I also got the ath5k driver to work for me with the right netcfg profile (altho' I also got madwifi to work, too).  Here are the configs that finally worked for me:

/etc/wpa_supplicant.conf

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel

network={
  scan_ssid=1
  ssid="mySSIDgoesHere"
  psk="myHexKeyGoesHere"
}

/etc/network.d/home

CONNECTION="wireless"
# INTERFACE="ath0" # for madwifi
INTERFACE="wlan0" # for ath5k
SECURITY=wpa-config
WPA_CONF=/etc/wpa_supplicant.conf
IP="dhcp"
# TIMEOUT=60 # for madwifi
TIMEOUT=30 # for ath5k

Apparently these parameters don't actually work:

SECURITY="wpa"
ESSID="mySSIDgoesHere"
KEY="myHexKeyGoesHere"

...even though those are provided in /etc/network.d/examples/wpa.example as "reasonable defaults" for WPA! roll


Best regards,
-Tye
"In theory, there's no difference between theory and practice, but in practice, there is." (-Jan L.A. van de Snepscheut)

Offline

#5 2009-05-15 11:06:41

linfan
Member
From: Stockholm, Sweden
Registered: 2004-04-23
Posts: 135

Re: [SOLVED]Hidden ssid + WPA fails w/ netcfg, but comes up fine manually?

ath5k has replaced ath-pci and madwifi package is not needed any more. ath0 in net-profiles should be changed to wlan0 and ath5k added to the modules in /etc/rc.conf.

However wpa is fucked up and doesn't work with ath5k since the two latest kernel upgrades.

See http://bugs.archlinux.org/task/9202 and
https://lists.linux-foundation.org/pipe … 21762.html

I have reverted to the madwifi-newhal-svn package which unfortunately recently got deleted from AUR. I have the PKGBUILD saved on my computer.

Offline

#6 2010-07-09 10:45:52

keplerspeed
Member
From: Australia
Registered: 2010-06-01
Posts: 2

Re: [SOLVED]Hidden ssid + WPA fails w/ netcfg, but comes up fine manually?

This may be an old thread, but still relevant. To connect to an AP with hidden SSID using netcfg, use PRE_UP as outlined here: [wiki]Netcfg#Wireless_association_failed[/wiki].

Offline

#7 2010-07-09 10:49:11

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: [SOLVED]Hidden ssid + WPA fails w/ netcfg, but comes up fine manually?

You link to our very wiki, It's already documented, no need to resurrect an old thread for that.

http://wiki.archlinux.org/index.php/For … Bumping.27


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

Board footer

Powered by FluxBB