# wireless in thinkpad x60: SIOCSIWMODE unavailable

## Hanoc

Hi,

I have a problem with my wireless card that i can not identify.

I have a Thinkpad x60 with Intel PRO/Wireless 3945ABG miniPCI express adapter card in it.

I'm running  gentoo with a 2.6.18 kernel and I'm trying to run my wireless card with ipw3945 driver and wpa_suplicant.

Everything was working fine some days ago... but one day my sistem rebooted during an emerge -uD world. After that reboot whenever my system started it hanged during bootup. I choosed interactive bootup mode and I discovered that ipw3945 was causing the hang during startup. I left it out and the system "worked". I managed to end the upgrade and now my systems boots without hanging but I get this whenever I try to start my wireless card.

I don't know if ipw3945 was updated but I think it did not.

I can't assure that I haven't messed anything more... because I've been trying to solve the problem (without any luck).

I don't know where to start looking neither in the internet nor in my system logs (I could really use some directions about logs and wireless networks)

```

$ /etc/init.d/net.eth2 start

 Starting eth2

 *   Wireless radio has been killed for interface eth2

 *   wpa_supplicant will launch, but not associate until

 *   wireles radio is re-enabled for interface eth2

 *   Starting wpa_supplicant on eth2 ...

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 eth2 ...                                         [ ok ]

 *     Backgrounding ...

 * WARNING:  netmount is scheduled to start when net.eth2 has started.

```

I also get this output in dmesg

```

$dmesg 

ipw3945: Detected geography ABG (13 802.11bg channels, 23 802.11a channels)

ADDRCONF(NETDEV_UP): eth2: link is not ready

ADDRCONF(NETDEV_UP): eth2: link is not ready

ipw3945: Detected geography ABG (13 802.11bg channels, 23 802.11a channels)

```

If I try to connect by other means like:

```

$ iwlist eth2 scan

$ iwconfig eth2 essid "UNENCRYPTED_NET"

eth2      unassociated  ESSID:"UNENCRYPTED_NET"

          Mode:Managed  Frequency=nan kHz  Access Point: Not-Associated

          Bit Rate:0 kb/s   Tx-Power:16 dBm

          Retry limit:15   RTS thr:off   Fragment thr:off

          Encryption key:off

          Power Management: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:130   Missed beacon:0

```

And i don't get anything more.

I'm pretty sure that I have the ipw3945-1.1.3 version of the driver. 

I've googled a lot in search for the answer... but I think I'm not searching the right stuff... I can't see what the problem is about. I could really use some hints for what to start looking for.

Any help or hint would be greatly apreciated.

Thanks in advance,

Hanoc.

----------

## Sir Alaran

I'm having the same problem on a Toshiba Satellite M105. I'll let you know if I'm able to solve it.

----------

## Hanoc

What triggred your error?

an update?

maybe a downgrade could fix it (I'll give it a try as soon as I get acces to a wired network with my laptop).

I'll post here if any of us find an error and notify you.

Thanks! now at least 2 people are woking on it :) (but we could use some help still :P)

----------

## Hanoc

I really messed things up... and i don't know how I did it.

As I said I would do I tried to downgrade the driver to 1.1.2.

After downgrading iwconfing shows 

```
eth0      no wireless extensions.

lo        no wireless extensions.

eth1      no wireless extensions.

sit0      no wireless extensions.

```

No sign of eth2 that was the device my wireless card had associated until now.

Also the led of the wireless card doesn't blink at all. Prior to the downgrade it blinked although I wasn't able to connect.

I re-upgraded the driver to 1.1.3 but it isn't working anymore. I can't get to see eth2.

acording to lspci I still have the wireless card:

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

I'm totally lost here.

----------

## jasn

If you're running the 1.7.22-r4 version of the ipw3945d daemon, make sure you set permissions correctly on your /var/run/ipw3945d directory, as well as you edit your /etc/conf.d/ipw3945d configuration file as Fran described in the following thread;

https://forums.gentoo.org/viewtopic-t-526447.html

----------

## Hanoc

the story so far...

I managed to get everything back to the state I had in the first step by following advices from this thread:

https://forums.gentoo.org/viewtopic-p-3802357.html#3802357

and following the advice from the thread pointed out by jasn did not help (but make me feel that I'm not alone  :Razz: )

anyway I'm stuck exactly where I was in the first time.

It could be worst... I can't connect but I least iwconfig returns something credible.

----------

## Hanoc

I've updated both the kernel and the driver without luck. I still get the ioctl[SIOCSIWMODE]: Resource temporarily unavailable error. wpa_supplicant does not start correctly and iwconfig does not associate with open neither closed networks.

My current setup is:

2.6.19-gentoo-r3 kernel with ieee80211 built in:

with the latest versions of ipw3945 driver and daemon instaled:

ipw3945-1.1.3-r2 and ipw3945d-1.7.22-r4.

The errors I get are:

1) if I restart net.eth2 I get the ioctl[SIOCSIWMODE]: Resource temporarily unavailable error.

```
 * Starting eth2

 *   Wireless radio has been killed for interface eth2

 *   wpa_supplicant will launch, but not associate until

 *   wireles radio is re-enabled for interface eth2

 *   Starting wpa_supplicant on eth2 ...

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 eth2 ...                                                                         [ ok ]

 *     Backgrounding ...

```

2) Nothing complains if I start wpa_supplicant although wpa_cli says 

```
Could not connect to wpa_supplicant - re-trying
```

3) If i do iwlist scan it returns real results but if I try to connect to an unencripted wireless network with iwconfig it says 

eth2      unassociated  ESSID:off/any 

forever while the  Invalid misc counter increases.

if I look to dmesg seems that something is happening:

```
# dmesg | grep ipw

ipw3945: Intel(R) PRO/Wireless 3945 Network Connection driver for Linux, 1.1.3dmpr

ipw3945: Copyright(c) 2003-2006 Intel Corporation

ipw3945: Detected Intel PRO/Wireless 3945ABG Network Connection

ipw3945: Detected geography ABG (13 802.11bg channels, 23 802.11a channels)

ipw3945: Error sending SCAN_ABORT_CMD: time out after 500ms.

ipw3945: Detected geography ABG (13 802.11bg channels, 23 802.11a channels)

ipw3945: Error sending SCAN_ABORT_CMD: time out after 500ms.

ipw3945: Detected geography ABG (13 802.11bg channels, 23 802.11a channels)
```

I'm in a dead end... any help would be very apretiated...

If someone knows about anywhere where I can ask for help I would be glad to keep searching for it.

EDIT: I try to keep a website updated with useful data about my computer... like lsmod, lspci output and kernel configuration in http://telmun.net/strelka.htm take a look if you feel so.

----------

## beatryder

I have a solution for this that works, but I am not on my computer at the moment. Thus I am replying so that I can easily find this post again.

I don't recall the exact code I used for it but this is what I can tell you off the top of my head:

1) I am using all ~x86 packages for ipw3945 (not including hard masked packages)

2) I am using 2.6.19 kernel with in kernel ieee80211 (although it worked just fine with ieee80211 from portage and 2.6.1 :Cool: 

3) I used /etc/conf.d/net and the preup function to echo 0 to the rf_kill file, I also added "sleep 2" after the echo command to give the card some time to initialize. I found the 1 second was too short on my system, but mostly that it works and I don't want it broken.

I hope that helps, when I have a chance I can post my actual configs for you.

----------

## Hanoc

Great!

I don't know exactly where to echo the "0" or where to put the sleep. I can locate the files... but the code in them is a little criptic for me...

I would be very happy if you can post the files for me...

seems like there's light at the end of the tunel! at last!

thanks!

----------

## beatryder

Sure, I hope it helps you.

```
...

preup(){

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

                echo 0 > /sys/devices/pci0000:00/0000:00:1c.1/0000:0c:00.0/rf_kill

                sleep 3

                #echo 0 > /sys/class/net/*/device/rf_kill

        fi

        return 0;

}
```

----------

## Hanoc

Thanks for your script beatryder. 

It solved my SIOCSIWMODE with your code... and now when I start my wireless device (eth2 in my case) I don't get any errors...

anyway... don't know why I can't connect to any connexion... opened or encripted neither I can start wpa_supplicant.

It does not output any error during startup but it does not get started.

```

root@strelka:/home/hanoc# wpa_supplicant -Dwext -ieth2 -c/etc/wpa_supplicant/wpa_supplicant.conf -Bw 

root@strelka:/home/hanoc# wpa_cli 

wpa_cli v0.5.6

Copyright (c) 2004-2006, Jouni Malinen <jkmaline@cc.hut.fi> and contributors

This program is free software. You can distribute it and/or modify it

under the terms of the GNU General Public License version 2.

Alternatively, this software may be distributed under the terms of the

BSD license. See README and COPYING for more details.

Could not connect to wpa_supplicant - re-trying
```

And it simply get's stuck here.

I don't have any luck without using wpa_supplicant either...

```

root@strelka:/home/hanoc# iwlist eth2 scan

eth2      Scan completed :

          Cell 01 - Address: 00:0F:3D:A7:D7:50

                    ESSID:"orbita"

                    Protocol:IEEE 802.11bg

                    Mode:Master

                    Channel:6

                    Encryption key:off

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

                              11 Mb/s; 12 Mb/s; 18 Mb/s; 22 Mb/s; 24 Mb/s

                              36 Mb/s; 48 Mb/s; 54 Mb/s

                    Quality=90/100  Signal level=-41 dBm  Noise level=-41 dBm

                    Extra: Last beacon: 210ms ago

root@strelka:/home/hanoc# iwconfig eth2 essid 'orbita'

root@strelka:/home/hanoc# iwconfig 

eth0      no wireless extensions.

lo        no wireless extensions.

eth1      no wireless extensions.

eth2      unassociated  ESSID:"orbita"  

          Mode:Managed  Frequency=nan kHz  Access Point: Not-Associated   

          Bit Rate:0 kb/s   Tx-Power:16 dBm   

          Retry limit:15   RTS thr:off   Fragment thr:off

          Encryption key:off

          Power Management: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:101   Missed beacon:0
```

I think the original problem for the thread is solved... but I'm not editing the title yet to append the [solved] word... until I discover if both problems are related.

I'll start asking in other directions than the driver... 

Thanks all of you that helped... I'm very grateful and I'll keep trying to get this to work.

----------

## beatryder

post your wpa_supplicant.conf please. Also your conf.d/net

----------

## Hanoc

Gladly!

/etc/conf.d/net

```
modules=( "wpa_supplicant" )

wpa_supplicant_eth2="-Dwext"

config_eth0=( "dhcp" )

dhcp_eth0=""

config_eth2=( "dhcp" )

dhcp_eth2="nontp nonis"

preup(){

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

  echo 0 > /sys/devices/pci0000:00/0000:00:1c.1/0000:03:00.0/rf_kill

                sleep 3

                #echo 0 > /sys/class/net/*/device/rf_kill

        fi

        return 0;

}

```

/etc/wpa_supplicant/wpa_supplicant.conf

```
ctrl_interface=/var/run/wpa_suplicant

ctrl_interface_group=wheel

update_config=0

fast_reauth=1

network={

  ssid="orbita"        

  key_mgmt=NONE

}

```

----------

## beatryder

/etc/wpa_supplicant/wpa_supplicant.conf

```
ctrl_interface=/var/run/wpa_suplicant

ctrl_interface_group=0

#update_config=0

#fast_reauth=1

network={

#  ssid="orbita"        

  key_mgmt=NONE

}

```

That should work, and allow you to connect to *any* unencrypted AP.

Good luck

----------

## Hanoc

almost!

```
root@strelka:/home/hanoc# iwconfig 

eth0      no wireless extensions.

lo        no wireless extensions.

eth1      no wireless extensions.

eth2      IEEE 802.11g  ESSID:"orbita"  

          Mode:Managed  Frequency:2.437 GHz  Access Point: 00:0F:3D:A7:D7:50   

          Bit Rate:54 Mb/s   Tx-Power:15 dBm   

          Retry limit:15   RTS thr:off   Fragment thr:off

          Encryption key:off

          Power Management:off

          Link Quality=96/100  Signal level=-31 dBm  Noise level=-32 dBm

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

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

```

note the invalid misc

dmesg outputs something interesting:

```

ipw3945: Error sending LEDS_CMD: time out after 500ms.

ipw3945: Detected geography ABG (13 802.11bg channels, 23 802.11a channels)

ipw3945: Error sending LEDS_CMD: time out after 500ms. /*multiple times this line*/

[...]

ipw3945: Error sending SCAN_ABORT_CMD: time out after 500ms.

ipw3945: Detected geography ABG (13 802.11bg channels, 23 802.11a channels)

ipw3945: Error sending SCAN_ABORT_CMD: time out after 500ms.

ipw3945: Error sending LEDS_CMD: time out after 500ms.

ipw3945: Detected geography ABG (13 802.11bg channels, 23 802.11a channels)

```

I think I can get something googling for Error sending SCAN_ABORT_CMD but I have to go to bed now and I will not be able to(or at less I should not) get near to my laptop until wed. 17  So any lack of information is not laziness nor uninterest... I almost lost my hope this days!  :Smile: 

thanks!

----------

## beatryder

Try using the module parameters to disable the LED code. It is known to cause issues on some systems.

Your LED won't work, but wireless might.

----------

## Hanoc

I haven't been able to disable the led... and it seems to be a very simple thing to do...

I've tried modprobe ipw3945 led=0

and also changing the contens of 

to 0.

None of this worked.

Also while messing with modprobe, rmod, /etc/init.d/ipw3945 restart and so I got the [SIOCSIWMODE] error again... and not knowing what to do to get to the previous state (not knowing what did I do to get the error again) I downgraded everything to the stable packages. So my setup is:

net-wireless/ipw3945-1.0.5

net-wireless/ipw3945d 1.7.22-r4

with net-wireless/ieee80211-1.1.13-r1 instaled (so not in the kernel).

I managed to get it to start without error. I mean... starting eth2 without the [SIOCSIWMODE] error. Wich is more than what I managed to get the last time I tried this configuration (of course is not the first time I try downgrading), so I guess that the preup function in conf.d/net is helping.

My dmesg keeps babling something about the led... so I think my next step is to disable it.

As I mentioned trying the moprobe option does not work.

modprobe ipw3945 led=0 outputs no error and the led keeps blinking.

I still get 

```

eth2      unassociated  ESSID:"orbit"  Nickname:""

          Mode:Managed  Frequency=nan kHz  Access Point: 00:0F:3D:A7:D7:50   

          Bit Rate:0 kb/s   Tx-Power:16 dBm   

          Retry limit:15   RTS thr:off   Fragment thr:off

          Encryption key:off

          Power Management: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:1   Missed beacon:0

```

the unassociated and invalid misc error.

(I can't get wpa_supplicant to work neither).

PD I started the module with the led=0 option when I started to write this message and, at the moment my dmesg output is "clean":

dmesg:

```

ipw3945: Intel(R) PRO/Wireless 3945 Network Connection driver for Linux, 1.0.5mpr

ipw3945: Copyright(c) 2003-2006 Intel Corporation

ACPI: PCI Interrupt 0000:03:00.0[A] -> GSI 17 (level, low) -> IRQ 21

PCI: Setting latency timer of device 0000:03:00.0 to 64

ipw3945: Detected Intel PRO/Wireless 3945ABG Network Connection

ipw3945: Detected geography ABG (13 802.11bg channels, 23 802.11a channels)

```

So maybe is not the led after all... maybe I switched off something... so the led does not trigger the led error but it still blinks.

That's all the new information I have :\

As a side note this wireless card worked when I tried it by the first time... So it has to work eventually.... (the bad side of this is that I never knew what made it stop working).

----------

## XAvAX

Did you turn the modem off in the BIOS? If so, that's a known thinkpad problem - my friend ran into it not lonag ago. Just turn the modem on in BIOS.

----------

## Hanoc

yes it's on. Both in the bios and the siwtch

Since the last time I writed here I have formated and started again. I know is not the solution.. but I was desperate.

I was not able to make it working either... I was getting the following error.

```
# /etc/init.d/ipw3945d restart

 * Stopping ipw3945d ...                                                                                   [ ok ]

 * Starting ipw3945d ...

chown: cannot access `/sys/bus/pci/drivers/ipw3945/00*/cmd': No such file or directory

chmod: cannot access `/sys/bus/pci/drivers/ipw3945/00*/cmd': No such file or directory 
```

I've tried everything in the ipw3945 drivers thread but nothing worked.

I tried to downgrade or upgrade the drivers but I was getting a compilation error... I can't post the error because now I have ubuntu on the laptop.

Yes, finally I instaled ubuntu in the laptop. I don't like it... I miss my gentoo and the choices and everything... but the wireless works from scractch. I could not afford not having the wifi working for more time.

Anyway... I still have gentoo in another partition (I just have to manage to boot it) and I'm not giving up everything... I'll try again when new drivers are released.. or something.

Sadly I can not post the "[solved]" in this thread anyway.. thanks to everyone that helped... I know this kind of conclusion is a bit frustrating... but thanks to all.. at least I have learned a thing or two about drivers, modules, and stuff like that.

Thanks!

----------

