# wpa_supplicant and Intel 3945ABG [SOLVED]

## kly84g

I'm having a wireless problem.  When I first got my laptop, I spent quite a while getting my wireless networking operational, and after quite a few hours of research and experiment, I managed to get it operational: but only for unsecured networks.

About two weeks ago I made another attempt to get WPA encryption working, and by making a few minor changes in /etc/conf.d/net and /etc/wpa_supplicant/wpa_supplicant.conf I managed to get it to connect to a WPA network. But I had to add the network using the wpa_supplicant client GUI every time I connected, and the connection was dropped after about five minutes.

So a few days ago I tried to improve things by making some changes to the configuration files (foolishly not keeping a backup of the old files), and now wpa_supplicant does not work at all.  The wireless networking is disabled when I boot, but if I enable it with kwifimanager it works fine for unsecured connections. The wpa_gui says "Could not get status from wpa_supplicant".

My wireless card is Intel 3945abg

Any suggestions for fixing this problem would be appreciated.

uname -a:

```
Linux m2 2.6.24-tuxonice-r9 #5 SMP Fri Aug 29 16:26:43 CDT 2008 x86_64 Intel(R) Core(TM)2 CPU T7200 @ 2.00GHz GenuineIntel GNU/Linux
```

lspci:

```

0c:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG Network Connection (rev 02)

```

iwconfig:

```
lo        no wireless extensions.

eth0      no wireless extensions.

sit0      no wireless extensions.

wmaster0  no wireless extensions.

wlan0     IEEE 802.11g  ESSID:""

          Mode:Managed  Frequency:2.412 GHz  Access Point: Not-Associated

          Tx-Power=off

          Retry min limit:7   RTS thr:off   Fragment thr=2346 B

          Encryption key:off

          Link Quality:0  Signal level:0  Noise level:0

          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0

          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

```

/etc/conf.d/net:

```
plug_timeout=( "10" )

config_eth0=( "dhcp" )

dhcpcd_eth0="-t 10"

dhcp_eth0="release dns nontp nonis gateway nosendhost"

fallback_eth0=( "172.17.0.177" )

fallback_route_eth0=( "default via 172.17.0.1" )

wpa_supplicant_wlan0="-Dwext"

ap_scan=1

config_wlan0=( "dhcp" )

essid_wlan0="any"

mode_wlan0="managed"

#dhcp_wlan0=( "nontp" )

dhcp_wlan0=( "release dns nontp nonis gateway nosendhost" )

preup() {

 if [[ ${IFACE} = "wlan0" ]]; then

  sleep 3

 fi

 return 0

}

```

/etc/wpa_supplicant/wpa_supplicant.conf

```
ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=0

update_config=1

network={

        ssid="lrd1"

        scan_ssid=1

        key_mgmt=WPA-PSK

        psk="7322 san ramon"

        priority=5

}

# This is a network block that connects to any unsecured access point.

# We give it a low priority so any defined blocks are preferred.

network={

        key_mgmt=NONE

        priority=-9999999

        scan_ssid=1

}

```

Solution:

I discovered, almost accidentally, that wicd, which I'm using for managing the wireless connection, has its own configuration files, which apparently override the wpa_supplicant  settings (though wicd uses wpa_supplicant).  I found everything worked as it was supposed to when I used the advanced settings in wicd to change the settings. One problem is that the wicd advanced setting button is not normally visible in the Wicd Manager, but is brought up by clicking on a tiny triangle next to the ESSID name.Last edited by kly84g on Sat May 30, 2009 2:52 am; edited 1 time in total

----------

## d2_racing

Hi, can you post this :

```

# ifconfig -a

# iwconfig

# lsmod

# ifconfig wlan0 up

# iwlist scan

```

Also, can you try this file instead :

```

plug_timeout=( "10" ) 

config_eth0=( "dhcp" ) 

dhcpcd_eth0="-t 10" 

dhcp_eth0="release dns nontp nonis gateway nosendhost" 

fallback_eth0=( "172.17.0.177" ) 

fallback_route_eth0=( "default via 172.17.0.1" ) 

#WPA_SUPPLICANT

modules=( "wpa_supplicant" )

wpa_supplicant_wlan0="-Dwext"

config_wlan0=( "dhcp" )

```

And for your /etc/wpa_supplicant/wpa_supplicant.conf

```

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=wheel

ap_scan=0

#update_config=1

network={

   ssid="lrd1"

   psk="7322 san ramon"

   proto=WPA

   key_mgmt=WPA-PSK

   pairwise=CCMP TKIP

   group=CCMP TKIP

   priority=5

}

```

Are you using WPA with TKIP or WPA2 ?

----------

## Kwastie

I would recommend you to use NetworkManger instead. wpa_supplicant/wpa_gui gave me a head-egg.

And since I'm using NetworkManager, wireless works prefect. 

I've installed NetworkManger using this guide, good luck!

----------

## kly84g

Thanks for the reply.  I have put the revised files you recommended in place, and it appears to work.  I won't be able to check until I get home this evening, but I can see multiple wireless networks now: I couldn't before.  The unsecured one I can connect to; there are three WPA2 networks, but I don't have authorization for any of them.  Also, my wpa_gui works properly now.

I don't understand what I had wrong. The modules=( "wpa_supplicant" ) missing perhaps?

My home network, which is the one I really want to connect to, is WPA with TKIP.  I'll check how it works this evening.

----------

## kly84g

Kwastle,

Thank you for the suggestion.  I'll keep it in mind.  But networkmanager is blocked for my system, and in any case I prefer KDE to Gnome, so I need to look at knetworkmanager: it requires the ~amd64 keyword, and I suspect it also requires going to KDE4.  I have KDE4 on my home computer, and it isn't quite ready for daily use yet (or maybe I'm not quite ready for it).  I'm also suspicious of packages requiring ~amd64.

Currently I use wicd, supplemented by wpa_gui if necessary, and now it seems to be working I'll stick to it until I'm ready to upgrade to KDE4.  Then I'll see about using knetworkmanager.

----------

## kly84g

Well, it works -- for about ten to fifteen minutes.  Then connects again for no apparent reason, five minutes later.

----------

## d2_racing

What happen when you run this :

```

# iwlist scan

```

----------

## Evincar

I think we are missing an important point:

Are you using IPW3945 (with the mandatory binary daemon), or IWL3945?

If it's the former, I don't remember a lot of it. If it is the later, I suggest you to upgrade all the way to 2.6.28.

----------

## d2_racing

Can you post this :

```

# lsmod

# equery list iwl

# equery list ipw

```

----------

## kly84g

Well, I've upgraded my kernel to 2.6.29-tuxonice-r2, and things are pretty much where they were when I started (before I messed things up by trying to fix it): when I boot up, I connect automatically to my wireless router.  Then about ten minutes later it disconnects, and if I try to reconnect I get the error message "This network require encryption to be enabled".

The outputs requested by d2_racing:

lsmod:

```
Module                  Size  Used by

b44                    26440  0

ssb                    29564  1 b44

```

equery list iwl

```
 * installed packages

net-wireless/iwl3945-ucode-2.14.1.5

```

equery list ipw

```
     
```

On the bright side, I've managed to get hibernation working properly with the new kernel, and I can now turn the wireless card on and off from the keyboard.

----------

## d2_racing

Hi, can you post this :

```

# cd /usr/src/linux

# cat .config | grep -i 802

# cat .config | grep -i iwl

```

----------

