# using both wpa_supplicant and gentoo's init scripts

## truekaiser

i just recently got a new laptop with a ath9k wireless chip, frankly i love the fact that it works right out of the box even on the install cd. but right now i am running into my limit's on wireless configuration on linux. i plan on eventually migrating to wireless n but i do not know how to set up the machine so it will connect to my home ap automatically with the gentoo init scripts so i don't have to worry about starting things manually like ntp and nfs but still allow it to be managed by wpa_supplicant to connect to other ap's if i want via the qt4 gui. right now i got the laptop set up to connect automatically to my ap running in G mode with wep. the gentoo documentation i have found seems to indicate either the init scripts or wpa_supplicant but not both..

this is the wireless card

```

08:00.0 Network controller: Atheros Communications Inc. AR928X Wireless Network Adapter (PCI-Express) (rev 01)

        Subsystem: Foxconn International, Inc. Device e01f

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

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

        Capabilities: [40] Power Management version 2

        Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit-

        Capabilities: [60] Express Legacy Endpoint, MSI 00

        Capabilities: [90] MSI-X: Enable- Count=1 Masked-

        Capabilities: [100] Advanced Error Reporting

        Capabilities: [140] Virtual Channel <?>

        Capabilities: [160] Device Serial Number 00-00-00-00-00-00-00-00

        Kernel driver in use: ath9k

        Kernel modules: ath9k
```

wpa_supplicant can't seem to find my card this is my /etc/conf.d/net

```

# This blank configuration will automatically use DHCP for any net.*

# scripts in /etc/init.d.  To create a more complete configuration,

# please review /etc/conf.d/net.example and save your configuration

# in /etc/conf.d/net (this file :]!).

#modules=("wpa_supplicant") #makes configuration solely wpa_supplicant's responsibility  

wpa_supplicant_wlan0="-Dwext"

config_eth0=("dhcp")

config_wlan0=("dhcp")

essid_wlan0="wscale"

ap_wlan0="00:14:6C:AE:C5:38"

mode_wlan0="managed"

channel_wlan0="1"

key_wscale="" #like i am telling the whole world :P

```

----------

## oRDeX

why don't using modules=( "wpa_supplicant" )

and putting your WEP network inside the wpa_supplicant.conf?

Of course you have to choose is you want to use wpa_supplicant or to configure it manually (by gentoo script)

----------

## truekaiser

 *oRDeX wrote:*   

> why don't using modules=( "wpa_supplicant" )
> 
> and putting your WEP network inside the wpa_supplicant.conf?
> 
> Of course you have to choose is you want to use wpa_supplicant or to configure it manually (by gentoo script)

 

so it's not 'either/or'? if i set up wpa supplicant to do wep for now the net.wlan0 init script will call on wpa_supplicant to start the interface?

----------

## dreadlorde

Why would you use WEP?

----------

## truekaiser

 *dreadlorde wrote:*   

> Why would you use WEP?

 

because at the moment it's the only security option available that all my devices have in common.

----------

## lxg

By the way, you could also have a look at NetworkManager, it can be integrated into your desktop as a tray icon (nm-applet, a Gnome app, but should also work in KDE) and lets you configure your networks very userfriendly. It also supports WEP, WPA, WPA2. There's a nice guide in the (inofficial) Gentoo Wiki, which worked fine for me: http://en.gentoo-wiki.com/wiki/NetworkManager

----------

## truekaiser

 *lxg wrote:*   

> By the way, you could also have a look at NetworkManager, it can be integrated into your desktop as a tray icon (nm-applet, a Gnome app, but should also work in KDE) and lets you configure your networks very userfriendly. It also supports WEP, WPA, WPA2. There's a nice guide in the (inofficial) Gentoo Wiki, which worked fine for me: http://en.gentoo-wiki.com/wiki/NetworkManager

 

ok spent all afternoon getting that to work. like it so far and i got it to connect to my router but not in full n mode. my mother's laptop with the same card can get up to 130mbps while i am still stuck at 54mbps cause it seems wpa supplicant and my draft n router don't like each other's versions of wpa2 aes encryption.

----------

