Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
dhcp fails on boot... wireless [solved]
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
gmtongar
Apprentice
Apprentice


Joined: 21 Mar 2004
Posts: 224
Location: Kristiansand, Norway

PostPosted: Tue Nov 28, 2006 4:48 pm    Post subject: dhcp fails on boot... wireless [solved] Reply with quote

Hi!

I'm in desperat need of an advice here. :roll:

During boot my wireless tries to connect to my AP, but it fails, the error is something like:

Code:
Failed to connect to any wireless access points


But after login it's enough to run dhcpcd ath0, and I'm all set, up and running. This is how my /conf.d/net looks like:

Code:
modules=("iwconfig")
channel_ath0="11"
key_myESSID="[1] my_hex_key [1] enc open"
preferredonly=("myESSID")
#preferred_aps=("myESSID")
blacklist_aps=("NeighboursESSID1" "NeighboursESSID2")

config_ath0=("dhcp")


and when I, after login runs: iwconfig
Code:

ath0      IEEE 802.11g  ESSID:"myESSID"
          Mode:Managed  Frequency:2.462 GHz  Access Point: 00:0F:B5:22:D0:88
          Bit Rate:11 Mb/s   Tx-Power:18 dBm   Sensitivity=0/3
          Retry:off   RTS thr:off   Fragment thr:off
          Encryption key:my_hex_key   Security mode:open
          Power Management:off
          Link Quality=28/94  Signal level=-67 dBm  Noise level=-95 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0


The thing is my wireless gets associated correctly, but it doesn't get the dhcp request completed, it seems to me.

Anyone who can tip me on this_

thanks

gmtongar
_________________
"Did you understand the music, Yoko. Or was it all in vain" - r.waters


Last edited by gmtongar on Thu Nov 30, 2006 11:07 pm; edited 1 time in total
Back to top
View user's profile Send private message
Gentoo Bob
Tux's lil' helper
Tux's lil' helper


Joined: 12 Feb 2006
Posts: 129
Location: Sitting behind a PC in Indiana

PostPosted: Tue Nov 28, 2006 4:56 pm    Post subject: Reply with quote

Are you using WPA or WEP?
_________________
AMD 64 X2 4400+ on ECS nForce4
2GB DDR, 250GB SATA, GeForce 5500FX 256MB DDR2 PCI-E
---and----
Dell Inspiron E1505 Laptop
Intel Centrino Duo, 2GB RAM, 80GB SATA HDD, Intel3490 ABG Wireless,CDRW
Back to top
View user's profile Send private message
gmtongar
Apprentice
Apprentice


Joined: 21 Mar 2004
Posts: 224
Location: Kristiansand, Norway

PostPosted: Tue Nov 28, 2006 5:58 pm    Post subject: Reply with quote

Hi Gentoo bob

I'm using WEP
_________________
"Did you understand the music, Yoko. Or was it all in vain" - r.waters
Back to top
View user's profile Send private message
Gentoo Bob
Tux's lil' helper
Tux's lil' helper


Joined: 12 Feb 2006
Posts: 129
Location: Sitting behind a PC in Indiana

PostPosted: Tue Nov 28, 2006 6:12 pm    Post subject: try this... Reply with quote

trying doing this since your using WEP...create a script.

#!/bin/bash
modprobe (your module here, if you are using ndiswrapper, put ndiswrapper here)
iwconfig ath0 mode Managed
iwconfig ath0 key open (your key here)
iwconfig ath0 essid (your essid here)
dhcpcd ath0

save that file.

do a chmod +x (your file name here)

then at the command prompt type: ./(your file name)

Try that.
_________________
AMD 64 X2 4400+ on ECS nForce4
2GB DDR, 250GB SATA, GeForce 5500FX 256MB DDR2 PCI-E
---and----
Dell Inspiron E1505 Laptop
Intel Centrino Duo, 2GB RAM, 80GB SATA HDD, Intel3490 ABG Wireless,CDRW
Back to top
View user's profile Send private message
gmtongar
Apprentice
Apprentice


Joined: 21 Mar 2004
Posts: 224
Location: Kristiansand, Norway

PostPosted: Tue Nov 28, 2006 11:10 pm    Post subject: Reply with quote

Yes, I know, I ran that script before, but I think I am so close, it ought to work the plain and simple way. I just don't understand why it doesn't work. Works fine on a DELL laptop (Intel PRO Wireless 3945), but not with madwifi (not the same card, or machine).

I've used the script, but this time around I was hoping to do without... :x

gmtongar
_________________
"Did you understand the music, Yoko. Or was it all in vain" - r.waters
Back to top
View user's profile Send private message
martinm1000
Apprentice
Apprentice


Joined: 17 Apr 2003
Posts: 174
Location: Montréal, Canada

PostPosted: Wed Nov 29, 2006 12:00 am    Post subject: Reply with quote

if you updated yesterday dhcpcd version 3, downgrade to the previous version 2.

dhcpcd 3 doesn't work.

https://forums.gentoo.org/viewtopic-t-520236-start-0-postdays-0-postorder-asc-highlight-dhcpcd.html
Back to top
View user's profile Send private message
martinm1000
Apprentice
Apprentice


Joined: 17 Apr 2003
Posts: 174
Location: Montréal, Canada

PostPosted: Wed Nov 29, 2006 12:02 am    Post subject: Reply with quote

And they call it a version 3.0.0 ;-)

https://bugs.gentoo.org/show_bug.cgi?id=156515

Downgrading to version 2 works.
Back to top
View user's profile Send private message
gmtongar
Apprentice
Apprentice


Joined: 21 Mar 2004
Posts: 224
Location: Kristiansand, Norway

PostPosted: Wed Nov 29, 2006 12:56 am    Post subject: Reply with quote

Hi martinm

Just checked, I'm using v. 2.0.5

dhcp works, just not during boot configuring my wireless nic, dhcp works for my wired nic. After login it's enough to do dhcpcd ath0, and I got an IP.

Aaaaarrghhh! This pisses me off. Maybe I just have to bite the dust. Can't get it all, it seems.

gmtongar
_________________
"Did you understand the music, Yoko. Or was it all in vain" - r.waters
Back to top
View user's profile Send private message
wynn
Advocate
Advocate


Joined: 01 Apr 2005
Posts: 2421
Location: UK

PostPosted: Wed Nov 29, 2006 11:17 am    Post subject: Reply with quote

There's another thread here which might be helpful.

It has a post which points to a third thread...
_________________
The avatar is jorma, a "duck" from "Elephants Dream": the film and all the production materials have been made available under a Creative Commons Attribution 2.5 License, see orange.blender.org for details.
Back to top
View user's profile Send private message
gmtongar
Apprentice
Apprentice


Joined: 21 Mar 2004
Posts: 224
Location: Kristiansand, Norway

PostPosted: Wed Nov 29, 2006 11:42 am    Post subject: Reply with quote

Yes, that patch would be something... but the link to bugzilla turns out bad (dead or moved).
_________________
"Did you understand the music, Yoko. Or was it all in vain" - r.waters
Back to top
View user's profile Send private message
wynn
Advocate
Advocate


Joined: 01 Apr 2005
Posts: 2421
Location: UK

PostPosted: Wed Nov 29, 2006 11:52 am    Post subject: Reply with quote

The URI has a typo, it should be https://bugs.gentoo.org/show_bug.cgi?id=143698, it had a "." added on after the final 8 :)
_________________
The avatar is jorma, a "duck" from "Elephants Dream": the film and all the production materials have been made available under a Creative Commons Attribution 2.5 License, see orange.blender.org for details.
Back to top
View user's profile Send private message
gmtongar
Apprentice
Apprentice


Joined: 21 Mar 2004
Posts: 224
Location: Kristiansand, Norway

PostPosted: Wed Nov 29, 2006 1:10 pm    Post subject: Reply with quote

Sorry, missed that one... :oops:
_________________
"Did you understand the music, Yoko. Or was it all in vain" - r.waters
Back to top
View user's profile Send private message
gmtongar
Apprentice
Apprentice


Joined: 21 Mar 2004
Posts: 224
Location: Kristiansand, Norway

PostPosted: Thu Nov 30, 2006 12:59 am    Post subject: Reply with quote

Yes, wynn, that patch looks just right for me, I really think that one would be quite usefull. :roll: Yes, I can definetly see that patch as something very, very interesting, and actually the thing that we have been looking for.

Dare I be that bold, mr wynn, to come out straight forward and plea for some advice on how to use that patch, in a certain newbie kind of way? :roll:

Anyhow, thanks for pointing me the direction thus far... :wink:

gmtongar
_________________
"Did you understand the music, Yoko. Or was it all in vain" - r.waters
Back to top
View user's profile Send private message
wynn
Advocate
Advocate


Joined: 01 Apr 2005
Posts: 2421
Location: UK

PostPosted: Thu Nov 30, 2006 2:37 pm    Post subject: Reply with quote

I'll have another look at the patch — I seem to remember that there was more than one.

Unfortunately that "look" will have to wait, there is a database error message on bugs.gentoo.org at the moment.
_________________
The avatar is jorma, a "duck" from "Elephants Dream": the film and all the production materials have been made available under a Creative Commons Attribution 2.5 License, see orange.blender.org for details.
Back to top
View user's profile Send private message
gmtongar
Apprentice
Apprentice


Joined: 21 Mar 2004
Posts: 224
Location: Kristiansand, Norway

PostPosted: Thu Nov 30, 2006 4:34 pm    Post subject: Reply with quote

Quote:
I'll have another look at the patch — I seem to remember that there was more than one.

Unfortunately that "look" will have to wait, there is a database error message on bugs.gentoo.org at the moment.


Great!

Thanks, mate

This is my "last" problem, part from this Gentoo now runs just perfect, at least as far as I can tell.

gmtongar
_________________
"Did you understand the music, Yoko. Or was it all in vain" - r.waters
Back to top
View user's profile Send private message
wynn
Advocate
Advocate


Joined: 01 Apr 2005
Posts: 2421
Location: UK

PostPosted: Thu Nov 30, 2006 5:34 pm    Post subject: Reply with quote

If you were thinking of the "if_down_up_hack.patch" then all you have to do is to open /lib/rcscripts/net/iwconfig.sh in nano, search (^W) for "scanning" and you will be at this point
Code:
        done < <(iwlist "${iface}" scan 2>/dev/null)

        if ${error}; then
                ewarn "${iface} does not support scanning"
To add the patch, go to the blank line before "if ${error};" and add
Code:
       # HUP the interface as some drivers/cards need it
       interface_down ${iface}
       interface_up ${iface}
Is that what you wanted?
_________________
The avatar is jorma, a "duck" from "Elephants Dream": the film and all the production materials have been made available under a Creative Commons Attribution 2.5 License, see orange.blender.org for details.
Back to top
View user's profile Send private message
gmtongar
Apprentice
Apprentice


Joined: 21 Mar 2004
Posts: 224
Location: Kristiansand, Norway

PostPosted: Thu Nov 30, 2006 11:06 pm    Post subject: Reply with quote

Wow! Thanks, mate, it's working... it's working! The bloody thing is working! Finally.


Thanks, wynn. The plain and simple, just fantastic!
_________________
"Did you understand the music, Yoko. Or was it all in vain" - r.waters
Back to top
View user's profile Send private message
wynn
Advocate
Advocate


Joined: 01 Apr 2005
Posts: 2421
Location: UK

PostPosted: Fri Dec 01, 2006 11:31 am    Post subject: Reply with quote

I'm glad you've got it working.

Time to change to wpa_supplicant now, isn't it? :D
_________________
The avatar is jorma, a "duck" from "Elephants Dream": the film and all the production materials have been made available under a Creative Commons Attribution 2.5 License, see orange.blender.org for details.
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Fri Dec 01, 2006 11:57 am    Post subject: Reply with quote

gmtongar wrote:
The plain and simple, just fantastic!


And also causes major grief with other wireless drivers, so that madwifi only "fix" was removed.

But as I think about it, it may also have been caused by a long standing issue with dhcpcd. Basically versions 1 and 2 only sent 1 discover packet by default. So if it got lost over the wireless then tought.

With dhcpcd-3 we have a better approach were we re-send the request if we don't receive a valid DHCP packet every 3 seconds.
However, that had a new bug where we stopped listening after the first re-send - lol.
Anyway, I think all dhcpcd issues are now solved, so why not try out this tarball with the up/down hack removed.

http://dev.gentoo.org/~uberlord/dhcpcd-3.0.2_pre1.tar.bz2

Thanks for testing and getting back to me ;)
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
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