You are not logged in.

#1 2008-01-13 13:26:09

shearn89
Member
Registered: 2008-01-13
Posts: 16

Associate with AP, but no IP address?

Hey all - i think i've asked this question before, but i can't solve it this time.

Brief overview as i'm posting from my doze box (i'll attach various files in a bit):


i know my wpa_supplicant.conf file is fine, as i haven't changed it since it last worked. That isn't the problem (i think).

I run wpa_supplicant from a script launched by rc.local on boot up, and it associates with the AP, but fails to get an IP. I run "dhclient wlan0", and nothing comes.

<need to check> I think i have !network in my rc.conf, and my INTERFACES are (lo !eth0 !wlan0).

I'm using ndiswrapper.

thats all i can think of off the top of my head, i'll edit the post with all the conf files in about half an hour or so.

Any first ideas are most welcome.

EDIT: the files.
/etc/rc.conf

LOCALE="en_GB.utf8"
HARDWARECLOCK="localtime"
TIMEZONE="GMT"
KEYMAP="uk"
CONSOLEFONT="default8x16"
CONSOLEMAP=
USECOLOR="yes"

MOD_AUTOLOAD="yes"
MOD_BLACKLIST=()
MODULES=(ndiswrapper snd-via82xx snd-pcm-oss)
USELVM="no"

HOSTNAME="asgard"
lo="lo 127.0.0.1"
eth0="dhcp"
wlan0="dhcp"
INTERFACES=(lo !eth0 !wlan0)
gateway="default gw 192.168.0.1"
ROUTES=(gateway)
#NET_PROFILES=(home)

DAEMONS=(syslog-ng hal !network netfs alsa crond mpd)
SPLASH="splashy"

wpa_supplicant.conf

ctrl_interface=/var/run/wpa_supplicant
eapol_version=1
ap_scan=2
fast_reauth=1

network={
    ssid="GBS_Net"
    scan_ssid=1
    psk=alongstringofhex
    mode=0
    proto=WPA
    key_mgmt=WPA-PSK
    pairwise=CCMP
    group=CCMP
    priority=3
}

and lastly the command i use to run it:

wpa_supplicant -B -c/etc/wpa_supplicant.conf -iwlan0

shearn89

Last edited by shearn89 (2008-01-13 16:08:18)

Offline

#2 2008-01-13 16:24:29

kraluz
Member
From: Aveiro, Portugal
Registered: 2008-01-01
Posts: 30

Re: Associate with AP, but no IP address?

I think i have !network in my rc.conf, and my INTERFACES are (lo !eth0 !wlan0)

That extra "!" IS the problem. There is no problem in disabling the interfaces, but you can't disable the network daemon.

Offline

#3 2008-01-13 17:50:28

shearn89
Member
Registered: 2008-01-13
Posts: 16

Re: Associate with AP, but no IP address?

I tried removing it, and it doesn't make a difference. I have got it to work occaisonally, but only after playing around with commands like
"/etc/rc.d/network restart", "iwconfig wlan0 <parameters>", "ifconfig wlan0 up", "netcfg --stop wlan0", and i can never retrace my steps no matter how carefully i go.

I noticed when i start the network daemon i get an "SIOCADDRT: no such process" error.

Offline

#4 2008-01-13 19:44:54

pelle.k
Member
From: Åre, Sweden (EU)
Registered: 2006-04-30
Posts: 667

Re: Associate with AP, but no IP address?

try using dhcpcd instead of dhclient. my own wlan doesn't like dhclient very much...


"Your beliefs can be like fences that surround you.
You must first see them or you will not even realize that you are not free, simply because you will not see beyond the fences.
They will represent the boundaries of your experience."

SETH / Jane Roberts

Offline

#5 2008-01-13 21:54:53

kraluz
Member
From: Aveiro, Portugal
Registered: 2008-01-01
Posts: 30

Re: Associate with AP, but no IP address?

Here is the method I always use for troubleshooting:

kill dhcpcd (or whatever you are using) and wpa_supplicant

killall wpa_supplicant
killall dhcpcd

restart the network deamon

/etc/rc.d/network restart

then, on one terminal (as root) run:

wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf

(The "-B" flag was purposely left out -- we want it to run in the foreground)
If it spits out something with CTRL_EVENT_CONNECTED, then you can be sure it's not wpa_supplicant's fault, nor the drivers' (ndiswrapper is an evil tool of the devil tongue).

Also try to apend "-D wext" to the line above. For some obscure reason, sometimes wext works better than native drivers. I can't use ipw, for my Intel 2200BG, for example.

If it does associate, on another terminal, run dhcpcd with the "-d" (debug) flag:

dhcpcd -d wlan0

and please post the output of both commands.

Offline

#6 2008-01-14 09:50:45

byte
Member
From: Düsseldorf (DE)
Registered: 2006-05-01
Posts: 2,046

Re: Associate with AP, but no IP address?

"I noticed when i start the network daemon i get an "SIOCADDRT: no such process" error."

In rc.conf, either comment the ROUTES line or put a ! before gateway.


1000

Offline

#7 2008-01-14 13:22:57

shearn89
Member
Registered: 2008-01-13
Posts: 16

Re: Associate with AP, but no IP address?

byte wrote:

"I noticed when i start the network daemon i get an "SIOCADDRT: no such process" error."

In rc.conf, either comment the ROUTES line or put a ! before gateway.

I think this could be the problem - i found that it does work the way it's now set up (with network daemon enabled, but interfaces commented out), but i have to wait for about 5 minutes after running the wpa_supp command until it's completed before running dhclient, when it never used to take that long. I'll try it and post again.

Offline

#8 2008-01-14 23:11:31

shearn89
Member
Registered: 2008-01-13
Posts: 16

Re: Associate with AP, but no IP address?

shearn89 wrote:
byte wrote:

"I noticed when i start the network daemon i get an "SIOCADDRT: no such process" error."

In rc.conf, either comment the ROUTES line or put a ! before gateway.

I think this could be the problem - i found that it does work the way it's now set up (with network daemon enabled, but interfaces commented out), but i have to wait for about 5 minutes after running the wpa_supp command until it's completed before running dhclient, when it never used to take that long. I'll try it and post again.

Ah, no luck. ROUTES is commented out, and !gateway is there, just to make sure, but still takes a while. I'll post the output of "dhcpd -d wlan0" and the wpa_supplicant command sometime tomorrow.

Offline

Board footer

Powered by FluxBB