# wpa_supplicant & ipw3945

## menschmeier

Hi,

I am trying to improve the behavior of my wlan.

Very often when I booting the wlan stays down, and I got errors like:

 *Quote:*   

> ...
> 
>  *   Wireless radio has been killed for interface eth1   
> 
> ...

 

or  *Quote:*   

> ...
> 
> Error for wireless request "Set ESSID" (8B1A) :
> 
>     SET failed on device eth1 ; No such device.
> ...

 

The /etc/init.d/net.eth1 script is not able to start the device. Instead I have to kill the daemon, unload and load ipw3945, doing some iwconfig stuff .... to start the device.

This happend only sometimes, not always, but about 50%.

So I hoped wpa_supplicant does improve this. So I emerged net-wireless/wpa_supplicant and changed /etc/conf.d/net to

 *Quote:*   

> modules=( "wpa_supplicant" )
> 
> #wpa_supplicant_eth1="-Dipw3945" I have to remove this line to avoid an error saying module not found
> 
> config_eth0=( "192.168.1.33/24" )
> ...

 

and /etc/wpa_supplicant/wpa_supplicant.conf to:

 *Quote:*   

> network={
> 
>         ssid="myessid"
> 
>         psk="mypasswd"
> ...

 

The problem is the config of the driver, wpa_supplicant says:

 *Quote:*   

> ## /etc/init.d/net.eth1 restart
> 
>  * Starting eth1
> 
>  *   Wireless radio has been killed for interface eth1
> ...

 

What do I have done wrong?

menschmeier

----------

## jsfan

I can't tell you what you do wrong. However, I can tell you that your problem is completely unaffected by wpa_supplicant.

I also get the error about the wireless having been killed and sometimes a few tries will help. In fact I usually get this error on first

attempt, on second attempt it will tell me that my driver cannot scan for APs and on third it will connect.

Sometimes I have to unload and reload the ipw3945 (the daemon gets restarted anyway in recent versions).

The errors you see when restarting a device that uses wpa_supplicant are the same as mine. Only unloading and

reloading ipw3945 helps but this will already restart wpa_supplicant, too, so that I never have to start net.eth0

(for me it is eth0), anyway.

One thing I can help you with, however. There is not driver ipw3945 in wpa_supplicant. You have to use -Dwext .

About the killed wireless, my impression is that this only happens when the signal quality is low. With good signal quality

I seem to have this problem a lot less.

----------

## dspahn

I have been using a 3945 for almost a year now. I have had this problem, just like what you two have mentioned. I have decided that it is the nature of the beast- not being a coder myself, I can't improve the problem, but I can suggest how I made it bearable: I created a script that unloads the module, kills the daemon, stops wpa_supplicant, then brings things back up. Nothing special to it, just put the commands you normally have to use to fix it and put sleep commands on every other line to give things time to kick in. You can then set it to run during startup (By copying it to /etc/init.d and using rc-update add wireless default (I called my script wireless). Works great for me.

----------

## menschmeier

Hi jsfan,

If I configure /etc/conf.d/net like this I could not manage the wlan device - not even manually ...

The problem is that the routing table has now default entry using wpa_supplicant with dhcp.

 *Quote:*   

> # route
> 
> Kernel IP routing table
> 
> Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
> ...

 

So, back to wireless-tools ....   :Sad: 

menschmeier

----------

## bl00dseeker

I have also problems, i get this error messages:

```
localhost nobby # /etc/init.d/net.eth1 restart

 * Stopping eth1

 *   Bringing down eth1

 *     Shutting down eth1 ...                                             [ ok ]

 *     Stopping wpa_cli on eth1 ...                                       [ ok ]

 *     Stopping wpa_supplicant on eth1 ...                                [ ok ]

 * Starting eth1

 *   Wireless radio has been killed for interface eth1

 *   wpa_supplicant will launch, but not associate until

 *   wireles radio is re-enabled for interface eth1

 *   Starting wpa_supplicant on eth1 ...

ioctl[SIOCSIWMODE]: Resource temporarily unavailable

Could not configure driver to use managed mode

ioctl[SIOCGIWRANGE]: Resource temporarily unavailable

ioctl[SIOCSIWAUTH]: Resource temporarily unavailable

WEXT auth param 7 value 0x1 - ioctl[SIOCSIWENCODEEXT]: Resource temporarily unavailable

ioctl[SIOCSIWENCODEEXT]: Resource temporarily unavailable

ioctl[SIOCSIWENCODEEXT]: Resource temporarily unavailable

ioctl[SIOCSIWENCODEEXT]: Resource temporarily unavailable

ioctl[SIOCSIWAUTH]: Resource temporarily unavailable

WEXT auth param 4 value 0x0 - ioctl[SIOCSIWAUTH]: Resource temporarily unavailable                                                                               [ ok ]th param 5 value 0x1 - 

 *   Starting wpa_cli on eth1 ...                                         [ ok ]

 *     Backgrounding ...
```

/etc/wpa_supplicant/wpa_supplicant.conf

```
ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=wheel

fast_reauth=1

ap_scan=1

network={

        ssid="linksys2"

        proto=WPA

        key_mgmt=WPA-PSK

        pairwise=CCMP TKIP

        group=CCMP TKIP WEP104 WEP40

        psk="****"

        priority=2

}
```

```
/etc/conf.d/net

modules=( "dhcpcd" )

config_eth0=( "dhcp" )

dhcp_eth0="nontp nonis"

config_eth1=( "dhcp" )

modules=( "wpa_supplicant" )

wpa_supplicant_eth1="-Dwext"

wpa_timeout_eth1=60

dhcp_eth1="nontp nonis"

depend_eth1() {

        need ipw3945d

}
```

in universitiy a no encrypted wlan succeeded, so it must be the config i think

but at home it doestn want to  :Sad: 

In my Linksys Router i have selected:

Security Mode: WPA-PSK and i tried WPA2-PSK , too

WPA Algorithm: TKIP

(ddwrt firmware)

i hope someone can help me

----------

## deface

I have a 3945, and have not experienced anything similar; which makes me think it is a configuration issue.

Make sure your using

Kernel higher than 2.6.13+ 

net-wireless/ipw3945 ~x86

net-wireless/ipw3945-ucode ~x86

net-wireless/ipw3945d ~x86

http://gentoo-wiki.com/HARDWARE_ipw3945  and http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=4&chap=4

On a side note - Take a look at NetworkManager. I use it in both Gnome & XFCE.

----------

## bl00dseeker

Well i have it in a Acer Aspire 5652 and had it everything working under Ubuntu with NetworkManager, i will try it now.

And yes i have ~x86 stuff and kernel 2.6.20-r4 and worked the wikis several times.

I now tested unencrypted wlan, thats working but if i make "/etc/init.d/net.eth1 restart" the error message above is coming. Maybe some problem with the hardware  :Sad: ?

edit: i merged NetworkManager but how can i handle him in evilwm? without a panel icon.

edit2: i see that iwconfig gets short time connection but looses it immediatly and although wpa is on in iwconfig:

```
eth1 IEEE 802.11g ESSID:"linksys"

Mode:Managed Frequency: 2.452 GHz Acces Point: blubb

Retry Limit:15 RTS thr:off Fragment thr: off 

Encryption key:off

Power Management:off

Link Quality=99/100 Signal level = -41dBm NoiseLevel=-63dBm

Rx invalid nwid:0 Rx invalid crypt:1 Rx invalid frag:0
```

so maybe problems with encryption?? the password is correct checked it several times

----------

## Wulfrunner

After quadruple checking my kernel configuration (2.6.20) versus http://gentoo-wiki.com/HARDWARE_ipw3945 I found that the wireless encryption on my T60p was finally working. I recently tested the latest Ubuntu liveCD which autodetected everything flawlessly, and was impressed by NetworkManager. I just tried installing it under Gentoo (it's masked so maybe this isn't the best idea) and want to make sure that it becomes the main control for networking. 

What I don't understand is how ipw3945d, wireless-tools, wpa_supplicant, and NetworkManager figure out who's doing what (I have nothing in my /etc/conf.d/net file right now). What services should be added to boot/default? what should be removed? Do I still need /etc/init.d/net.eth0 and /etc.init.d/net.eth1 ? I use both wired and wireless access points depending on where I am.

----------

## bl00dseeker

can u post your kernel configuration so i can compare?

what i saw when i boot:

```

udev loading module ipw3945

udev loading module nvidia

ERROR: cannot run ipw3945d until sysinit completes

ipw3945d will be started in the boot runlevel

FATAL: Error running install command for ipw3945

Finalizing udev configuration

```

edit:

Found a solution for the main Problem  :Smile: 

you should follow the hint "So you should really (built as monolithic):"

 *Quote:*   

> 
> 
> Networking --->
> 
> <*>   Generic IEEE 802.11 Networking Stack 
> ...

 

now my wlan is going well, so i can fix the other problems

----------

## jsfan

 *menschmeier wrote:*   

> 
> 
> The problem is that the routing table has now default entry using wpa_supplicant with dhcp.
> 
> 

 

I don't get it. What do you want to do? You want the wireless in addition to the wired network and route

only packages to the wireless network itself to the wireless device? If so, why don't you just set that up in

your /etc/conf.d/net?

----------

## seventhguardian

 *menschmeier wrote:*   

> 
> 
> The problem is the config of the driver, wpa_supplicant says:
> 
>  *Quote:*   ## /etc/init.d/net.eth1 restart
> ...

 

You need to pass the -w parameter to wpa_client:

```
wpa_supplicant_eth1="-w -Dwext"
```

It tells it to wait for the interface to be available. Hope it helps  :Smile: 

----------

## rhoekstra

I suffer the same issues but it goes some further than this...

I am unable to unload the ipw3945 module. If at boot time the device does not initialize correctly, my only resolution is to reboot the system... is a bit weird I would say.

IF it initializes, it's connected to my WPA2 AES network (or WPA TKIP, whichever I configure).. but I should not try to stop the network connection or it won't come back up..

Does anyone have this same issue or know a solution to it? 

I am using kernel gentoo-sources 2.6.20-r6 currently, with net-wireless/ipw3945-1.2.0, net-wireless/ipw3945-ucode-1.14.2 and net-wireless/ipw3945d-1.7.22-r4.

----------

## Ant

 *menschmeier wrote:*   

> 
> 
> You need to pass the -w parameter to wpa_client:
> 
> ```
> ...

 

Works for me.

Specifically; in /etc/conf.d/net

----------

## funeagle

Thanks seventhguardian now my restart works.

----------

