You are not logged in.

#1 2009-01-21 02:36:51

hecateluna
Member
From: St. Louis, MO
Registered: 2009-01-21
Posts: 4

[SOLVED]wireless on startup-card that must be "up", hanging on reboot

Note that I have a solution to this problem, but I would like to know if it is the "right" solution (and if it is, share it).

I just installed Archlinux on my Thinkpad X61, which has an Atheros AR5212 wireless card.  I am (unsurprisingly) using the ath5k module (I also tried ath_pci, with no relevant changes to behavior).  The manual wireless setup from the wiki works perfectly (if channel and power are also set), but this card is (apparently) one that needs the 'ifconfig wlan0 up' command to work properly.  I want to connect to my network on startup, however (at other locations, I want to set up manually, so I don't really want to use a profile manager), but automating via adding things (below, from wiki) to rc.conf does not work (the card is never brought "up" so it can't associate with the access point).

My first solution was to write a little script that did the manual setup, and run it from rc.local.  That works, except that then the computer does not reboot properly.  It finishes the shutdown process, and then remains powered on but doing nothing indefinitely, with a black screen (shutdown, however, works normally).  This can be solved by killing dhcpcd before rebooting (obviously not the best solution).

My current solution is to include the stuff from the wiki in my rc.conf, but edit /etc/rc.d/network to 'ifconfig wlan0 up'.  The stuff in rc.conf (almost directly from wiki):

wlan0="dhcp"
wlan_wlan0="wlan0 essid MyEssid key 1234567890 channel 6 power on" #channel and power seem to be required for this card
INTERFACES=(wlan0)

The beginning of the wi_up() function in /etc/rc.d/network:

wi_up()
{
    eval iwcfg="\$wlan_${1}"
    [ "$iwcfg" = "" ] && return 0

    /usr/sbin/iwconfig $iwcfg
    /sbin/ifconfig $1 up         # this is the line I added
    [[ -z "$WIRELESS_TIMEOUT" ]] && WIRELESS_TIMEOUT=2
    sleep $WIRELESS_TIMEOUT

I also had to increase my WIRELESS_TIMEOUT time. (I put this in rc.conf--I'm not sure if it belongs elsewhere.)

So, after a crazy long-winded description...... is this in some way a bad thing to do?  Am I somehow going to have to repeatedly fix this with updates, or something else bad?  Is there a way better solution?




EDIT:  No one has come up with a better solution, so I'm marking this as solved.  Obviously if an update wipes my network daemon, I will have to re-fix this (and so will anyone else who uses this solution).  Using a network profiler might be a better option, but I'm stubborn.

Last edited by hecateluna (2009-01-22 19:10:03)

Offline

#2 2009-03-10 00:48:21

The Avatar of Time
Member
Registered: 2008-01-11
Posts: 226

Re: [SOLVED]wireless on startup-card that must be "up", hanging on reboot

Well it looks like you helped at least one person with this: me! smile

Thanks, I have a Dell Inspiron 1721 laptop with a Broadcom 4312 802.11a/b/g wireless card and after putting pretty much the same thing you did in my /etc/rc.conf I still had no internet.

Luckily your /etc/rc.d/network line fixed it for me.

I'm putting a link to this thread on my thread about my laptop, so hopefully more people can use them.

Thanks again.

I guess for whatever reason I'll link to that thread here, since it was wireless card related:

http://bbs.archlinux.org/viewtopic.php?id=67051

Last edited by The Avatar of Time (2009-03-10 00:49:08)

Offline

Board footer

Powered by FluxBB