# Getting wireless lan to work [SOLVEDish]

## mhelvens

We're switching to wireless internet at home, and I'm the only one using Linux.  :Smile:  I'm surprised I haven't found any help on this forum with search.

My pc now has a "Sweex Wireless Lan PCI Card 54 MBPS" installed. The wireless router is also from Sweex. It's protected with a WPA2 passphrase.

From what little information I could find, I've emerged wireless-tools, and run 'iwconfig':

```
lo        no wireless extensions.

eth0      no wireless extensions.

sit0      no wireless extensions.
```

Could anyone help me out with this? Please tell me if you need more information.

Thanks in advance!Last edited by mhelvens on Sat Jun 16, 2007 9:44 am; edited 3 times in total

----------

## nb_666

 *Michiel_H wrote:*   

> We're switching to wireless internet at home, and I'm the only one using Linux.  I'm surprised I haven't found any help on this forum with search.
> 
> My pc now has a "Sweex Wireless Lan PCI Card 54 MBPS" installed. The wireless router is also from Sweex. It's protected with a WPA2 passphrase.
> 
> From what little information I could find, I've emerged wireless-tools, and run 'iwconfig':
> ...

 

did your installation recognize your wireless card??

try:

```

 # lspci

```

and post your output here..

----------

## mhelvens

```
00:00.0 Memory controller: nVidia Corporation CK804 Memory Controller (rev a3)

00:01.0 ISA bridge: nVidia Corporation CK804 ISA Bridge (rev a3)

00:01.1 SMBus: nVidia Corporation CK804 SMBus (rev a2)

00:02.0 USB Controller: nVidia Corporation CK804 USB Controller (rev a2)

00:02.1 USB Controller: nVidia Corporation CK804 USB Controller (rev a3)

00:04.0 Multimedia audio controller: nVidia Corporation CK804 AC'97 Audio Controller (rev a2)

00:06.0 IDE interface: nVidia Corporation CK804 IDE (rev f2)

00:07.0 IDE interface: nVidia Corporation CK804 Serial ATA Controller (rev f3)

00:08.0 IDE interface: nVidia Corporation CK804 Serial ATA Controller (rev f3)

00:09.0 PCI bridge: nVidia Corporation CK804 PCI Bridge (rev a2)

00:0a.0 Bridge: nVidia Corporation CK804 Ethernet Controller (rev a3)

00:0b.0 PCI bridge: nVidia Corporation CK804 PCIE Bridge (rev a3)

00:0c.0 PCI bridge: nVidia Corporation CK804 PCIE Bridge (rev a3)

00:0d.0 PCI bridge: nVidia Corporation CK804 PCIE Bridge (rev a3)

00:0e.0 PCI bridge: nVidia Corporation CK804 PCIE Bridge (rev a3)

00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration

00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map

00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller

00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Miscellaneous Control

01:00.0 VGA compatible controller: nVidia Corporation G71 [GeForce 7950 GT] (rev a1)

05:06.0 Ethernet controller: Atheros Communications, Inc. AR5005G 802.11abg NIC (rev 01)
```

Hm.. Maybe that last one there? But I'm not sure.

----------

## tmr

GentooWiki - HARDWARE ar5005 and GentooWiki - HOWTO Wireless Configuration and Startup

----------

## mhelvens

Sorry for the long overdue reply. This is the first opportunity I've had to fix things on my system.

Trying to emerge madwifi-ng. I get the following message:

```
 * Checking for suitable kernel configuration options...

 *   CONFIG_WIRELESS_EXT:        is not set when it should be.

 * Please check to make sure these options are set correctly.

 * Failure to do so may cause unexpected problems.

 * Once you have satisfied these options, please try merging

 * this package again.

```

For the life of me I can't find the CONFIG_WIRELESS_EXT option in 'make menuconfig'. It doesn't help that I have to enter an options help-text to see the actual macro-name.

Could someone help me with this?

----------

## micmac

CONFIG_NET_RADIO=y will enable CONFIG_WIRELESS_EXT. The ebuild is a little stupid to ask for CONFIG_WIRELESS_EXT IMHO.

----------

## PaulBredbury

 *micmac wrote:*   

> The ebuild is a little stupid

 

No it's not:

```
$ grep WIRELESS /usr/src/linux/.config

CONFIG_WIRELESS_EXT=y

$ grep RADIO /usr/src/linux/.config

# CONFIG_HAMRADIO is not set

$ uname -a

Linux brebs 2.6.22-rc3 #3 SMP PREEMPT Fri Jun 8 00:14:44 BST 2007 i686 Intel(R) Core(TM)2 CPU          6600  @ 2.40GHz GenuineIntel GNU/Linux
```

----------

## mhelvens

But I don't suppose you can find that option alone in 'make menuconfig'? I'm not quite ready to manually edit the .config file. By the way, it did work. madwifi-ng is emerged successfully.

I'm sure that's not the end of it, though. I'm sure I'm going to have to ask a few more questions here before I get my wireless to work.  :Rolling Eyes: 

----------

## PaulBredbury

Sure I can. Just press "/":

```
 .config - Linux Kernel v2.6.22-rc3 Configuration

 ──────────────────────────────────────────────────────────────────────────────

  ┌──────────────────── Search Configuration Parameter ─────────────────────┐

  │        Enter CONFIG_ (sub)string to search for (omit CONFIG_)           │  

  │ ┌─────────────────────────────────────────────────────────────────────┐ │  

  │ │wireless                                                             │ │  

  │ └─────────────────────────────────────────────────────────────────────┘ │  

  │                                                                         │  

  │                                                                         │  

  ├─────────────────────────────────────────────────────────────────────────┤  

  │                         <  Ok  >      < Help >                          │  

  └─────────────────────────────────────────────────────────────────────────┘  
```

```
Symbol: WIRELESS_EXT [=y]

  │ Prompt: Wireless extensions                                             │  

  │   Defined at net/wireless/Kconfig:4                                     │  

  │   Depends on: NET && !S390                                              │  

  │   Location:                                                             │  

  │     -> Networking                                                       │  

  │       -> Networking support (NET [=y])                                  │  

  │         -> Wireless                                                     │  
```

----------

## mhelvens

Oh.  :Smile:  I learned a new trick.

----------

## mhelvens

Ok, guys (and girls). As I predicted, it's not working. I have emerged madwifi-ng and wireless-tools. I have turned on (as far as I know) the correct kernel options. I think the module ath_pci is running.

There is no ath0 to be found anywhere (I tried updatedb and locate). And the url (ip-address) to the wireless router doesn't work yet. The internet running through the normal eth0 still works, though. That's how I'm posting this. But that connection has to go and wireless has to work.

ifconfig:

```
eth0      Link encap:Ethernet  HWaddr 00:13:D4:90:30:45

          inet addr:192.168.1.10  Bcast:192.168.1.255  Mask:255.255.255.0

          inet6 addr: fe80::213:d4ff:fe90:3045/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:1541 errors:0 dropped:0 overruns:0 frame:0

          TX packets:1591 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:472740 (461.6 Kb)  TX bytes:125447 (122.5 Kb)

          Interrupt:23 Base address:0x4000

lo        Link encap:Local Loopback

          inet addr:127.0.0.1  Mask:255.0.0.0

          inet6 addr: ::1/128 Scope:Host

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:630 errors:0 dropped:0 overruns:0 frame:0

          TX packets:630 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:62619 (61.1 Kb)  TX bytes:62619 (61.1 Kb)
```

iwconfig:

```
lo        no wireless extensions.

eth0      no wireless extensions.

sit0      no wireless extensions.
```

Content of /etc/conf.d:

```
# The following was for non-wireless internet

dns_domain_lo="helvensteijn"

config_eth0=( "dhcp" )

# The following is for wireless internet

preferred_aps=("MYNAME")

iwpriv_MYNAME=(

        set AuthMode="WPAPSK"

        set EncrypType="AES" # In the example, this was TKIP

        set WPAPSK="MYPASS"

)
```

The example used TKIP, but I'm mirroring the settings from a Windows pc in this house. It uses AES. On the router, this setting is actually Automatic, so I'm not sure if it really matters. What might matter is that The AuthMode is actually WPA2-PSK, not WPAPSK, but that exact string ("WPA2-PSK") didn't work either.

What should I do/try now?

Thanks!

----------

## micmac

The iwpriv method is only useful for crappy rt2x00 drivers. Just remove these lines and use wpa_supplicant.

Regarding the missing ath0 interace, did you load the driver?

----------

## mhelvens

Yes, wpa_supplicant is the first thing I'm going to try. Shortly.

Edit: Still compiling Qt 4 with qt3support first.

----------

## mhelvens

Ok, I feel like I'm close.

/etc/conf.d/net

```
# Global

dns_domain_lo="<domain>"

# LAN configuration

config_eth0=( "dhcp" )

# WLAN configuration

modules=( "wpa_supplicant" )

wpa_supplicant_ath0="-Dmadwifi"

wpa_timeout_ath0=60

config_ath0=( "dhcp" )
```

/etc/wpa_supplicant/wpa_supplicant.conf

```
network={

        ssid="<MyNet>"

        proto=WPA

        key_mgmt=WPA-PSK

        pairwise=TKIP

        group=TKIP

        mode=0

        auth_alg=OPEN

        psk="<MyPass>"

        priority=2

}
```

Output of '/etc/init.d/net.ath0 start':

```
 * Starting ath0

 *   Bringing up ath0

 *     dhcp

 *       network interface ath0 does not exist

 *       Please verify hardware or kernel module (driver)
```

What do you think?

----------

## Qcumber-some

/etc/udev/rules.d/70-persistent-network.rules has to have an entry for your ath0.

In my case it looks like:

```
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="<MAC-ADDRESS_OF_THE_CARD>", ATTRS{type}=="1", NAME="ath0"
```

You can find your MAC-Address even if ath0 is not available using a hardware inventory tool like lshw.

Run 

```
lshw -class net
```

 and it will show you all your network cards. One of them is logical wifi0 - your card.

If you don't have lshw, just emerge it.

----------

## mhelvens

Thanks for your reply. The output:

```
  *-network UNCLAIMED

       description: Ethernet controller

       product: AR5005G 802.11abg NIC

       vendor: Atheros Communications, Inc.

       physical id: 6

       bus info: pci@0000:05:06.0

       version: 01

       width: 32 bits

       clock: 33MHz

       capabilities: pm cap_list

       configuration: latency=168 maxlatency=28 mingnt=10
```

It doesn't seem to list the mac-address.

----------

## Qcumber-some

It should have much more capabilities, and a logical name. There's something wrong, but i can't tell you what.

Just a shot into the blue - does it work when you enter a wildcard?

```
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="?*", ATTRS{type}=="1", NAME="ath0"
```

If you only have one, it might suffice.

I don't know if it will collide with your eth0.

Second idea: How about booting a LiveCD? Might find the right configuration...

----------

## mhelvens

No luck. Same message. I found this information about the word UNCLAIMED:

* a node is marked as UNCLAIMED if no specific support for it has been loaded (or lshw has been unable to identify the driver)

Seems like both lshw and ath0 don't work because of the same thing.

But isn't madwifi-ng the driver? I already emerged that...

----------

## Qcumber-some

Right, madwifi-ng is the driver.

Did you build the driver against your current kernel? How about re-emerging madwifi-ng just to be sure?

Are the Kernel settings correct? You should have CONFIG_NET_RADIO enabled (I have it compiled in).

I also have the Generic IEEE 802.11 Networking stack and the options for this compiled as modules.

What does lsmod | grep ath_pci say? Did you load the driver modules correctly? You could enable module autoloading in the kernel to make sure that it's not just this.

----------

## mhelvens

I used the live-cd, found the mac-address, entered it in the 70-persistent-net.rules file.

Still the same problems.

Yes, CONFIG_NET_RADIO is compiled in. The IEEE 802.11 thing I did not have. I compiled that in as well. I'll reboot shortly and tell you how it went.

Edit: Rebooted. No luck. Re-emerged madwifi-ng. No luck.

Output of lsmod:

```
ath_pci                88240  0

wlan                  186568  1 ath_pci

ath_hal               218352  1 ath_pci
```

----------

## Qcumber-some

Did you enable the options to Generic IEEE 802.11 Networking stack?

When I do lsmod, the modules from there are active, but I don't know if it is just from my autoload configuration.

I remember vaguely that you have to load some modules before ath_pci, and so I did that in autoload.

```

#cat /etc/modules.autoload.d/kernel-2.6

wlan_scan_sta

wlan_scan_ap

wlan_wep

wlan_tkip

wlan_xauth

ath_pci

```

You might not have them as modules, as you compiled that in. But you should just make sure it is there.

My lsmod | grep ath:

```

#lsmod | grep ath

ath_rate_sample        11136  1

ath_pci                80544  0

wlan                  168260  8 wlan_xauth,wlan_tkip,wlan_wep,wlan_scan_ap,wlan_scan_sta,ath_rate_sample,ath_pci

ath_hal               190032  3 ath_rate_sample,ath_pci

```

Edit: I've checked the options there in the Generic IEEE stack. Help says something about IPW2100/IPW2200 - and the module names are also wrong. I think that's the wrong direction to head...Last edited by Qcumber-some on Mon Jun 11, 2007 12:33 am; edited 1 time in total

----------

## mhelvens

Ah, so I have to enable the sub-options as well? Doing it right now.

Edit: Did it. No luck. Re-emerged madwifi-ng again. No luck. modprobed ath_pci just to be sure. No luck.Last edited by mhelvens on Mon Jun 11, 2007 12:39 am; edited 1 time in total

----------

## Qcumber-some

 *Michiel_H wrote:*   

> Ah, so I have to enable the sub-options as well? Doing it right now.

 

No, that's the wrong direction to head. My fault, sorry.

The modules I've seen (wlan_tkip etc.) belong to madwifi-ng.

Tried my autoload conf from above?

----------

## mhelvens

I've not tried autoload yet. Though I see udev already loads ath_pci automatically. And I tried modprobe on it myself.

*Yawn*, maybe I should continue this tomorrow.

Not sure what to do next. But thanks for your help so far!

----------

## Qcumber-some

I think you are very close  :Laughing: 

But if you want to continue tomorrow, maybe someone else has a good idea, too.

----------

## mhelvens

I'm at the end of my rope again. Can anyone tell me what would give the following output, and make lshw not give the right name or mac-address?

Output of '/etc/init.d/net.ath0 start':

```
 * Starting ath0

 *   Bringing up ath0

 *     dhcp

 *       network interface ath0 does not exist

 *       Please verify hardware or kernel module (driver)
```

----------

## Qcumber-some

Did you try to autoload the wlan_* modules before ath_pci, as I have posted?

Another option, which could cause more work, would be trying to find the complete configuration of the LiveCD Kernel plus modules plus configuration files, and then building your configuration after the LiveCD?

----------

## mhelvens

I have no wlan_* modules. Only one called wlan.

And I was under the impression that modprobe automatically loaded the prerequisites.

----------

## Qcumber-some

You don't have wlan_tkip or wlan_xauth? Strange... maybe someone with madwifi-ng knowledge can explain this - did madwifi-ng not recognize the card?

About modprobe: modprobe does load mandatory prerequisites, but not optional prerequisites. As far as I understood the wlan_* modules are not mandatory for madwifi-ng to start, but mandatory to make the whole network thing work.

Another idea: Can you scan dmesg or /var/log/messages for error messages from the driver? Something with a kill switch, maybe? Does the card have a button to switch it on and off?

Edit: I found http://madwifi.org/wiki/UserDocs/Distro/Gentoo while searching. Maybe this can help?

----------

## mhelvens

I think those modules of yours are those extra options from the kernel that you said were the wrong direction to head in.

Here's some dmesg things where the word 'ath' appears:

```
ath_hal: module license 'Proprietary' taints kernel.

ath_hal: 0.9.18.0 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413, RF5413)

wlan: 0.8.4.2 (0.9.3.1)

ath_pci: 0.9.4.5 (0.9.3.1)

intel8x0_measure_ac97_clock: measured 58735 usecs

intel8x0: clocking to 46988

ACPI: PCI Interrupt Link [APC1] enabled at IRQ 16

ACPI: PCI Interrupt 0000:05:06.0[A] -> Link [APC1] -> GSI 16 (level, low) -> IRQ 16

Unable to load needed module: ath_rate_sample; no support for automatic module loading<3>Error loading module "ath_rate_sample"
```

The problem might be that last line. Since I have no module called ath_rate_sample.

There is no button on the card.

Edit: No, I compiled those options as modules, and I still don't have your wlan_tkip, etc.

----------

## Qcumber-some

http://groups.google.de/group/linux.debian.bugs.dist/browse_thread/thread/fe5472a2dd743a2/2dcf4588cad05768?lnk=st&q=ath_rate_sample&rnum=4#2dcf4588cad05768

Debian, but also some hints.

I can't check it on my box right now, am currently running Windows.

The module ath_rate_sample also belongs to madwifi-ng, if I'm not mistaken.

Do you get any related errors/warnings when emerging madwifi-ng?

----------

## mhelvens

I think we may have stumbled upon the problem. During the emerge, I get several messages like:

```
 * Preparing ath_rate_sample module
```

A lot of modules that don't show up with lsmod.

At the end it says:

```
 * Installing ath_hal module

 * Installing wlan module

 * Installing wlan_acl module

 * Installing wlan_ccmp module

 * Installing wlan_tkip module

 * Installing wlan_wep module

 * Installing wlan_xauth module

 * Installing wlan_scan_sta module

 * Installing wlan_scan_ap module

 * Installing ath_rate_amrr module

 * Installing ath_rate_onoe module

 * Installing ath_rate_sample module

 * Installing ath_pci module

 * Preparing file for modules.d ...
```

I only have three of those. ath_hal, ath_pci and wlan. But I don't get any errors at all. Just a lot of warnings.

----------

## Qcumber-some

Yes, we are getting close.

You say you don't have wlan_tkip module. What does it say when you say modprobe wlan_tkip? Can't find the module? Can't resolve dependency? Double-check /var/log/messages and dmesg when trying this.

If it says it can't resolve the dependency, you may have just to enable module autoloading in your Kernel.

If there's really no wlan_tkip module (double-check that with find / -iname wlan_*.ko -or -iname wlan_*.o) there's something really strange, and it happened while emerging madwifi-ng.

Edtit; Maybe a quick call of modules-update force can rebuild the modules database?

----------

## mhelvens

Would you look at that. I thought that lsmod listed all modules, not just those that are loaded.

Ok, modprobe wlan_tkip works. And it is now listed by lsmod as well. So, should I load ALL those modules?

Edit: I just tried your exact autoload scheme, and it doesn't work. Same problem.

----------

## Qcumber-some

From man lsmod:

 *Quote:*   

> lsmod is a trivial program which nicely formats the contents of the /proc/modules, showing what kernel modules are currently loaded.

 

Yes, you should at least load all the modules I told you earlier in autoload.

If it doesn't work, you'll have to try enabling module autoloading in Kernel (make menuconfig -> Something with Module support (3rd ? item in the list), and in there module autoloading, should be the last item in the list.

----------

## mhelvens

I just had the same idea. Kernel is compiling now.

Nope. Even with Automatic kernel module loading built in, same problems.

I can see the end of the rope again.  :Mad: 

----------

## Qcumber-some

Hm.

What does lsmod say now about wlan_* and ath_*?

Any output in /var/log/messages or dmesg?

----------

## mhelvens

```
michiel / # lsmod | grep wlan_*

wlan_xauth              3904  0

wlan_tkip              13312  0

wlan_wep                8256  0

wlan_scan_ap            7168  0

wlan_scan_sta          14400  0

wlan                  186568  7 ath_rate_sample,wlan_xauth,wlan_tkip,wlan_wep,wlan_scan_ap,wlan_scan_sta,ath_pci

michiel / # lsmod | grep ath_*

ath_rate_sample        14080  0

ath_pci                88240  0

wlan                  186568  7 ath_rate_sample,wlan_xauth,wlan_tkip,wlan_wep,wlan_scan_ap,wlan_scan_sta,ath_pci

ath_hal               218352  2 ath_rate_sample,ath_pci
```

```
michiel / # dmesg | grep ath -A 2 -B 2

ACPI: PCI Interrupt 0000:00:04.0[A] -> Link [APCJ] -> GSI 22 (level, low) -> IRQ 22

PCI: Setting latency timer of device 0000:00:04.0 to 64

ath_hal: module license 'Proprietary' taints kernel.

ath_hal: 0.9.18.0 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413, RF5413)

wlan: 0.8.4.2 (0.9.3.1)

ath_pci: 0.9.4.5 (0.9.3.1)

scsi 4:0:0:0: Direct-Access     Generic  USB SD Reader    1.00 PQ: 0 ANSI: 0

sd 4:0:0:0: Attached scsi removable disk sdd

--

ACPI: PCI Interrupt Link [APC1] enabled at IRQ 16

ACPI: PCI Interrupt 0000:05:06.0[A] -> Link [APC1] -> GSI 16 (level, low) -> IRQ 16

Unable to load needed module: ath_rate_sample; no support for automatic module loading<3>Error loading module "ath_rate_sample"

ACPI: PCI interrupt for device 0000:05:06.0 disabled

ACPI: PCI Interrupt Link [APC3] enabled at IRQ 18

--

PCI: Setting latency timer of device 0000:01:00.0 to 64

NVRM: loading NVIDIA Linux x86_64 Kernel Module  1.0-8776  Mon Oct 16 21:53:43 PDT 2006

ath_rate_sample: 1.2 (0.9.3.1)

NTFS volume version 3.1.

kjournald starting.  Commit interval 5 seconds
```

----------

## Qcumber-some

lsmod looks good.

The dmesg output doesn't look valid. If there is an error loading ath_rate_sample, how can it be in lsmod then?

I think this is the old error which you already posted above.

So there is no error in dmesg anymore...?

I'm sorry, I'll have to continue this in about 9 hours. Hopefully someone else can help, I'm currently a bit out of options, but I'll look over that later then when I'm running Gentoo again.

----------

## mhelvens

No, it's a new dmesg output. The error is simply still there. Even though the module is loaded.

I understand you have other things to do.  :Wink:  And so do I.

----------

## Qcumber-some

Just a short notice,

at my system, dmesg says

```

ath_rate_sample: 1.2 (0.9.3.1)

wifi0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps

wifi0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps

```

wifi0 is the logical device and should be there. Should also be there in ifconfig, but it's not there at your machine.

Just another coincidence, I suppose, but maybe it helps finding the error.

----------

## mhelvens

Well, maybe. You're right that I don't have that device anywhere. Not sure what to do with it, though.

My next step is to take the card out, and put it in another pci slot. You never know.

----------

## Qcumber-some

Things to consider:

- Did you compile wpa_supplicant with USE="madwifi"? Though I think wpa_supplicant doesn't have anything to say yet - it's still madwifi.

- You can try to manipulate module loading of ath_pci to force creating of the ath0 node:

```
#cat /etc/modules.d/ath_pci

alias ath0 ath_pci

options ath_pci autocreate=ap

```

Not necessary with my system, but it's not identical to yours anyway.

--

I'm off until in 5 hours.

----------

## mhelvens

It lives!  :Very Happy: 

On a whim I tried another ifconfig -a, and to my surprise there was a wifi0 and an ath1. Tried iwconfig, same thing.

Something I did seems to have worked. I think it was the 'madwifi' useflag and re-emerge of wpa_supplicant.

Anyway, the ath1 thing was still a bit strange. So I looked at /etc/udev/rules.d/70-persistent-net.rules, and some linux pixie automatically created a line for ath1, since I already put my (apparently incorrect) ath0 line there ages ago (or one day, to be precise). I deleted my own line, changed the ath1 to ath0 and rebooted. And ath0 automatically started on boot. Didn't even have to put it into default runlevel myself (which is a bit strange).

But anyway, thanks for all your help. Have a cookie.  :Smile: 

One last thing. The wpa_supplicant GUI doesn't work yet. A minor problem to be sure, but I'd like it to work anyway. It doesn't show any networks, any access points or anything. It sais: "Could not get status from wpa_supplicant". Any ideas?

----------

## Princess Nell

You may be missing a ctrl_interface line in wpa_supplicant.conf.

----------

## mhelvens

Yes, that worked. Thanks.

After rebooting, I could get the GUI. But now the whole ath0 connection doesn't work anymore. I put the GUI settings back to what they were, but it still doesn't work. So it must have been something else.

I get the following error:

```
 * Starting wpa_supplicant on ath0 ...

ioctl[SIOCSIWMODE]: Invalid argument

Could not configure driver to use managed mode
```

I must have changed something I'm not aware of that broke it again after reboot.  :Crying or Very sad: 

What could it be this time?

Thanks!

----------

## Qcumber-some

Nice to know that the n00b could be of help  :Razz: 

But I got no cookie, the cat eated it. Well, she seemed to be sorry, at least.

With the GUI I can't help. It doesn't work on my system either (just starts and then does nothing) but I don't need it anyway.

----------

## mhelvens

I put the cable back in so I could use eth0 again (or else, no internet). But since I put the cable back in, ath0 works again. This is so strange!

----------

## Flashix

Could it be that the ath0 only wants to come up after your eth0 has been successfully started?

I remember having this problem also ones before. This could explain why your ath0 is only working when your cable is attached (eth0)

In the /etc/init.d/ directory, what are the links to your net.lo?

----------

## mhelvens

```
lrwxrwxrwx  1 root root     6 Jun 11 00:39 net.ath0 -> net.lo

lrwxrwxrwx  1 root root     6 May 21 12:11 net.eth0 -> net.lo

-rwxr-xr-x  1 root root 30522 May 21 12:11 net.lo
```

I created the net.ath0 link myself.

----------

## Qcumber-some

From your description and error messages before, I don't think you are using ifplugd. The error now could be caused by a mistake in ifplugd.action. Or by a strange preup() setting in /etc/conf.d/net. I don't have any preup() there, but I've seen some configurations as examples which have it there.

----------

## mhelvens

No. ifplugd is an ebuild that I don't have emerged. Should I?

My /etc/conf.d/net is identical to yours.  :Smile: 

----------

## Qcumber-some

No, you should not emerge ifplugd. Not yet.   :Laughing:  Well, I use ifplugd only for eth0.

I just wanted to make sure that there is no automatism which I know of (ifplugd and the preup() stuff).

Out of options, again... I hope there are others who know better.

----------

## mhelvens

Within this session, which has working ath0, I have stopped net.eth0 and removed it from default runlevel. I pulled out the cable. And internet (no cable -> must be ath0) still works. So it doesn't seem to be a dependency. But I suspect that in this condition, it will break again after reboot. Maybe.

----------

## Qcumber-some

What does your wpa_supplicant.conf look like?

What did dmesg say at the boot (when you discovered that it worked with plugged eth0) about ath0 and eth0?

----------

## mhelvens

My wpa_supplicant.conf:

```
network={

        ssid="<MyNet>"

        proto=WPA

        key_mgmt=WPA-PSK

        pairwise=TKIP

        group=TKIP

        mode=0

        auth_alg=OPEN

        psk="<MyPass>"

        priority=2

}
```

dmesg doesn't say anything about eth0 and ath0. Just about those modules (ath_pci, etc.). They look ok.

----------

## Qcumber-some

Sorry, not dmesg, that's too early (boot).

I meant /var/log/messages - that's after entering the first runlevel.

----------

## mhelvens

Ok, I guess this must be the part. I'm not 100% sure though.  :Confused:   Can you get any useful information out of this?

```
michiel / # cat /var/log/messages | grep "Jun 12.*[ea]th0"

Jun 12 08:36:39 michiel dhcpcd[6102]: ath0: dhcpcd 3.0.16 starting

Jun 12 08:36:39 michiel dhcpcd[6102]: ath0: hardware address = 00:16:0a:06:fb:0c

Jun 12 08:36:39 michiel dhcpcd[6102]: ath0: broadcasting for a lease

Jun 12 08:36:40 michiel dhcpcd[6102]: ath0: offered 192.168.50.100 from 192.168.50.1 `ÿ'

Jun 12 08:36:40 michiel dhcpcd[6102]: ath0: leased 192.168.50.100 for 7200 seconds

Jun 12 08:36:40 michiel dhcpcd[6102]: ath0: no renewal time supplied, assuming 3600 seconds

Jun 12 08:36:40 michiel dhcpcd[6102]: ath0: no rebind time supplied, assuming 6300 seconds

Jun 12 08:36:40 michiel dhcpcd[6102]: ath0: adding IP address 192.168.50.100/24

Jun 12 08:36:40 michiel dhcpcd[6102]: ath0: adding route to 192.168.50.0 (255.255.255.0) via 0.0.0.0 metric 2000

Jun 12 08:36:40 michiel dhcpcd[6102]: ath0: removing route to 192.168.50.0 (255.255.255.0) via 0.0.0.0 metric 0

Jun 12 08:36:40 michiel dhcpcd[6102]: ath0: adding default route via 192.168.50.1 metric 2000

Jun 12 08:36:40 michiel kernel: eth0: forcedeth.c: subsystem: 01043:8141 bound to 0000:00:0a.0

Jun 12 08:36:43 michiel dhcpcd[6762]: eth0: dhcpcd 3.0.16 starting

Jun 12 08:36:43 michiel dhcpcd[6762]: eth0: hardware address = 00:13:d4:90:30:45

Jun 12 08:36:43 michiel dhcpcd[6762]: eth0: broadcasting for a lease

Jun 12 08:36:43 michiel dhcpcd[6762]: eth0: offered 192.168.1.10 from 192.168.1.1

Jun 12 08:36:43 michiel dhcpcd[6762]: eth0: leased 192.168.1.10 for 259200 seconds

Jun 12 08:36:43 michiel dhcpcd[6762]: eth0: adding IP address 192.168.1.10/24

Jun 12 08:36:43 michiel dhcpcd[6762]: eth0: adding default route via 192.168.1.1 metric 0
```

----------

## Qcumber-some

Unfortunately not  :Sad: 

That looks all good, but there's no visible dependency.

What I'd now do is comparing this log part to a part where you boot without eth0 connected. The difference could say something.

----------

## sandcrawler

I may have missed something in this thread, but from a networking standpoint, if your eth0 starts up after ath0 it will either override your default gateway or create a second default gateway.  If both point to the wap then you should be ok.  I'd initially recommend rebooting, then doing a stop on eth0 and a restart on ath0 to see if that fixes it.

----------

## mhelvens

Well, I deleted net.eth0. A bit radical, but it seems to be working. Except that I couldn't reach the internet (I could reach the router, however) until I reset the router. But that can't be a problem on my side, can it?

----------

## hhatterr

 *Michiel_H wrote:*   

> But I don't suppose you can find that option alone in 'make menuconfig'? I'm not quite ready to manually edit the .config file. By the way, it did work. madwifi-ng is emerged successfully.
> 
> 

 

I am following along and am stuck at this step. "make menuconfig" shows the option for "Wireless LAN drivers (non-hamradio) & Wireless Extensions" is selected, yet the resulting .config file has now line with "CONFIG_WIRELESS_EXT=y". It does have "CONFIG_NET_WIRELESS=y" and "CONFIG_NET_RADIO=y". 

What do I need to do to get the "CONFIG_WIRELESS_EXT=y".

Also, I was unable to understand the "just hit "/"" comment ... hitting "/" inside make menuconfig has no effect ...

Appreciate all the help

----------

