# Question about how wireless configuration works

## mortonimus

I'm pretty new to Linux and am having difficulties on getting my wireless to work, and so I'd like to understand the concept of what Gentoo is doing when it tries to start the wireless.

Now to begin, I have an Inspiron 6000 and am using IPW2200.. through the large thread on the Inspiron 6000 I found the right things to emerge for IPW and wireless-tools, and thanks to coldplug I was able to get it to finally see my wireless card and list it as eth1.

The problem is I can't get it to connect by starting eth1, dhcpcd always times out.  If I do:

```
 iwconfig eth1 essid myap key mykey && dhcpcd -h solo -D eth1
```

Then the wireless connects fine.. but when I try to start eth1 I get

```

# /etc/init.d/net.eth1 start

 * Starting eth1

 *   Bringing up eth1

 *     dhcp

 *       Running dhcpcd ...                                               [ !! ]

```

Here is my /etc/conf.d/wireless file:

```

essid_eth1="any"

preferred_aps_eth1=( "mhome" )

key_mhome="<1234567890>"                    (fake key)

dhcpcd_defaults="-t 5"

```

And my /etc/conf.d/net file:

```

config_eth0=( "dhcp" )

dhcpcd_eth0="-t 8"

config_eth1=( "dhcp" )

dhcpcd_eth1="-t 8"

```

Now I'm sure my lack of getting it to work is mostly due to my noobness in how Linux works.  I understand the contents of everything in these files, but I'm not sure how it all works together.  How is the wireless config accessed?  Is it because net.eth1 has wireless extensions and therefor automatically uses the wireless config to get it to work?  

So yeah.. if you pros can help me out I would appreciate it, and if you can provide any comprehensive resources or your own descriptions about how the networking works I'd appreciate it.

Next step: understanding what txorg is and how I can use it to configure my graphics card.. cause apparently thats what i need to do.   :Rolling Eyes: 

I've emerged it, and gnome works, but I dunno what it did or how to configure it.Last edited by mortonimus on Mon Jan 23, 2006 3:30 am; edited 1 time in total

----------

## mortonimus

Anyone?  Please?

----------

## sloof3

Can you get the wireless card to come up after your machine is booted?  Without using the init scripts.

----------

## mortonimus

So far "iwconfig eth1 essid myap key mykey && dhcpcd -h solo -D eth1" is the only way I can get wireless to come up, and I type that manually when the machine has fully booted.

----------

## mortonimus

Bumped back up for the evening crowd

----------

## sloof3

Well there must be something wrong with the boot scripts if you can get the card up manually.

----------

## mortonimus

I can't get it up with /etc/init.d/eth1 start though.. dhcpcd just times out, and thats what it tries to do at boot.

To me it seems like its not accessing the wireless config file properly, or the wireless config file isn't setup right.. is the syntax right? (see original post for file)

----------

## UberLord

 *mortonimus wrote:*   

> To me it seems like its not accessing the wireless config file properly, or the wireless config file isn't setup right.. is the syntax right? (see original post for file)

 

Seems to me that

1) baselayout / wireless-tools possible mismatch as iwconfig is now in /sbin instead of /usr/sbin

2) Don't set essid_eth0="any" - otherwise preferred_aps won't work

3) Try adding RC_VERBOSE="yes" in /etc/conf.d/rc - it should show iwconfig module being loaded. If not then 1 above is definitely correct.

----------

## mortonimus

Man I hate my noobness at this stuff..

Ok, so I took out essid_eth1="any" And that didn't fix it...

Then I added RC_VERBOSE="yes" in /etc/conf.d/rc, and you were right it wasn't using iwconfig. 

I don't really know anything about baselayout, but I saw my version was old, so I did emerge baselayout and got the newest version.. and I did etc-update and -3 when it prompted me and I overwrote all config scripts (I hadn't changed any of the ones it prompted me on except /etc/conf.d/rc, and I put it back to VERBOSE mode).

And voila, eth1 works at boot properly!

BUT

now eth0 doesn't work! GAH!

It does this at boot:

```

Starting eth0

  Loading networking modules for eth0

    modules: iwconfig essidnet iptunnel ifconfig dhcpcd apipa

      iwconfig provides wireless

      ifconfig provides interface

      dhcpcd provides dhcp

  Wireless extensions not found for eth0

  Bringing up eth0

    dhcp

      Running dhcpcd ...                        !!!

```

Man what did I do now.  I don't think I overwrote any important config scripts with etc-update... but who knows.

On a side note, I found it pretty funny when eth1 was Scanning access points it and said 'Found "Oh Yes Double Penetration" at ...'  :Laughing: 

So, any takers on what I screwed up?

----------

## Adrien

 *mortonimus wrote:*   

> On a side note, I found it pretty funny when eth1 was Scanning access points it and said 'Found "Oh Yes Double Penetration" at ...'  

 

 :Shocked:   Are you serious? Have you ever read that?

----------

## mortonimus

Lol its Hoboken, I pick up dozens of access points, but I have to say thats the funniest one I've seen yet.

----------

## UberLord

Try re-emerging dhcpcd

----------

## Adrien

 *mortonimus wrote:*   

> Lol its Hoboken, I pick up dozens of access points, but I have to say thats the funniest one I've seen yet.

 

 :Laughing:   At least, you're havin' some good fun with iwlist!

----------

## mortonimus

 *UberLord wrote:*   

> Try re-emerging dhcpcd

 

Didn't work :-/  

Another question I have is how can you bypass any scanning of Access points.. half the time when I bring up eth1 it connects to some other random Access point before even finding my preferred aps

----------

## UberLord

 *mortonimus wrote:*   

> Another question I have is how can you bypass any scanning of Access points.. half the time when I bring up eth1 it connects to some other random Access point before even finding my preferred aps

 

Maybe you need to increase the scan timeout or hardcode the essid.

----------

## mortonimus

Yeah I figured out how to fix that.. now.. how to fix eth0   :Embarassed: 

----------

## mortonimus

can anyone reading this venture a guess as to what i messed up?

----------

## Adrien

 *mortonimus wrote:*   

> Yeah I figured out how to fix that.. now.. how to fix eth0  

 

Could you precise what the probleem is with eth0? Is this a wired or wireless interface?

----------

## mortonimus

Sorry.. yes eth0 is a wired connection.  It was working before, back when my wireless wasn't working.

I tried to fix wireless by updating baselayout and doing etc-update, which did fix wireless, but killed my wired connection.

Now it just times out while running dhcpcd..  And I don't know what I did that broke it.

----------

## FcukThisGame

 *mortonimus wrote:*   

> 
> 
> Then the wireless connects fine.. but when I try to start eth1 I get
> 
> ```
> ...

 

I had the exact problem with wired lan. Are you sure you loaded the wireless card module?

(somebody else would have to help you with which one to load, because I don't know.)

Anyways, when you find out what the module is, modprobe it, and set it to constantly run.

for all you need, find the module, modprobe it (i'm listing hostap because that's what I was told to use for mine.), re-run dhcpcd and restart your net service:[/code]

[code]

# modprobe hostap (or whatever)

# dhcpcd

# /etc/init.d/net.eth0 (or whatever net.*) restart

----------

## mortonimus

Here's some more info about my setup, maybe with this you could provide more help:

```
localhost ~ # lspci -v

00:00.0 Host bridge: Intel Corporation Mobile 915GM/PM/GMS/910GML Express Processor to DRAM Controller (rev 03)

        Subsystem: Dell Unknown device 0188

        Flags: bus master, fast devsel, latency 0

        Capabilities: [e0] Vendor Specific Information

00:01.0 PCI bridge: Intel Corporation Mobile 915GM/PM Express PCI Express Root Port (rev 03) (prog-if 00 [Normal decode])

        Flags: bus master, fast devsel, latency 0

        Bus: primary=00, secondary=01, subordinate=01, sec-latency=0

        I/O behind bridge: 0000d000-0000dfff

        Memory behind bridge: dfd00000-dfefffff

        Prefetchable memory behind bridge: d0000000-d7ffffff

        Capabilities: [88] #0d [0000]

        Capabilities: [80] Power Management version 2

        Capabilities: [90] Message Signalled Interrupts: 64bit- Queue=0/0 Enable-

        Capabilities: [a0] Express Root Port (Slot+) IRQ 0

        Capabilities: [100] Virtual Channel

        Capabilities: [140] Unknown (5)

00:1d.0 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #1 (rev 03) (prog-if 00 [UHCI])

        Subsystem: Dell Unknown device 0188

        Flags: bus master, medium devsel, latency 0, IRQ 11

        I/O ports at bf80 [size=32]

00:1d.1 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #2 (rev 03) (prog-if 00 [UHCI])

        Subsystem: Dell Unknown device 0188

        Flags: bus master, medium devsel, latency 0, IRQ 5

        I/O ports at bf60 [size=32]

00:1d.2 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #3 (rev 03) (prog-if 00 [UHCI])

        Subsystem: Dell Unknown device 0188

        Flags: bus master, medium devsel, latency 0, IRQ 9

        I/O ports at bf40 [size=32]

00:1d.3 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #4 (rev 03) (prog-if 00 [UHCI])

        Subsystem: Dell Unknown device 0188

        Flags: bus master, medium devsel, latency 0, IRQ 7

        I/O ports at bf20 [size=32]

00:1d.7 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB2 EHCI Controller (rev 03) (prog-if 20 [EHCI])

        Subsystem: Dell Unknown device 0188

        Flags: bus master, medium devsel, latency 0, IRQ 11

        Memory at ffa80800 (32-bit, non-prefetchable) [size=1K]

        Capabilities: [50] Power Management version 2

        Capabilities: [58] Debug port

00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev d3) (prog-if 01 [Subtractive decode])

        Flags: bus master, fast devsel, latency 0

        Bus: primary=00, secondary=03, subordinate=04, sec-latency=32

        I/O behind bridge: 00002000-00002fff

        Memory behind bridge: dfc00000-dfcfffff

        Prefetchable memory behind bridge: 0000000050000000-0000000051f00000

        Capabilities: [50] #0d [0000]

00:1e.2 Multimedia audio controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) AC'97 Audio Controller (rev 03)

        Subsystem: Dell Inspiron 6000 laptop

        Flags: bus master, medium devsel, latency 0, IRQ 11

        I/O ports at ed00 [size=256]

        I/O ports at ec40 [size=64]

        Memory at dffffe00 (32-bit, non-prefetchable) [size=512]

        Memory at dffffd00 (32-bit, non-prefetchable) [size=256]

        Capabilities: [50] Power Management version 2

00:1e.3 Modem: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) AC'97 Modem Controller (rev 03) (prog-if 00 [Generic])

        Subsystem: Conexant Unknown device 5423

        Flags: medium devsel, IRQ 5

        I/O ports at ee00 [size=256]

        I/O ports at ec80 [size=128]

        Capabilities: [50] Power Management version 2

00:1f.0 ISA bridge: Intel Corporation 82801FBM (ICH6M) LPC Interface Bridge (rev 03)

        Subsystem: Dell Unknown device 0188

        Flags: bus master, medium devsel, latency 0

00:1f.2 IDE interface: Intel Corporation 82801FBM (ICH6M) SATA Controller (rev 03) (prog-if 80 [Master])

        Subsystem: Dell Unknown device 0188

        Flags: bus master, 66MHz, medium devsel, latency 0, IRQ 5

        I/O ports at <ignored>

        I/O ports at <ignored>

        I/O ports at <ignored>

        I/O ports at <ignored>

        I/O ports at bfa0 [size=16]

        Capabilities: [70] Power Management version 2

01:00.0 VGA compatible controller: ATI Technologies Inc M22 [Radeon Mobility M300] (prog-if 00 [VGA])

        Subsystem: Dell Unknown device 2003

        Flags: bus master, fast devsel, latency 0, IRQ 11

        Memory at d0000000 (32-bit, prefetchable) [size=128M]

        I/O ports at de00 [size=256]

        Memory at dfdf0000 (32-bit, non-prefetchable) [size=64K]

        [virtual] Expansion ROM at dfd00000 [disabled] [size=128K]

        Capabilities: [50] Power Management version 2

        Capabilities: [58] Express Endpoint IRQ 0

        Capabilities: [80] Message Signalled Interrupts: 64bit+ Queue=0/0 Enable-

        Capabilities: [100] Advanced Error Reporting

03:00.0 Ethernet controller: Broadcom Corporation BCM4401-B0 100Base-TX (rev 02)        Subsystem: Dell Inspiron 6000 laptop

        Flags: bus master, fast devsel, latency 64, IRQ 9

        Memory at dfcfe000 (32-bit, non-prefetchable) [size=8K]

        Capabilities: [40] Power Management version 2

03:01.0 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev b3)

        Subsystem: Dell Inspiron 6000 laptop

        Flags: bus master, medium devsel, latency 64, IRQ 7

        Memory at dfc00000 (32-bit, non-prefetchable) [size=4K]

        Bus: primary=03, secondary=04, subordinate=07, sec-latency=176

        Memory window 0: 50000000-51fff000 (prefetchable)

        Memory window 1: 52000000-53fff000 (prefetchable)

        I/O window 0: 00002000-000020ff

        I/O window 1: 00002400-000024ff

        16-bit legacy interface ports at 0001

03:01.1 FireWire (IEEE 1394): Ricoh Co Ltd R5C552 IEEE 1394 Controller (rev 08) (prog-if 10 [OHCI])

        Subsystem: Dell Unknown device 0188

        Flags: bus master, medium devsel, latency 64, IRQ 9

        Memory at dfcfc800 (32-bit, non-prefetchable) [size=2K]

        Capabilities: [dc] Power Management version 2

03:01.2 Class 0805: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 17) (prog-if 01)

        Subsystem: Dell Inspiron 6000 laptop

        Flags: bus master, medium devsel, latency 64, IRQ 10

        Memory at dfcfc700 (32-bit, non-prefetchable) [size=256]

        Capabilities: [80] Power Management version 2

03:03.0 Network controller: Intel Corporation PRO/Wireless 2200BG (rev 05)

        Subsystem: Intel Corporation Unknown device 2721

        Flags: bus master, medium devsel, latency 64, IRQ 5

        Memory at dfcfd000 (32-bit, non-prefetchable) [size=4K]

        Capabilities: [dc] Power Management version 2

```

```

localhost ~ # lsmod

Module                  Size  Used by

fglrx                 242108  7

ipw2200               181568  0

ieee80211              43560  1 ipw2200

ieee80211_crypt         4804  1 ieee80211

firmware_class          7936  1 ipw2200

```

Hmm.. anything else that would be useful?

----------

## FcukThisGame

```
03:03.0 Network controller: Intel Corporation PRO/Wireless 2200BG (rev 05)

        Subsystem: Intel Corporation Unknown device 2721

        Flags: bus master, medium devsel, latency 64, IRQ 5

        Memory at dfcfd000 (32-bit, non-prefetchable) [size=4K]

        Capabilities: [dc] Power Management version 2
```

This is enough. Try modprobe ipw2200. If that doesn't work, then:

```

# cd /usr/src/linux

# make menuconfig
```

And check for support for the Intel wireless 2200BG with ipw2200. If it's not enabled, enable it and recompile.

EDIT: also try 

```
# ifconfig eth0 (or whatever your wireless card is.)
```

If it gives the error "error fetching interface information: Device not found", then it most likely is a kernel issue.

----------

## mortonimus

No no let me explain again   :Laughing: 

My wireless works perfectly now.. no problems whatsoever.. but since I got the wireless (eth1) working, my wired (eth0) has not been working.

It is the Broadcom Corporation BCM4401-B0 100Base-TX.  It used to work, but stopped after updating baselayout and doing an etc-update... (among a few other things as well that I had to do in order to get wirelss working)

It (eth0) exists (if I do ifconfig it shows up) but if I try to start it, dhcpcd times out

----------

## FcukThisGame

Well, I had a problem of the sort. My genkernel'd kernel didn't recognize my wireless card, so my wired NIC was eth0. After I recompiled, the wireless became eth0 and bumped my wired NIC to eth1, where the configuration was still for wired eth0. I copied my eth0 initscript over my eth1 initscript, and that worked.

----------

