You are not logged in.

#1 2007-12-01 08:08:29

johnvoisey
Member
Registered: 2006-11-04
Posts: 28

SOLVED Yet another 2iwconfig not working at boot but does later" issue

Hi

OK I'm running a system with the 2-6-32-ARCH kernel and I've just done a pacman -Syu (1st Dec 07)

I have a C&W USB Stick wireless card with a zydas zd1211 driver in it. Conects to a D-LINK router using WEP.

I followed the wireless wiki pretty much to the letter as far as /etc/conf.d/wireless goes

wlan_eth0="eth0 mode managed essid MySSID key XXXX-XXXX-XX"
WLAN_INTERFACES=(eth0)

In rc.conf I use "eth0=dhcp"


At BOOT time the stick is found and allocated as eth0 in the dmesg output. The 'starting network" ALWAYS ALWAYS fails with 'timeout '.

If I now wait for the login prompt and then after login I type iwconfig eth0 it says Access Point is invalid

If I NOW issue an iwconfig eth0 mode managed essid MySSID key XXXX-XXXX-XX then 99 times out of 100 it works and a subsequent iwconfig eth0 shows the access point is up with nn:nn:nn:nn:nn:nn

At THAT point if I now wait for a bit more the dhcp does its magic and up comes the 'net.

Why isn't it woprking at boot time. I did see a long conversation elsewhere on these forums (thanks google) suggesting a bug that is now fixed regarding CFS but that was for another hardware, probably using ndiswrapper so i don't know how relevant or not that is to me.

Anyone else got this annoyance at boot that goes away later and know how to fix it ?

Last edited by johnvoisey (2007-12-11 08:26:26)

Offline

#2 2007-12-01 11:24:57

sykesm
Member
From: Reading, UK
Registered: 2006-09-03
Posts: 70

Re: SOLVED Yet another 2iwconfig not working at boot but does later" issue

one quick comment, I think it should be
eth0="dhcp"

Last edited by sykesm (2007-12-01 11:27:33)

Offline

#3 2007-12-01 20:55:47

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: SOLVED Yet another 2iwconfig not working at boot but does later" issue

Offline

#4 2007-12-02 20:48:21

johnvoisey
Member
Registered: 2006-11-04
Posts: 28

Re: SOLVED Yet another 2iwconfig not working at boot but does later" issue

thanks for the replies.

'sykesm' my rc.conf does indeed read  eth0="dhcp" and not "eth0=dhcp" that was my stupid mistake when posting the question. My apologies.

'iphitus' thanks for the tip regarding netcfg2 I will give it a go and i *will* post the result of what I find here, it may be a day or so before I do.

thanks again

Offline

#5 2007-12-04 07:28:19

johnvoisey
Member
Registered: 2006-11-04
Posts: 28

Re: SOLVED Yet another 2iwconfig not working at boot but does later" issue

Well, I tried (!)

In brief both the 'old' and 'new' (netcfg2) ways of auto-starting a wireless network fail with the same timeout message !

I downloaded the netcfg2 scripts etc, followed the advice in the wiki, started by copying the wep.example script to /etc/network.d and edited that a bit. I brought in various of the lines from the 'complete' example, and i was particularly hopeful that the timeout options might help, but in the end no joy I regret to say.

It's not a huge problem because I CAN connect manually or i can get most of the way with the 'old' way of doing things and then finally kick things into gear by waiting until I am logged in to GNOME, opening a root terminal and in there issue an 'iwconfig eth0 essid <my ssid>'. I don't need to repeat the mode or key. That suggests I'm getting most of the way with the boot scripts anyway.

Unlike others who have reported success with one system and failure with another I am getting the same failure in both so I think this is something wierd. I have another adsl router handy so I'll continue playing around to see if I get anywhere.

Anyway thanks for the suggestions and I'm sorry I couldn't bring better news and a tick in the zd1211 boxes on the test results page for you. regards jv

Offline

#6 2007-12-04 08:32:07

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: SOLVED Yet another 2iwconfig not working at boot but does later" issue

It'd be great if you could give me a hand so I can find out what went wrong with netcfg2.

What's your network details? what config did you use? what was the exact message from netcfg2?

Offline

#7 2007-12-05 20:05:19

Dillweed
Member
From: Washington
Registered: 2007-10-29
Posts: 17

Re: SOLVED Yet another 2iwconfig not working at boot but does later" issue

John, I'm having the same problem as you are.  This didn't happen with the 2.6.22 kernels, but it has started since the move to the .23 kernels.  My setup is a bit different since I'm using ndiswrapper, but in the end it is the same.  I haven't tried netcfg2...yet.  I have noticed that if I issuse wpa_supplicant with the -dd switch it takes about 60 seconds for my card to associate with my access point.  After that I can issue dhcpcd wlan0 and then I'll get an ip. 

Anyways, I kind of think it might be a problem with the .23 kernels at least for my stuff.

Offline

#8 2007-12-05 20:18:56

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: SOLVED Yet another 2iwconfig not working at boot but does later" issue

please file a bug then Dillweed, and check if its happening in the latest version.
http://bugs.archlinux.org

Offline

#9 2007-12-06 20:36:54

johnvoisey
Member
Registered: 2006-11-04
Posts: 28

Re: SOLVED Yet another 2iwconfig not working at boot but does later" issue

Hi again

OK iphitus I will try and dig into netcfg2 a bit more for you.  But just before I disappear back to the coalface I thought I'd record what I've tried (and failed) with since my last post.

After netcfg2 seemed to fail I went back to look at the 'normal' way of network init. I reckoned it might be something like it tries a dhcpcd before the iwconfig is really finished. After all, some windows machines here seem to take their time with this router. So i wrote come debug in /etc/rc.d/network.

I echo'ed out to the screen the parameters that were to be used in the call to iwconfig in that startup script. I therefore *KNOW* they are the same as the values that 'work' interactively.  But iwconfig still does not work properly in /etc/rc.d/network. I adjusted the sleep immediately after the iwconfig from 2 seconds to 10, and then I put an 'sh -c iwconfig' command after that sleep, hoping that it might work if given time to settle. But no. the output from the second 'iwconfig' in /etc/rc.d/network shows the interface is mode managed, essid as I expect, key values as i expect, but AP is still "invalid". 

And yes an interactive iwconfig eth0 essid MySSID input at an su'd xterm after gdm login works every time. It's enough to drive you to drink.

I wondered if there could be something wierd with a need for a second iwconfig eth0 essid MySSID command, so  I put one into /etc/rc.d/network. and followed it with another short sleep and another 'iwconfig eth0' to see what's going on.

But that final iwconfig output it still says "AP: invalid"

Debugging the zd1211 driver needs a kernel with the ZD1211rw_DEBUG compile flag set to Y.

Out of sheer bloody mindedness I downloaded the 2.6.23.9 kernel source and had a go at building a custom kernel with the debug flag set. I'm no guru but I have written the odd kernel network module in the (distant) past - for early v2 kernels (!!) - however my attempt fell flat when it wouldn'tfind my root partition on /dev/sda3 (it needs a rebuilt init ramdisk with the relevant disk modules doesn't it !)

Anyway enough of the rabbiting on, I just wanted to record all of the above so people know I've tried it and got nowhere. OK iphitus I will now retirn to looking at netcfg2

I will post details of what I find in this thread but it may be a little time coming.

Offline

#10 2007-12-06 20:44:48

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: SOLVED Yet another 2iwconfig not working at boot but does later" issue

Ok thanks. Just a few suggestions that might help me debug/make it work for you.

what's your network name?

If netcfg2 doesnt work, as a workaround, you could try putting the iwconfig command into PRE_UP="" -- which would run it before bringing the network up.

Offline

#11 2007-12-10 20:02:39

johnvoisey
Member
Registered: 2006-11-04
Posts: 28

Re: SOLVED Yet another 2iwconfig not working at boot but does later" issue

Hi again. Yes it's been a couple of days but I had a busy weekend.

Good news first. I rread through the wiki entries three or four times, double checked everything and IT WORKED AT BOOT TIME. I could post miles of config files and it it really helps i will, but in brief this is the business bit of my /etc/rc.conf.

lo="lo 127.0.0.1"
#eth0="dhcp"
#INTERFACES=(lo eth0)
INTERFACES=(lo)

#NET_PROFILES=(main)
NETWORKS=(wep)

# DAEMONS
DAEMONS=(syslog-ng hal network netfs net-profiles crond alsa httpd mysqld gdm)

When the daemons kick off, it does indeed bring up my 'wep' profile from directory /etc/network.d. I have listed the contents of that 'profile' here. You will probably find it familiar.

CONNECTION="wireless"
DESCRIPTION="A simple WEP encrypted wireless connection"
INTERFACE=eth0
HOSTNAME=archme.velvetwood.co.uk
IFOPTS=dhcp
DHCP_TIMEOUT=15
SCAN="YES"
SECURITY="wep"
ESSID="Velvetwood"
KEY="My Keys"
IWOPTS="mode managed essid $ESSID key $KEY"
IP="dhcp"

And it works on boot.

I would say Yippee and thanks for all the help but there is one tiny thing that worries me. Every time I shut down my machine now it gets as far as the bit where it would bring the network down, and then it just dies.  The machine stays up, but is obviously looping. Even the kbd csaps lock / num lock are dead. The only response I can get is if I hit ctrl-alt-delete I get ONE "entering runlevel 6" but I can't get anything more at all.  If I turn off the power and rebooot there doesn't seem to be any big issue, it says file recovery is needed on my (ext3) filesystem and it's OK. I have looked in the /var/log/everything.log and this seems to have logging sugegsting dhcpcd's it's released the IP address but it did it AFTER syslog-ng stopped.  My guess (and again it is a guess) is the stop is happenning out of sequence.

SO on balance yes it seems netcfg2 works where the other network scripts fail in that it can and does bring up a Zydas ZD1211rw based USB ethernet stick at boot time and successfully connects to a DSL D604-T adsl router offering dhcp ip addresses on an SSID configured for 64 bit WEP and if you need any printout or logging for your test results I'll happily provide it just tell me what and where to send it.

However, the brutal / rough nature of the shutdown worries me a little.

regards JRV

Last edited by johnvoisey (2007-12-10 20:04:45)

Offline

#12 2007-12-10 22:18:02

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: SOLVED Yet another 2iwconfig not working at boot but does later" issue

Ok, i'll look into that.

Which was shutting down? network profiles, or the normal network daemon?

If you think it's syslogd, try shuffling its position in the daemons array and see if that helps.

Offline

#13 2007-12-15 18:45:31

johnvoisey
Member
Registered: 2006-11-04
Posts: 28

Re: SOLVED Yet another 2iwconfig not working at boot but does later" issue

Hi again "iphitus". Another busy week, and christmas round the corner . Arrggh !

Anyway the order in ny rc.conf is

DAEMONS=(syslog-ng hal network netfs net-profiles crond alsa httpd mysqld gdm)

I thought this was supposed to START "left to right" i.e in the above syslog-ng kicks off first and gdm starts last, and then they stopped in the reverse order ? That certainly seems to be what happens, the system stops gdm before httpd for example, but the last thing I get logged is the "wep down" After that nothing else appears on the screen and nothing else is logged.

I will have a look at this again, and see if I can get any more info.
Again, thanks for the help so far.

Offline

Board footer

Powered by FluxBB