# Getting Gentoo to load wireless card

## wayneah

With much help from the vets trolling these forums, this is my first post to the forum from my Gentoo-powered Acer Celeron M laptop.  But this is via my wired card. I am really lost in the weeds on getting the system to recognize my built-in Atheros AR5005G wireless card and connect with my D-Link Air Plus G wireless router. Here's what I've done so far, trying to muddle through the installation and networking docs:

Emerged wpa_supplicant 

There is a warning in the wireless HOWTO: "Important: You have to have CONFIG_PACKET enabled in your kernel for wpa_supplicant to work." Not sure how I check or fix that.

Unremarked the following lines in /etc/conf.d/net.example:

```
modules=( "wpa_supplicant" )

wpa_supplicant_ath0="-Dmadwifi" # For Atheros based cards
```

I didn't mess with any of the ESSID or DHCP settings and saved the file as net.

In /etc/wpa_supplicant.conf.example, I made sure that these lines wer set per to HOWTO:

```
ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=0

ap_scan=1
```

Then I substituted "default" for "simple" and a 16-letter password for "very secret password" in these lines:

```
# Simple case: WPA-PSK, PSK as an ASCII passphrase, allow all valid ciphers

network={

  ssid="simple"

  psk="very secret passphrase"

  # The higher the priority the sooner we are matched

  priority=5

}
```

Then I saved the file as:

```
 /etc/wpa_supplicant.conf
```

Am I getting warm? :Cool: 

----------

## msalerno

Yes and No.

Your configuration files shoule never end in .example, just remove the .example and you should have the proper config filename. The files that end in .example, are just examples.

Do you have a wired network card too?

Here is my config with wpa_supplicant and madwifi:

 */etc/conf.d/net wrote:*   

> /etc/conf.d/net
> 
> iface_ath0="192.168.10.5 broadcast 192.168.10.255 netmask 255.255.255.0"
> 
> modules=( "wpa_supplicant" )
> ...

 

 */etc/conf.d/wpa_supplicant wrote:*   

> /etc/conf.d/wpa_supplicant
> 
> INTERFACES="ath0"
> 
> ARGS="-w"

 

 */etc/wpa_supplicant.conf wrote:*   

> /etc/wpa_supplicant.conf
> 
> ctrl_interface=/var/run/wpa_supplicant
> 
> ctrl_interface_group=0
> ...

 

ln -s /etc/init.d/net.lo /etc/init.d/net.ath0

rc-update add net.ath0 default

/etc/init.d/net.ath0 startLast edited by msalerno on Tue Aug 30, 2005 9:52 pm; edited 1 time in total

----------

## UberLord

 *msalerno wrote:*   

>  */etc/conf.d/net wrote:*   /etc/conf.d/net
> 
> iface_ath0="192.168.10.5 broadcast 192.168.10.255 netmask 255.255.255.0"
> 
> modules=( "wpa_supplicant" )
> ...

 

Old

Here's new  :Smile: 

```
config_WankaVision=( "192.168.10.5/24 brd+")

modules=( "wpa_supplicant" )

wpa_supplicant_ath0="-Dmadwifi"

routes_WankaVision=( "default via 192.168.10.1" )

```

The brd+ may only work with baselayout-1.12.0_pre or by adding iproute2 to your modules, I can't remember

If it doesn't, use the old broadcast 192.168.10.255 again

 */etc/conf.d/wpa_supplicant wrote:*   

> /etc/conf.d/wpa_supplicant
> 
> INTERFACES="ath0"
> 
> ARGS="-w"

 

Not used  :Smile:  Infact, remove it and and /etc/init.d/wpa_supplicant

Remove wpa_supplicant from any runlevels as well.

 */etc/wpa_supplicant.conf wrote:*   

> /etc/wpa_supplicant.conf
> 
> ctrl_interface=/var/run/wpa_supplicant
> 
> ctrl_interface_group=0
> ...

 

I don't understand - your conf.d/net defined WankaVision and yet wpa_supplicant defines PeanutButter.

Ah well, use one or both in your config_ lines

Why do this? Well, you're coding your config for the Access Point - if you need a different if you ever need to then you can!

----------

## msalerno

Oops, when I was posting I got called away from my desk, so when I returned and finished the post I must have just added peanutbutter by accident, it should have been WankaVision.

I am currently running baselayout-1.11.13-r1, is there a thread or any documentation that discusses the changes in baselayout?

Thanks for the updated info.

----------

## UberLord

/etc/conf.d/net.example and /etc/conf.d/net.wireless

Online docs normally only refer to current stable verion

----------

## wayneah

Whew! Trying to follow you guys on this one was a little like trying to follow the ball as Federer and Agassi exchange baseline shots. Here's what I tried:

My access point is set like this:

Wireless Radio: Enabled

SSID: WankaVision

Channel: 6

SSID Broadcast: Disabled

Security: WPA-PSK

/etc/conf.d/net is:

```
iface_ath0="192.168.10.5 broadcast 192.168.10.255 netmask 255.255.255.0"

modules=( "wpa_supplicant" )

wpa_supplicant_ath0="-Dmadwifi"

routes_WankaVision=( "default via 192.168.10.1" )
```

/etc/wpa_supplicant.conf is:

```
ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=0

fast_reauth=1

ap_scan=1

network={

ssid="WankaVision"

scan_ssid=1

proto=WPA

key_mgmt=WPA-PSK

psk="rammalammadingdong"

)
```

When I do . . .

ln -s /etc/init.d/net.lo /etc/init.d/net.ath0

rc-update add net.ath0 default

/etc/init.d/net.ath0 start

 . . . I get:

*  Starting ath0

 *   Bringing up ath0

 *     192.168.10.5

 *     ath0 does not exist

Thanks!

----------

## mslinn

I have a very similar setup, and I get:

```

 * Starting ath0

 *   Starting wpa_supplicant on ath0 ...

Unsupported driver 'madwifi'. 

```

Unsupported?!?!?!

```
$ eix madwifi

* net-wireless/madwifi-driver

     Available versions:  0.1_pre20050107 0.1_pre20050224 0.1_pre20050420 0.1_pre20050420-r1 [M]0.1_pre20050809 [M]0.1_pre20050809-r1

     Installed:           0.1_pre20050420-r1

     Homepage:            http://madwifi.sourceforge.net/

     Description:         Wireless driver for Atheros chipset a/b/g cards

* net-wireless/madwifi-tools

     Available versions:  0.1_pre20050106 *0.1_pre20050107 0.1_pre20050420

     Installed:           0.1_pre20050420

     Homepage:            http://madwifi.sourceforge.net/

     Description:         Wireless tools for Atheros chipset a/b/g cards

```

Mike

----------

## msalerno

What's the output of "lsmod" and "equery list madwifi" ?

----------

## UberLord

 *wayneah wrote:*   

> 
> 
> *  Starting ath0
> 
>  *   Bringing up ath0
> ...

 

Easy one - you need to emerge madwifi-driver and then modprobe ath_pci or reboot.

----------

## UberLord

 *mslinn wrote:*   

> I have a very similar setup, and I get:
> 
> ```
> 
>  * Starting ath0
> ...

 

Try re-emerging wpa_supplicant with the madwifi USE flag

----------

## mslinn

Thank you, the suggestion got me past that issue.  Wireless works again!   :Very Happy: 

Now I have a new question!

```

$ sudo /etc/init.d/net.ath0 start

 * Caching service dependencies ...

                                                                                                                 [ ok ]

 * Starting ath0

 *   Starting wpa_supplicant on ath0 ...

ioctl[SIOCSIWPMKSA]: Operation not supported                                                                     [ ok ]

 *   Starting wpa_cli on ath0 ...                                                                                [ ok ]

 *     ath0 connected to "ms32" at 00:09:5B:ED:9A:44

 *   ath0 configured with address 192.168.1.110/24
```

Is the message 'ioctl[SIOCSIWPMKSA]: Operation not supported' important?  If so, how do I remove it?

Mike

----------

## UberLord

 *mslinn wrote:*   

> Is the message 'ioctl[SIOCSIWPMKSA]: Operation not supported' important?  If so, how do I remove it?

 

It means that madwifi-driver does not support something wpa_supplicant is trying todo. It's not important and you can't easily remove it.

Well, you can, but that would hide any errors wpa_supplicant may give you in the future - which is bad so I'm not going to tell you how  :Wink: 

What a meanie I am  :Twisted Evil: 

----------

## mslinn

UberLord,

Thanks for you quick and helpful response.

I'd like to suggest that warning/info messages like that one be suppressed unless the user sets a log level high enough to make them visible.  Might be implemented as a new command in a config file, rather like Apache httpd:

```
# LogLevel: Control the number of messages logged to the error_log.

# Possible values include: debug, info, notice, warn, error, crit, alert, emerg.

#

LogLevel error

```

LogLevel error would hopefully be default

Mike

----------

## UberLord

 *mslinn wrote:*   

> I'd like to suggest that warning/info messages like that one be suppressed unless the user sets a log level high enough to make them visible.  Might be implemented as a new command in a config file, rather like Apache httpd:

 

Use gensplash then - that hides it with a nice picture and animated status bar  :Laughing: 

----------

## wayneah

For some reason I am no longer receiving email notifications of this thread. I had assumed it had gone quite, and then I found all this new info in there.

Here is the result of lsmod - no madwifi in the mix:

```
Module                  Size  Used by

ipv6                  250784  6

pcmcia                 27440  2

pcspkr                  3788  0

rtc                     9364  0

yenta_socket           22120  1

rsrc_nonstatic         12800  1 yenta_socket

pcmcia_core            50404  3 pcmcia,yenta_socket,rsrc_nonstatic

sis900                 21984  0

mii                     5376  1 sis900

i2c_sis96x              5508  0

i2c_core               22400  1 i2c_sis96x

sis_agp                 8612  1

agpgart                35440  1 sis_agp

joydev                  9600  0

dm_mod                 57860  0

ata_piix                9668  0

ahci    sata_vsc                8196  0

sata_uli                7392  0

sata_sis                7232  0

sata_sx4               13764  0

sata_nv                 9476  0

sata_via                8612  0

sata_svw                7684  0

sata_sil                9284  0

sata_promise           11108  0

libata                 46628  12 ata_piix,ahci,sata_qstor,sata_vsc,sata_uli,sata_sis,sata_sx4,sata_nv,sata_via,sata_svw,sata_sil,sata_promise

sbp2                   23688  0

ohci1394               34452  0

ieee1394              100792  2 sbp2,ohci1394

sl811_hcd              13600  0

ohci_hcd               21284  0

uhci_hcd               32144  0

usb_storage            70752  0

usbhid                 43040  0

ehci_hcd               31816  0

usbcore               115996  7 sl811_hcd,ohci_hcd,uhci_hcd,usb_storage,usbhid,ehci_hcd  11588  0

sata_qstor              9860  0
```

The command equery list madwifi produces the message "Command equery not found.

Uberlord, when I try to download the madwifi driver, emerge wants a keyword. I couldn't fathom from the docs how to include that in the emerge request.

Thanks for all the continued help.

wayne

----------

## msalerno

equery is part of the app-portage/gentoolkit

To emerge the madwifi driver and tools, run the 2 below commands, and then emerge them.

echo "net-wireless/madwifi-driver ~x86" >> /etc/portage/package.keywords

echo "net-wireless/madwifi-tools ~x86" >> /etc/portage/package.keywords

----------

## wayneah

Hmmm. Both appeared to emerge fine after running the two echo commands. But my machine is still acting like neither ath0 nor equery is there.

Thanks.

Wayne

----------

## msalerno

What is the output of lsmod?

Your /etc/modules.autoload.d/kernel-2.6 should contain the following modules:

...

ath_hal

ath_pci

wlan

Of course, after you make any changes to the /etc/modules.autoload.d/kernel-2.? or the /etc/modules.d/* you need to run modules-update

Don't worry so much about the equery, I just wanted to see what version of madwifi you had emerged.  It's a great tool to have though, so I would strongly recomend emergind app-portage/gentoolkit

----------

## wayneah

Those moduels are there:

ath_pci                      61632  0

ath_rate_onoe           9000  1 ath_pci

wlan                          117148  3 ath_pci,ath_rate_onoe

ath_hal                      149136  2 ath_pci

Now at boot, ath0 initializes. But wpa_supplicant times out.

Thanks. 

wayne

----------

