# Wireless 3945 can't up interface

## DragonionS

Hi all! I know there are lots of such posts and topics on forums. Since reinstalling my Gentoo I can't get my Wi-fi working. Here is 

/etc/conf.d/net

```
dns_domain_lo="ds"

modules=( "wpa_supplicant" )

wpa_supplicant_wlan0="-Dwext"

wpa_timeout_wlan0=15
```

/etc/wpa_supplicant/wpa_supplicant.conf

```
ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=0

update_config=1

network={

        ssid="HomeLAN"

        psk="***********"

        proto=RSN

        key_mgmt=WPA-PSK

        pairwise=TKIP

        group=TKIP WEP104 WEP40

        auth_alg=OPEN

}
```

zcat /proc/config.gz | grep KILL

```
CONFIG_RFKILL=m

CONFIG_RFKILL_LEDS=y

CONFIG_RFKILL_INPUT=y

# CONFIG_TOSHIBA_BT_RFKILL is not set
```

zcat /proc/config.gz | grep 802

```
# CONFIG_VLAN_8021Q is not set

# CONFIG_IEEE802154 is not set

CONFIG_CFG80211=m

# CONFIG_NL80211_TESTMODE is not set

# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set

# CONFIG_CFG80211_REG_DEBUG is not set

# CONFIG_CFG80211_DEFAULT_PS is not set

# CONFIG_CFG80211_DEBUGFS is not set

# CONFIG_CFG80211_INTERNAL_REGDB is not set

CONFIG_CFG80211_WEXT=y

CONFIG_LIB80211=m

# CONFIG_LIB80211_DEBUG is not set

CONFIG_MAC80211=m

CONFIG_MAC80211_HAS_RC=y

CONFIG_MAC80211_RC_MINSTREL=y

# CONFIG_MAC80211_RC_DEFAULT_PID is not set

CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y

CONFIG_MAC80211_RC_DEFAULT="minstrel"

# CONFIG_MAC80211_MESH is not set

CONFIG_MAC80211_LEDS=y

# CONFIG_MAC80211_DEBUGFS is not set

# CONFIG_MAC80211_DEBUG_MENU is not set

# CONFIG_MAC80211_HWSIM is not set

# CONFIG_LEDS_BD2802 is not set

# CONFIG_RTC_DRV_RX8025 is not set

# CONFIG_RTC_DRV_BQ4802 is not set
```

zcat /proc/config.gz | grep IWL

```
CONFIG_IWLWIFI=m

CONFIG_IWLWIFI_DEBUG=y

CONFIG_IWLWIFI_DEVICE_TRACING=y

# CONFIG_IWLAGN is not set

CONFIG_IWL3945=m
```

I've reloaded iwl3945, restarted wpa_supplicant and tried to start net.wlan0. Here is dmesg

 *Quote:*   

> [ 4159.264364] iwl3945: Intel(R) PRO/Wireless 3945ABG/BG Network Connection driver for Linux, in-tree:ds
> 
> [ 4159.264371] iwl3945: Copyright(c) 2003-2010 Intel Corporation
> 
> [ 4159.264475] iwl3945 0000:04:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17
> ...

 

/etc/init.d/net.wlan0 start

 *Quote:*   

>  * Bringing up interface wlan0
> 
>  *   Configuring wireless network for wlan0
> 
>  *   Scanning for access points
> ...

 

What could I do wrong?

----------

## d2_racing

Hi, can you post this :

```

# ifconfig -a

# iwconfig

# iwlist scan

# dmesg | tail

```

----------

## idella4

The proliferation of posts is not just here in gentoo.

I had a similar trouble when tinkering in centos. I posted and got a very good reply from a centos guru.

You say you re-started wpa_supplicant, but I bet you didn't do it how this instructs.

```

Here is how I test wireless for WPA2. 

Say my network is called scott and my password is toracat. (It's late, I don't feel creative) :)

(This part can be done as normal user)

wpa_passwd scott toracat > wpa.conf

This creates a file called wpa.conf that will look like 

network={

        ssid="scott"

        #psk="toracat"

        psk=69e49214ef4e7e23d0ece077c2faf3c73f7522ad52a26b33527fa78d9033ff35

}

Now, as I'm lazy, and my router came with wireless network hidden by default, I also have to insert a line telling it to scan. So, now it will look like. 

network={

        scan_ssid=1

        ssid="scott"

        #psk="toracat"

        psk=69e49214ef4e7e23d0ece077c2faf3c73f7522ad52a26b33527fa78d9033ff35

}

Ok, now I bring up the wireless card. It might be up, but this won't affect anything.

The rest of this has to be done as root or with root privilege. 

ifconfig wlan0 up

Now I test it

iwlist wlan0 scan

Hopefully, I see a list of networks. 

Now, I run wpa_supplicant to see if it will connect

I'm still in the directory containing that wpa.conf file

wpa_supplicant -Dwext -iwlan0 -cwpa.conf

With luck it connects. Then I run

dhclient wlan0

have an address and all is good. 

If that all works, now I do

cp wpa.conf /etc/wpa_supplicant/wpa_supplicant.conf

```

Now, wpa_passwd must be centos specific.  Edit the network={    to /etc/wpa_supplicant/wpa_supplicant.conf directly.   

wpa_supplicant -Dwext -iwlan0 -cwpa.conf

becomes

wpa_supplicant -Dwext -iwlan0 -cetc/wpa_supplicant/wpa_supplicant.conf

and that is your key line.  Now, in my gentoo, it tends to output a few lines and hang.  It doesn't stop it from working though.  Just bring up a new tab in bash and enter your dhclient wlan0.

As a bonus pack, take centos link1, author fedora link2, the gentoo guide and the lot at centos forum

----------

## DragonionS

I've found that everything works. But works strange. I was waiting for connection immediately after login to my system. But connection can't be established for 1-5 minutes (wicd gives "Bad password" for 10 and more time). But then in some minutes the connection is established and I can successfully reconnect. What config should I give to figure out what is happening?   :Idea: 

P.S. No changes were made to kernel or wicd/wpa_supplicant.   :Shocked: 

----------

## Matteo Azzali

Are you using 2.6.35 kernel? I found it really buggy for iwl3945 driver

and forced myself to use 2.6.34 version. It's a real pity but it happens often

(last time was kernel 2.6.29 and the option "enable powersave by default" for

the wireless cfg80211, removing that option reverted anything to normal).

----------

