# Problems getting ipw3945 wireless card to work. [solved]

## ianw1974

I've searched here, but not found anything that's helped me so far.

I'm trying to get the wireless working with wpa_supplicant, and it doesn't seem to want to connect.  This is what I've got config wise:

```
esprit linux # cat /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 :]!).

config_eth0=( "172.27.27.140/24" )

routes_eth0=( "default gw 172.27.27.254" )

preferred_aps=( "WLAN" )

modules=( "wpa_supplicant" )

wpa_supplicant_eth1="-Dwext -c /etc/wpa_supplicant/wpa_supplicant.conf"

config_eth1=( "dhcpcd" )

depend_eth1() {

        need ipw3945d

}
```

wpa_supplicant config:

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

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

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=wheel

ap_scan=1

network={

        ssid="WLAN"

        psk="mypassword"

        priority=5

}
```

and this is what is displayed in /var/log/messages:

```
Oct  6 20:40:15 esprit ipw3945: Intel(R) PRO/Wireless 3945 Network Connection driver for Linux, 1.2.0dmpr

Oct  6 20:40:15 esprit ipw3945: Copyright(c) 2003-2006 Intel Corporation

Oct  6 20:40:15 esprit ACPI: PCI Interrupt 0000:10:00.0[A] -> GSI 17 (level, low) -> IRQ 17

Oct  6 20:40:15 esprit PCI: Setting latency timer of device 0000:10:00.0 to 64

Oct  6 20:40:15 esprit ipw3945: Detected Intel PRO/Wireless 3945ABG Network Connection

Oct  6 20:40:17 esprit ipw3945: Detected geography ABG (13 802.11bg channels, 23 802.11a channels)

Oct  6 20:40:17 esprit ADDRCONF(NETDEV_UP): eth1: link is not ready
```

ifconfig:

```
eth1      Link encap:Ethernet  HWaddr 00:1B:77:BC:68:97  

          UP BROADCAST MULTICAST  MTU:1500  Metric:1

          RX packets:0 errors:0 dropped:39 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

          Interrupt:17 Base address:0xa000 Memory:e4100000-e4100fff
```

and this is what happens when I try to restart the interface:

```
esprit linux # /etc/init.d/net.eth1 start

 * 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 ...
```

I believe I'm getting there, but I can't figure out why it won't get a DHCP address, and why it's failing to connect each time when I'm pretty sure that it's all configured properly.  Any ideas on what I can do to get it working properly?Last edited by ianw1974 on Tue Nov 06, 2007 1:23 pm; edited 1 time in total

----------

## Abraxas

A lot of people have been reporting issues connecting to APs with intel cards when the ESSID is hidden.  If it is hidden, try changing it in your router.  I would also suggest trying the iwlwifi driver.  It works a lot better for me.

----------

## ianw1974

I've also tried the iwlwifi recently.  My ap was hidden, but now it's not.  I also even turned WPA off and I still couldn't connect to it.

I've tried Network Manager as well, and disabled all the config in /etc/conf.d/net and everything.  The common thing I'm getting between both modules, be it ipw3945 or iwl3945 is:

```
link is not ready
```

So I'm kind of thinking that there is something wrong that is causing the problems with the link not being recognised as ready, even though it is.  I was having more luck with Network Manager in the sense it was doing more, but still cannot associate with either secured or unsecured access points.

----------

## Abraxas

 *ianw1974 wrote:*   

> I've also tried the iwlwifi recently.  My ap was hidden, but now it's not.  I also even turned WPA off and I still couldn't connect to it.
> 
> I've tried Network Manager as well, and disabled all the config in /etc/conf.d/net and everything.  The common thing I'm getting between both modules, be it ipw3945 or iwl3945 is:
> 
> ```
> ...

 

Hmm.  Maybe you need to increase your dhcp timeout in /etc/conf.d/net.

----------

## ianw1974

I had similar before, but it didn't seem to work.  Will try it again later tonight, and see if it helps and will post back and let you know.  Although, it tries for about 30 seconds by default anyhow and nothing happens.

----------

## Archimedesmp

Hi, I use the iwlwifi-drivers as I recently updated my kernel to 2.6.23, but before that I used ipw3945.

I'm running a WPA-Secured AP in my flat, so I just post my config as an example.

Remember to change wlan0 to eth1 or whatever your wireless is called.

```

network={

        disabled=0

        ssid="app203"

        mode=0

        key_mgmt=WPA-PSK

        pairwise=TKIP

        group=TKIP

        psk="myfakedsecretpassword"

        priority=11

}
```

To find out which pairwise, group, etc. you have to set run those commands (I need the first one because by default my wireless seems to be turned off)

```
# ifconfig wlan0 up

# iwlist wlan0 scanning

wlan0     Scan completed :

          Cell 01 - Address: 00:04:E2:C3:82:ED

                    ESSID:"app203"

                    Mode:Master

                    Channel:8

                    Frequency:2.447 GHz (Channel 8)

                    Quality=92/100  Signal level=-38 dBm  Noise level=-127 dBm

                    Encryption key:on

                    IE: WPA Version 1

                        Group Cipher : TKIP

                        Pairwise Ciphers (1) : TKIP

                        Authentication Suites (1) : PSK

                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s

                              12 Mb/s; 24 Mb/s; 36 Mb/s; 9 Mb/s; 18 Mb/s

                              48 Mb/s; 54 Mb/s

                    Extra:tsf=00000125cd73c050
```

Fire up wpa_supplicant as root:

```
# wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf

ioctl[SIOCSIWAUTH]: Operation not supported

WEXT auth param 4 value 0x0 - ioctl[SIOCSIWAUTH]: Operation not supported

WEXT auth param 5 value 0x1 - Trying to associate with 00:04:e2:c3:82:ed (SSID='app203' freq=2447 MHz)

ioctl[SIOCSIWAUTH]: Operation not supported

WEXT auth param 5 value 0x1 - Associated with 00:04:e2:c3:82:ed

WPA: Key negotiation completed with 00:04:e2:c3:82:ed [PTK=TKIP GTK=TKIP]

CTRL-EVENT-CONNECTED - Connection to 00:04:e2:c3:82:ed completed (auth) [id=1 id_str=]
```

If this works all you have to do is run dhcpcd wlan0 (of manually setup your ip with ifconfig).

archi

//edit:

oh, well: If it doesn't work the manual way it shouldn't be a wpa_supplicant problem...

Maybe you have a switch to enable/disable the wireless?

What's that:

 *ianw1974 wrote:*   

> 
> 
> ```
>  *   wpa_supplicant will launch, but not associate until
> 
> ...

 

----------

## ianw1974

OK, will try your config later.  This is what I had configured before:

/etc/conf.d/net

```
#modules=( "wpa_supplicant" )

#wpa_supplicant_wlan0_rename="-Dwext"

#config_wlan0_rename=( "10.1.1.7/24" )

#routes_wlan0_rename=( "default gw 10.1.1.1" )
```

as my device with iwlwifi is wlan0_rename and I have to use this, and not eth1.

/etc/wpa_supplicant/wpa_supplicant.conf:

```
ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=wheel

ap_scan=1

update_config=0

fast_reauth=1

eapol_version=1

network={

        ssid="WLAN"

       scan_ssid=1

        key_mgmt=WPA-PSK

        pairwise=TKIP

        group=TKIP

        psk="mypassword"

       priority=5
```

I have since altered it and migrated the config to yours in readiness to test tonight when I get home.  But this is what I had previously which didn't seem to work.  My /etc/conf.d/net file I also tried with static IP addresses as well but didn't work, as well as trying dhcpcd after starting the interface.  Although didn't try manually like you mentioned in your post, so will do that tonight also before I try and get it to work automatically.

The error you mentioned about the wpa_supplicant not associating was because I needed to add an "-w" parameter to wpa_supplicant.  When I added this, it was OK and I didn't get this error.  However, this was with the ipw3945 driver, and not with iwlwifi which I'm using now.  Maybe it's better, since you are using the same and might make things easier  :Smile: 

----------

## ianw1974

OK, I've tried what you said manually, and this is what I get:

```
esprit wpa_supplicant # ifconfig wlan0_rename up

esprit wpa_supplicant # iwlist wlan0_rename scan

wlan0_rename  Scan completed :

          Cell 01 - Address: 00:0F:B5:99:39:07

                    ESSID:"WLAN"

                    Mode:Master

                    Channel:11

                    Frequency:2.462 GHz

                    Quality=94/100  Signal level=-35 dBm  Noise level=-127 dBm

                    Encryption key:on

                    IE: WPA Version 1

                        Group Cipher : TKIP

                        Pairwise Ciphers (2) : CCMP TKIP

                        Authentication Suites (1) : PSK

                    IE: IEEE 802.11i/WPA2 Version 1

                        Group Cipher : TKIP

                        Pairwise Ciphers (2) : CCMP TKIP

                        Authentication Suites (1) : PSK

                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s

                              24 Mb/s; 36 Mb/s; 54 Mb/s; 6 Mb/s; 9 Mb/s

                              12 Mb/s; 48 Mb/s

                    Extra:tsf=00000017a5c79033

esprit wpa_supplicant # wpa_supplicant -Dwext -iwlan0_rename -c/etc/wpa_supplicant/wpa_supplicant.conf

ioctl[SIOCSIWAUTH]: Operation not supported

WEXT auth param 4 value 0x0 - ioctl[SIOCSIWAUTH]: Operation not supported

WEXT auth param 5 value 0x1 - Trying to associate with 00:0f:b5:99:39:07 (SSID='WLAN' freq=2462 MHz)

ioctl[SIOCSIWAUTH]: Operation not supported

WEXT auth param 5 value 0x1 - Authentication with 00:00:00:00:00:00 timed out.

ioctl[SIOCGIWSCAN]: Resource temporarily unavailable

Trying to associate with 00:0f:b5:99:39:07 (SSID='WLAN' freq=2462 MHz)

ioctl[SIOCSIWAUTH]: Operation not supported

WEXT auth param 5 value 0x1 - Authentication with 00:00:00:00:00:00 timed out.

ioctl[SIOCGIWSCAN]: Resource temporarily unavailable
```

so it seems there's something wrong because of the "resource temporarily unavailable when wpa_supplicant is running.  And this is what iwconfig shows:

```
esprit wpa_supplicant # iwconfig wlan0_rename

wlan0_rename  IEEE 802.11g  ESSID:"WLAN"  

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

          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
```

so I'm at a loss as to why this won't work regardless of ipw3945 or iwl3945.  Any ideas?

----------

## mdeininger

is the daemon for the card running? ipw-something-d... i know you added it as 'need' to the init script, but it hadn't appeared to be called in the output you posted with /etc/init.d/net.eth1 start, thus i'm asking.

also, yeah there's usually hardware and software killswitches for wlan interfaces, so you could check the contents of /sys/class/net/<interfacename>/device/rf_kill . it should be '0'.

----------

## Archimedesmp

Sorry, I don't know how you can fix that.

If you can locate the problem you could post a bug report on the packets bug tracker (or ask for help on their mailing list or forum)

I don't have a better idea right now  :Sad: 

archi

//edit:

Arg, didn't submit because of an IM Session ^^

You should try what mdeininger suggests  :Wink: 

----------

## ianw1974

I'm not using the ipw3945 driver anymore, so no ipw3945d daemon exists with the iwlwifi interface.  Previously when using this, yes the daemon was running, but I was getting the same results.

I'm wondering whether I should try ndiswrapper with this card instead it will work, although I'd rather use the native driver, so will see if I can get it to work somehow, but not sure why it's not working correctly.

I remember on a previous laptop I had that wireless worked well with the ipw3945 in Mandriva 2007.0, and yet in Debian Etch or Fedora 6 it wouldn't work.  I got it working only once, and every time after that it would fail.  So it's either me, or the ipw3945 or iwl3945 isn't that stable at present in other distros I've tried.

I'll keep plugging, and open to suggestions on how I can get it to work.  I think the only way forward will be a bug report or something since what I've tried just doesn't work.

----------

## mdeininger

well, there's still the killswitch thing, you could try to cat '0' into that file... might help  :Wink: .

----------

## ianw1974

Good thought, I must have been reading too quick earlier and missed that.  Will give it a go  :Smile: 

----------

## ianw1974

I just checked it, and the result is 0 for the contents of rf_kill, so it seems that is how it should be.

----------

## mdeininger

 *ianw1974 wrote:*   

> I just checked it, and the result is 0 for the contents of rf_kill, so it seems that is how it should be.

 dang :-/

well, it definitely was worth a try... sorry :/

----------

## ianw1974

It's frustrating to say the least!!!

----------

## ianw1974

Well, I got it working in the end  :Smile:  using the ideas above.  Nice and simple it seems although no idea why it started working.

----------

