Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ath0 won't load: a wpa_supplicant / baselayout problem?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
cgmd
Veteran
Veteran


Joined: 17 Feb 2005
Posts: 1585
Location: Louisiana

PostPosted: Mon Oct 23, 2006 4:35 am    Post subject: ath0 won't load: a wpa_supplicant / baselayout problem? Reply with quote

Hi, All...

I'm using an IBM ThinkPad T-30 (pcmcia card with atheros chipset and madwifi driver). The same laptop, with a prior install of gentoo, experienced a fatal file system problem, and, now has been reformatted with gentoo being reinsalled. Wireless worked without problem before the laptop file disaster and the subsequent os reinstallation.

My problem is with wpa_supplicant and ath0 which only load some of the time during boot but, usually, requiring manual intervention to get ath0 going. During boot I see one of three different senarios...

First is a rare good restart in which I have a fully operational ath0 at conclusion of boot:
Code:

* Starting ath0                                                             
*     Starting wpa_supplicant on ath0 ...                           [ ok ]
*     Starting wpa_cli on ath0 ...                                       [ ok ]
*        Backgrounding ...
* Starting eth0


Second is the more frequent boot in which ath0 fails:
Code:

* Starting ath0                                                               
*     Starting wpa_supplicant on ath0 ...                            [ ok ]
*      Starting wpa_cli on ath0 ...                                      [ ok ]
Failed to connect to wpa_supplicant - wpa_ctrl_open:  Address already in use             [ !! ]


The third senario in which ath0 also fails to start looks like this:
Code:

* Starting ath0                                                               [ ok ]
*     Starting wpa_supplicant on ath0 ...                            [ ok ]
bind(PF_UNIX):  Address already in use           
*      Starting wpa_cli on ath0 ...                                      [ !! ]
Failed to connect to wpa_supplicant - wpa_ctrl_open:  Address already in use


If ath0 has failed, as in these last two senarios, with the wpa_ctrl_open: Address already in use statement, I can run:
Code:

rm /var/run/wpa_supplicant/ath0

...and then I am able to manually start ath0, or, also, even a reboot will allow ath0 to start automatically.

Finally, if I debug wpa_supplicant immediately after I see a failed ath0 start, I get the following output:
Code:

# wpa_supplicant -iath0 -c/etc/wpa_supplicant.conf -d
Initializing interface 'ath0' conf '/etc/wpa_supplicant.conf' driver 'default' ctrl_interface 'N/A' bridge 'N/A'
Configuration file '/etc/wpa_supplicant.conf' -> '/etc/wpa_supplicant.conf'
Reading configuration file '/etc/wpa_supplicant.conf'
ctrl_interface='/var/run/wpa_supplicant'
ctrl_interface_group=10 (from group name 'wheel')
eapol_version=1
ap_scan=1
fast_reauth=1
Priority group 5
   id=0 ssid='griswold'
Priority group 0
   id=1 ssid=''
Initializing interface (2) 'ath0'
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: KEY_RX entering state NO_KEY_RECEIVE
EAPOL: SUPP_BE entering state INITIALIZE
EAP: EAP entering state DISABLED
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
SIOCGIWRANGE: WE(compiled)=20 WE(source)=13 enc_capa=0xf
  capabilities: key_mgmt 0xf enc 0xf
WEXT: Operstate: linkmode=1, operstate=5
Own MAC address: 00:14:6c:03:cd:da
wpa_driver_hostap_set_wpa: enabled=1
wpa_driver_hostap_set_key: alg=none key_idx=0 set_tx=0 seq_len=0 key_len=0
ioctl[PRISM2_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
wpa_driver_hostap_set_key: alg=none key_idx=1 set_tx=0 seq_len=0 key_len=0
ioctl[PRISM2_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
wpa_driver_hostap_set_key: alg=none key_idx=2 set_tx=0 seq_len=0 key_len=0
ioctl[PRISM2_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
wpa_driver_hostap_set_key: alg=none key_idx=3 set_tx=0 seq_len=0 key_len=0
ioctl[PRISM2_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
wpa_driver_hostap_set_countermeasures: enabled=0
wpa_driver_hostap_set_drop_unencrypted: enabled=1
Setting scan request: 0 sec 100000 usec
Using existing control interface directory.
bind(PF_UNIX): Address already in use
ctrl_iface exists and seems to be in use - cannot override it
Delete '/var/run/wpa_supplicant/ath0' manually if it is not used anymore
Failed to initialize control interface '/var/run/wpa_supplicant'.
You may have another wpa_supplicant process already running or the file was
left by an unclean termination of wpa_supplicant in which case you will need
to manually remove this file before starting wpa_supplicant again.

Failed to add interface ath0
State: DISCONNECTED -> DISCONNECTED
WEXT: Operstate: linkmode=-1, operstate=5
No keys have been configured - skip key clearing
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
wpa_driver_hostap_set_wpa: enabled=0
ioctl[PRISM2_IOCTL_HOSTAPD]: Operation not supported
wpa_driver_hostap_set_drop_unencrypted: enabled=0
wpa_driver_hostap_set_countermeasures: enabled=0
No keys have been configured - skip key clearing
WEXT: Operstate: linkmode=0, operstate=6
Cancelling scan request


I don't understand the implications of much of this output, but the common theme seems to be well stated in the section:
Code:

Using existing control interface directory.
bind(PF_UNIX): Address already in use
ctrl_iface exists and seems to be in use - cannot override it
Delete '/var/run/wpa_supplicant/ath0' manually if it is not used anymore
Failed to initialize control interface '/var/run/wpa_supplicant'.
You may have another wpa_supplicant process already running or the file was
left by an unclean termination of wpa_supplicant in which case you will need
to manually remove this file before starting wpa_supplicant again.


If this is the case, what causes it, and, more importantly, what can I do to fix it? :?

I need some expert advice!

Thanks!
_________________
"Primum non nocere" ---Galen


Last edited by cgmd on Wed Oct 25, 2006 12:32 pm; edited 6 times in total
Back to top
View user's profile Send private message
darkmason
Tux's lil' helper
Tux's lil' helper


Joined: 31 Aug 2003
Posts: 116
Location: London, UK

PostPosted: Mon Oct 23, 2006 12:32 pm    Post subject: Reply with quote

I have the exact same problem. I can usually make it work if I do a
Code:
/etc/init.d/net.ath0 restart

after logging in, but I'm keen to know the reason why it fails.
_________________
emerge sex cowsay
sex | cowsay -f sodomized :o
sex | festival --tts :o :o :o
Back to top
View user's profile Send private message
cgmd
Veteran
Veteran


Joined: 17 Feb 2005
Posts: 1585
Location: Louisiana

PostPosted: Tue Oct 24, 2006 3:36 am    Post subject: Reply with quote

darkmason wrote:
Quote:
I have the exact same problem. I can usually make it work if I do a
Code:

/etc/init.d/net.ath0 restart



Your problem differs from mine, in as much as you can restart ath0...

For me to restart ath0, I must first do the following removal:
Code:
# rm /var/run/wpa_supplicant/ath0


...then, and only then, can I start ath0. :(
_________________
"Primum non nocere" ---Galen
Back to top
View user's profile Send private message
cgmd
Veteran
Veteran


Joined: 17 Feb 2005
Posts: 1585
Location: Louisiana

PostPosted: Wed Oct 25, 2006 12:01 am    Post subject: Reply with quote

I still struggle with this problem, and I don't seem to be gtting anyone's interest... :(

Perhaps someone can see something problematic in my setup :?:

This is my /etc/conf.d/net:
Code:

modules=( "dhcp" "wpa_supplicant" )

# Configuration of wired stuff
config_eth0=( "dhcp" )
dhcpcd_eth0="-t 10"


# Configuration of wireless - Netgear wg511t
config_ath0=( "dhcp" )
dhcpcd_ath0="-t 30"
wpa_supplicant_ath0="-Dmadwifi"
wpa_timeout_ath0=60




preferred_aps_ath0=( "cgmd-home" "cgmd-work" )

config_cgmd-home=( "dhcp" )
config_cgmd-work=( "dhcp" )



This is my wpa_supplicant configuration:
Code:

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=wheel

eapol_version=1

ap_scan=1

fast_reauth=1


# Home WLAN: WPA-PSK, PSK as an ASCII passphrase, allow all valid ciphers
network={
        proto=WPA
        ssid="cgmd-home"
        scan_ssid=0
        key_mgmt=WPA-PSK
        pairwise=TKIP
        group=TKIP
        psk="passwd"
        priority=5
}

# For "any" Open WLAN
network={
        ssid=""
        key_mgmt=NONE
}


As stated above, on a good reboot, ath0 works perfectly either @cgmd-home or @cgmd-work. Unfortunately, the good reboots are rare, and I have to then resort to a manual start of ath0, etc.

Please, someone, give me a hand with this! :?
_________________
"Primum non nocere" ---Galen
Back to top
View user's profile Send private message
cgmd
Veteran
Veteran


Joined: 17 Feb 2005
Posts: 1585
Location: Louisiana

PostPosted: Wed Oct 25, 2006 1:17 pm    Post subject: Reply with quote

I may be on to something...

Re-emerging baselayout:
Code:
 emerge -pv baselayout

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] sys-apps/baselayout-1.12.5-r2  USE="unicode -bootstrap -build -static" 0 kB

Total size of downloads: 0 kB


...seems to clear up the problem. :D

[Edit] Not really... It still occurs, albeit with less regularity. :?
_________________
"Primum non nocere" ---Galen
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum