Sunday, August 8, 2010

Wireless Problem

5:06PM ::
I wrote a script to run at startup to connect to the wireless. However, the dhcpcd program outputs a no interfaces have a carrier message. Even when I don't run the script on startup, dhcpcd has to fail in this way before it can actually connect. There's also a kernel message eth0: link down. I'm not sure what's going on, but until I have this worked out, there's no use in writing a script if I'm always going to have to connect manually anyway. I've also tried this on kernel26-2.6.34.2-2 and 6.35.1-1. Now the plan is to see if there are any driver or dhcpcd updates.

10:24PM ::
Turns out there was a bug in dhcpcd-5.2.6 and 5.2.7 was just moved out of testing. So, I'm pretty sure that is what the main problem was. However, after upgrading, my script still didn't work, so I did some investigating. This was my previous sequence of events:


ifconfig wlan0 up # loads the firmware
iwconfig wlan0 essid $ESSID key $KEY
iwconfig wlan0 channel auto
sleep 2 (dhcpcd needed time for the other settings to take hold before being able to connect)
dhcpcd

With this I would get the following output from dhcpcd:


version 5.2.x starting
no interfaces have a carrier
forked to background...

Then in my kernel log after the previous three statements would be:


eth0 waiting for carrier
wlan0 wating for carrier


I found that after this point if I manually re-entered the line iwconfig wlan0 channel auto I would get a wlan0 carrier aquired and the ip would be set.

So I edited my script, put the iwconfig wlan0 channel auto after the dhcpcd, and all is well in the world again.

No comments:

Post a Comment