Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
wpa_supplicant fails at startup[SOLVED]
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
nadi
Apprentice
Apprentice


Joined: 06 Aug 2004
Posts: 280
Location: Norway

PostPosted: Tue Mar 28, 2006 5:11 pm    Post subject: wpa_supplicant fails at startup[SOLVED] Reply with quote

Hei gentooers!

I am starting this thread, as a desperate attempt to get my wireless network to go up at startup. I tried wireless_tools, but with no success (http://forums.gentoo.org/viewtopic-t-446968.html ).

I cannot get my wpa_supplicant with madwifi to start at boot. I CAN get it to work manually, using the following command:
Code:
nadi linux # wpa_supplicant -iath0 -c /etc/wpa_supplicant.conf -Dmadwifi -d -B

which is fine, and then doing
Code:
 dhcpcd ath0

and everyhting fine, I have network. But at boot time, or using /etc/init.d/net.ath0 restart,
I get the next (TERRIBLE) message
Code:

nadi etc # init.d/net.ath0 start
 * Caching service dependencies ...
 *  Cannot add provide 'authdaemond', as a service with the same name exists!                                                                    [ ok ]
 * Starting ath0
 *   Starting wpa_supplicant on ath0 ...                                                                                                         [ ok ]
 *     timed out                                                                                                                                            [ !! ]


my /etc/wpa_supplicant.conf is
Code:
ctrl_interface_group=0
#eapol_version=1
ap_scan=2
#fast_reauth=1
# Static WEP keys
ctrl_interface=/var/run/wpa_supplicant

network={
        ssid="felix"
        key_mgmt=NONE
        wep_key0="xxxxxxxxxx"
        wep_tx_keyidx=0
        priority=5
}


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

modules=( "!iwconfig" )
#------------------------------------------
# for use of wpa_supplicant
modules=( "wpa_supplicant" )
wpa_supplicant_ath0="-B -Dmadwifi"
config_felix=( "dhcp" )
dhcpcd_felix="-t 25 -D -N"


Any ideas why it does not start using the init.d/net.ath0 start?
Nadi

EDIT:
kernel 2.6.15,
wpa_supplicant 0.4.8
madwifi-tools-0.1485.20060325
madwifi-driver 0.1485.20060325


Last edited by nadi on Thu May 25, 2006 7:34 am; edited 1 time in total
Back to top
View user's profile Send private message
msalerno
Veteran
Veteran


Joined: 17 Dec 2002
Posts: 1336
Location: Sweating in South Florida

PostPosted: Tue Mar 28, 2006 6:22 pm    Post subject: Reply with quote

Check out
http://forums.gentoo.org/viewtopic-t-437101-highlight-wpasupplicant.html

In short: set wpa_timeout_ath0=90 in /etc/conf.d/net
_________________
When harmonious relationships dissolve
Then respect and devotion arise;
When a nation falls to chaos
Then loyalty and patriotism are born.
-Lao Tse
Back to top
View user's profile Send private message
nadi
Apprentice
Apprentice


Joined: 06 Aug 2004
Posts: 280
Location: Norway

PostPosted: Tue Mar 28, 2006 8:42 pm    Post subject: Reply with quote

thanks msalerno, but alas, i does not work. I tried 90 sec, it still time out.
I dont understand why it times out when using init.t/net.ath0 restart, but not if I do it manually,
Code:
wpa_supplicant -iath0 -c /etc/wpa_supplicant.conf -Dmadwifi -d -B
dhcpcd ath0

then it takes only 10 seconds to get the wireless functioning. I guess wpa_supplicant config is ok, since it is working manually, but something is wrong with the dhcpcd, my config files seems ok! It is the same problem you had at http://forums.gentoo.org/viewtopic-t-437101.html , but 90 sec in conf.d/net did not work for me.
Other ideas?

Anyone? Uberlord???
Back to top
View user's profile Send private message
opopanax
Apprentice
Apprentice


Joined: 30 Aug 2004
Posts: 244
Location: Olympia, WA

PostPosted: Tue Mar 28, 2006 9:38 pm    Post subject: Reply with quote

From what I've heard, and look on some posts 'round here, later versions of wpa_supplicant and madwifi don't play. I had a card that worked with madwifi just fine, but wpa was out of the question. However, I was able to use ndiswrapper--that may be a (less elegant) solution for you as well.
_________________
--The Podfish

Life... is like a grapefruit. It's orange and squishy, and has a few pips in it, and some folks have half a one for breakfast.
Douglas Adams (1952 - 2001)
Back to top
View user's profile Send private message
nadi
Apprentice
Apprentice


Joined: 06 Aug 2004
Posts: 280
Location: Norway

PostPosted: Thu Mar 30, 2006 12:52 pm    Post subject: Reply with quote

thanks.

Again, I dont see any reason why wpa_suplpicant will work from the command line, and NOT from boot. wpa_supplicant is working, but DHCP does not bring up the network regardless of the timeout value.
dhcp DOES bting up the network if, after giving the command
Code:
wpa_supplicant -iath0 -c /etc/wpa_supplicant.conf -Dmadwifi -d -B

I am then writing
Code:

dhcpcd ath0

Is something wrong with net.lo? because this stuff does not work automatically, when writing /etc/init.d/net.ath0 restart.

aarrrgrgrgrgrgrgggggg :evil:
Back to top
View user's profile Send private message
braindead0
Tux's lil' helper
Tux's lil' helper


Joined: 29 Apr 2003
Posts: 144
Location: Ohio

PostPosted: Thu Mar 30, 2006 2:43 pm    Post subject: Reply with quote

Just chiming in here with the same problem.

My guess is that for some reason the init script isn't seeing that the interface is 'up' so it doesn't continue with dhcp and the like. When I turned on debugging of wpa_supplicant, the last line that came out was 'Daemon' (or something similar). From there the script simply times out.

That of course doesn't answer why it will start from as console prompt, but pretty much nowhere else.

I tried starting it in local.start, no luck there. I tried starting when I login to bash, no luck there. I even put it in my icewm startup script, again that didn't work.

This is very very odd methinks.
_________________
Poxart
Back to top
View user's profile Send private message
nadi
Apprentice
Apprentice


Joined: 06 Aug 2004
Posts: 280
Location: Norway

PostPosted: Thu Mar 30, 2006 3:45 pm    Post subject: Reply with quote

I have a small irritating solution: put the two lines above (wpa_supplicant and dhcpcd) in local.start. Then by doing init.d/local restart, you get the network, and at boot, it will start anyway local, so you get a network.

But this is really only a painkiller to a bad desease, not a cure....

Nadi
Back to top
View user's profile Send private message
braindead0
Tux's lil' helper
Tux's lil' helper


Joined: 29 Apr 2003
Posts: 144
Location: Ohio

PostPosted: Thu Mar 30, 2006 4:05 pm    Post subject: Reply with quote

After reading your post earlier, I thought about that.. then I thought I'd try something else... I changed the settings on ath0 to a static IP address.

Not sure if it worked or not yet as this system is at home... although it does seem to be dead at this point (ssh'd into another box).. I may have messed up the configuration in net.

If that doesn't work, I'll go your suggested route just to get the darned thing to startup.

Now if I can figure out why it goes down.. I've got safetynet monitoring it and it appears that wpa_supplicant crashes at least on occassion. I'll know more of course when I can see how often it happens..
_________________
Poxart
Back to top
View user's profile Send private message
braindead0
Tux's lil' helper
Tux's lil' helper


Joined: 29 Apr 2003
Posts: 144
Location: Ohio

PostPosted: Mon Apr 03, 2006 12:37 pm    Post subject: Reply with quote

Just a follow up, I tried setting my IP to static just to see if it's an issue with DHCP. That didn't help.

I worked around this with the irritating solution noted by nadi ;-)
_________________
Poxart
Back to top
View user's profile Send private message
Bombs14
Tux's lil' helper
Tux's lil' helper


Joined: 03 Sep 2003
Posts: 140

PostPosted: Wed Apr 05, 2006 9:26 pm    Post subject: Reply with quote

I have the same problem, and it seems to not only connect to the access point if the access point needs an authentication key. If I remove the key needed to connect to the access point, the wireless card will connect to the access point on startup.
Back to top
View user's profile Send private message
braindead0
Tux's lil' helper
Tux's lil' helper


Joined: 29 Apr 2003
Posts: 144
Location: Ohio

PostPosted: Fri Apr 07, 2006 3:28 pm    Post subject: Reply with quote

I'm going to try and debug this problem, as best I can tell the likely problem is in /lib/rcscripts/net.modules.d/wpa_supplicant.

The 'wpa_supplicant_pre_start()' function in that file might be what's timing out. Why it works from command line I'm not sure. If I find the problem I'll report back here of course.
_________________
Poxart
Back to top
View user's profile Send private message
WackyDoo
n00b
n00b


Joined: 16 Mar 2004
Posts: 42
Location: Ottawa

PostPosted: Tue Apr 11, 2006 1:37 pm    Post subject: Reply with quote

nadi wrote:
thanks.

Again, I dont see any reason why wpa_suplpicant will work from the command line, and NOT from boot. wpa_supplicant is working, but DHCP does not bring up the network regardless of the timeout value.
dhcp DOES bting up the network if, after giving the command
Code:
wpa_supplicant -iath0 -c /etc/wpa_supplicant.conf -Dmadwifi -d -B

I am then writing
Code:

dhcpcd ath0

Is something wrong with net.lo? because this stuff does not work automatically, when writing /etc/init.d/net.ath0 restart.

aarrrgrgrgrgrgrgggggg :evil:


It think it is some weird timing problem. I am using wpa-psk (not wpa2) on my dlink di-624 with recent wpa_supplicant and madwifi from portage. On my machine with a dlink pci wireless card, DHCP from the di-624 works fine under windows but times out under linux. If I manually configure an IP address all is fine.

Last night I disabled DHCP on the router and enabled dnsmasq from portage on another wired gentoo box. Now my wireless works using DHCP under linux! [ Edit: WPA2 also works now, and has a much faster association. Maybe my timeout problems have gone away?]

My biggest frustration is that after a period of inactivity, the wireless machine (192.168.2.3) seems to drop out of the router's (192.168.2.1) routing tables. When I ping it from the the wired machine (192.168.2.2) I get no reply:

Code:

junior ~ # ping 192.168.2.3
PING 192.168.2.3 (192.168.2.3) 56(84) bytes of data.

--- 192.168.2.3 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2009ms

junior ~ # ip route
192.168.2.0/24 dev br0  proto kernel  scope link  src 192.168.2.2
127.0.0.0/8 dev lo  scope link
default via 192.168.2.1 dev br0


Last edited by WackyDoo on Sat Apr 15, 2006 8:27 pm; edited 1 time in total
Back to top
View user's profile Send private message
salivian
Tux's lil' helper
Tux's lil' helper


Joined: 15 Sep 2002
Posts: 91

PostPosted: Sat Apr 15, 2006 6:14 pm    Post subject: Reply with quote

I recently encounter a similar problem ...

are you using bash 3.1 or 3.0 ?
Back to top
View user's profile Send private message
John-Boy
Guru
Guru


Joined: 23 Jun 2004
Posts: 436
Location: Desperately seeking Moksha in all the wrong places

PostPosted: Sat Apr 15, 2006 9:30 pm    Post subject: Reply with quote

salivian wrote:
I recently encounter a similar problem ...

are you using bash 3.1 or 3.0 ?


I'm using ndiswrapper, just upgraded bash and wpa_supplicant is playing up for me, funny you should mention it.
_________________
When you break rules, break 'em good and hard
Back to top
View user's profile Send private message
Rüpel
Guru
Guru


Joined: 06 Nov 2002
Posts: 310
Location: Berlin/Germany

PostPosted: Sat Apr 15, 2006 11:03 pm    Post subject: Reply with quote

I just wanted to say "Hello, here's another one with the same problem." :?

I'm using ndiswrapper (:twisted:) and I tried both, dhcp and fixed setup. set up manually everything works. set up via conf.d/net and started via init.d/net.wlan0 I also get the unfriendly "timed out !!" message. :(

Did someone already file a bug on that issue?
_________________
:wq
Back to top
View user's profile Send private message
salivian
Tux's lil' helper
Tux's lil' helper


Joined: 15 Sep 2002
Posts: 91

PostPosted: Sun Apr 16, 2006 3:49 am    Post subject: Reply with quote

if you are running bash 3.1 and have a similar problem with wpa_supplicant.

please take a look at my answer at ...

http://forums.gentoo.org/viewtopic-p-3259998.html#3259998

I think someone can fix it better than my adhoc solution
Back to top
View user's profile Send private message
braindead0
Tux's lil' helper
Tux's lil' helper


Joined: 29 Apr 2003
Posts: 144
Location: Ohio

PostPosted: Fri Apr 21, 2006 12:14 pm    Post subject: Reply with quote

I tried the solution from that thread, still failed. The interesting this was after adding net.ath0 back to default, and shutting down my local startup of the nic.. running rc started up net.ath0 (which is better than I had before).

After rebooting though, it still times out...arg...

Now if I can just figure out why my card drops connection every now and again...hopefully I can fix that by moving my wap around or something (link quality runs around 35/94.. probably not good)
_________________
Poxart
Back to top
View user's profile Send private message
nadi
Apprentice
Apprentice


Joined: 06 Aug 2004
Posts: 280
Location: Norway

PostPosted: Sat Apr 22, 2006 2:15 pm    Post subject: Reply with quote

Hei, braindead0, I have the same thing here. we have problably the same bug AND my connection drops every now and then, I did not find any consistency.
I actually gave up and when back to my good stable 2.6.12, everyhting is working fine, though I dont have suspend2 there.
Nadi
Back to top
View user's profile Send private message
fennex
Tux's lil' helper
Tux's lil' helper


Joined: 20 Jan 2004
Posts: 106
Location: Zurich, Europe

PostPosted: Sun Apr 23, 2006 2:20 pm    Post subject: Reply with quote

Just a quick note:

Working fine here with:
Code:
sys-kernel/gentoo-sources-2.6.12-r9
net-wireless/wpa_supplicant-0.4.8
net-wireless/madwifi-ng-0.1502.20060414
net-wireless/madwifi-ng-tools-0.1502.20060414


Fennex
Back to top
View user's profile Send private message
braindead0
Tux's lil' helper
Tux's lil' helper


Joined: 29 Apr 2003
Posts: 144
Location: Ohio

PostPosted: Mon Apr 24, 2006 12:20 pm    Post subject: Reply with quote

fennex wrote:
Just a quick note:

Working fine here with:
Code:
sys-kernel/gentoo-sources-2.6.12-r9
net-wireless/wpa_supplicant-0.4.8
net-wireless/madwifi-ng-0.1502.20060414
net-wireless/madwifi-ng-tools-0.1502.20060414


Fennex

Thanks for the details on that, I think I'll back my kernel down to 2.6.12. This is just a MythTV box and fully protected, so I probably don't need to keep worry too much about kernel upgrades.

I'll get all my versions matching that and should have results back soon.

ack, question.. how do I get 2.6.12? It doesn't appear to be in portage anymore, and silly me.. I clean out my sources on a fairly regular basis. I do have 2.6.12-r10 on a box at home....
_________________
Poxart
Back to top
View user's profile Send private message
nadi
Apprentice
Apprentice


Joined: 06 Aug 2004
Posts: 280
Location: Norway

PostPosted: Mon Apr 24, 2006 8:46 pm    Post subject: Reply with quote

well, it always worked for me at kernel 2.6.12-r6, both wpa_supplicant and iwconfig methods. BUT, I am using suspend2 patches to kernel 2.6.15-r8 and I did not find patches for 2.6.12 kernels. I really need this suspend2 staff, it is SO much easier with laptop to just close the lid or suspend to disk and then re-initiate in no-time. It is just that the wireless network is broken for 2.6.15.

Oh well, let us hope it will be fixed in 2.6.16. If I could contribute in a way, but I am not a programmer...

N
_________________
-----------
Blue Skies!
Back to top
View user's profile Send private message
braindead0
Tux's lil' helper
Tux's lil' helper


Joined: 29 Apr 2003
Posts: 144
Location: Ohio

PostPosted: Mon Apr 24, 2006 9:07 pm    Post subject: Reply with quote

I'm about to try out 2.6.16-r3, I'll not know the results until I get home tonight, and of course I'll not know for sure if the wireless dropping out is fixed for a while. But I should be able to try out the startup problem.
_________________
Poxart
Back to top
View user's profile Send private message
braindead0
Tux's lil' helper
Tux's lil' helper


Joined: 29 Apr 2003
Posts: 144
Location: Ohio

PostPosted: Tue Apr 25, 2006 12:31 pm    Post subject: Reply with quote

Well that idea failed miserably... Well, nvidia kernel driver wouldn't load on that kernel (something about the license tainting the kernel) and I couldn't get the wifi to startup at all.

The really weird thing now is that I went back to the old kernel, rebuilt madwifi/wpa/nvidia/alsa..etc..etc....

And now the wifi doesn't work at all, running wpa_supplicant with -dd gives me lots of info, it starts and then stop for a bit at:
<EDIT>

Found what broke there, in an attempt to get madwifi to work with the later kernel, I used ~x86 keyword, took that out of package.keywords and badabing, back where I was before.. at least it appears to work..
_________________
Poxart
Back to top
View user's profile Send private message
braindead0
Tux's lil' helper
Tux's lil' helper


Joined: 29 Apr 2003
Posts: 144
Location: Ohio

PostPosted: Tue Apr 25, 2006 1:56 pm    Post subject: Reply with quote

Okay, figured what the heck and added ~x86 to baselayout.. now it appears that starting up ath0 via the normal rc_scripts it working fine.

I'll have to monitor it to see if the dropouts go away.. I have a feeling that this particular NIC may not be so good. My link quality now is Link Quality=49/94, I'd expect better with the WAP sitting about 8' away in the same room.. I know the WAP is good as my laptop and pocket PC both show really high signal strength.. or perhaps the 'link quality' isn't the same measurement...
_________________
Poxart
Back to top
View user's profile Send private message
braindead0
Tux's lil' helper
Tux's lil' helper


Joined: 29 Apr 2003
Posts: 144
Location: Ohio

PostPosted: Tue Apr 25, 2006 11:10 pm    Post subject: Reply with quote

Still dropping the interface, but at least now I can simply restart net.ath0.

One caveat, baselayout 1.12 forks the init of interfaces off into the background so in this case it doesn't finish starting up when ntp-client starts for example, I'm sure this could cause other problems but that's the only one I'm having at this time.

edit: turns out that dhcpcd runs for a short bit and seems to die when booting up.. I don't get an addy at that point.. restart of net.ath0 gets an addy and everything is fine.. perhaps now I need to tweak the timeout (I think I've got it set to 10 or something)....

arg...
;-)
_________________
Poxart
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
Goto page 1, 2  Next
Page 1 of 2

 
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