LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   MadWifi, Atheros, and DHCPCD on Toshiba Laptop (http://www.linuxquestions.org/questions/slackware-14/madwifi-atheros-and-dhcpcd-on-toshiba-laptop-653055/)

kixx 07-02-2008 07:16 AM

MadWifi, Atheros, and DHCPCD on Toshiba Laptop
 
I just moved my Toshiba laptop up to Slackware 12.1 from 12.0 with a fresh install. In 12.0 I had my wireless working like a charm with MadWifi and the instructions from Alien Bob.

Now, after the fresh install of 12.1 I have to run:

Code:

# dhcpcd ath0
at every boot up to get it working. I'm sure this is not because of Slackware 12.1, but because I'm forgetting something that I set up with Slackware 12.0 to make it work properly. ( I've since learned to take notes ). Various bits of info is scattered all over my Google and LQ searches, but I can't find anything that is sorting this out for me yet.

I have:
Code:

/sbin/modprobe ath_pci
in my rc.modules ... but how do I get the machine to use dhcpcd ath0 at boot every time? I'm using HAL and udev, so it should just happen right?

Also, the boot proccess gets hung up trying this:

Code:

Polling for DHCP server on interface eth0:
No carrier Detected on eth0. Reducing DHCP timeout to 10 seconds.

This should be ath0 instead of eth0 with the MadWifi driver, correct? I should be able to set it up so that it will find a "carrier" on ath0 and reduce or eliminate this boot delay. Is this possible?

Thanks all,
Kris

Alien Bob 07-02-2008 08:47 AM

If you did not add proper configuration for ath0 in the file /etc/rc.d/rc.inet1.conf then you will not see your interface get configured automatically on boot. Maybe you missed some?

Eric

kixx 07-02-2008 09:21 AM

Thanks Eric,
Configuring rc.inet1.conf solved the big problem of not getting a connection on boot. I uncommented these lines and added these entries in rc.inet1.conf:

IFNAME[4]="ath0"
IPADDR[4]=""
NETMASK[4]=""
USE_DHCP[4]="yes"
DHCP_HOSTNAME[4]="localhost"

And it works, that's what I was forgetting from last time.

Secondly, is there any way to reduce or eliminate the delay during boot:

Polling for DHCP server on interface eth0:
No carrier Detected on eth0. Reducing DHCP timeout to 10 seconds.

This doesn't happen on my desktop which has a wired connection... so I'm assuming is has to do with the wireless setup on the laptop?

zux 07-02-2008 11:37 AM

in the same file: /etc/rc.d/rc.inet1.conf
you probably have this:
Code:

# Config information for eth0:
IPADDR[0]=""
NETMASK[0]=""
USE_DHCP[0]="yes"
DHCP_HOSTNAME[0]=""

remove the yes and it should work

C-Sniper 07-02-2008 11:59 AM

The delay from the DHCP is when the eth0 is polling for a DHCP connection to change this you must edit rc.inet1 file. Here is an example of how mine looks which changes the DHCP to timeout after 1 second.

this starts at line 113
Code:

    echo "Polling for DHCP server on interface ${1}:"
        # If you set a timeout, you get one, even if the kernel doesn't think that
        # your device is connected, in case /sys isn't right (which it usually isn't
        # except right after the device is loaded, when it usually is):
        if [ "${DHCP_TIMEOUT[$i]}" = "" ]; then
          ifconfig ${1} up && sleep 1
          CONNSTATUS="$(cat /sys/class/net/${1}/carrier 2> /dev/null)"
          ifconfig ${1} down
          if [ "$CONNSTATUS" = "0" ]; then
            # The kernel has just told us the cable isn't even plugged in, but we will
            # give any DHCP server a short chance to reply anyway:
            echo "No carrier detected on ${1}.  Reducing DHCP timeout to 1 second."
            DHCP_TIMEOUT[$i]=1
          fi
        fi
        # 5 seconds should be a reasonable default DHCP timeout.  10 was too much.  :-P
        echo "/etc/rc.d/rc.inet1:  /sbin/dhcpcd -d -t ${DHCP_TIMEOUT[$i]:-5} ${DHCP_OPTIONS} ${1}" | $LOGGER
        /sbin/dhcpcd -d -t ${DHCP_TIMEOUT[$i]:-5} ${DHCP_OPTIONS} ${1}

This will help on the boot time and also reduce the timeout delay if you are polling for a non-existent DHCP server

kixx 07-04-2008 10:33 AM

Works!

in rc.inet1.conf

changed USE_DHCP[4]="yes"

to

USE_DHCP[4]=""

Thanks... my boot time is 30 seconds faster.

okos 08-10-2008 04:52 PM

At home or on the road?
 
Hi
I have a few questions.

At home I plugin dsl through the Broadcom b44 T100 lan card.
On the road I want to setup for wireless madwifi ath chip. I want it to connect to the local wifi.

I setup rc.inet1.conf as follows

Code:

# Config information for eth0:
IFNAME[0]="eth0"
IPADDR[0]=""
NETMASK[0]=""
USE_DHCP[0]="yes"
DHCP_HOSTNAME[0]="bt"

# Config information for ath0:
IFNAME[1]="ath0"
IPADDR[1]=""
NETMASK[1]=""
USE_DHCP[1]=""
DHCP_HOSTNAME[1]="netgear"

and rc.wireless as follows

00:14:6c:09:0b:33)
INFO="Netgear WG511T"
ESSID="Any ESSID"
# KEY="000000"
;;

According to my settings, will eth0 be set as default? If no eth0 then ath0?
In other words, if I am not connected to my home lan it will then look for a open wireless network?

Thanks in advance.
okos


All times are GMT -5. The time now is 07:01 PM.