# WPA on ipw3945

## WobblingOn

I am trying to connect o my router at home using WPA and the ipw3945 driver.  I have trolled through as many forum postings as I possibly can and still need help.

I am able to connect to an unsecured WAP, but not my own.

etc/conf.d/net

modules=( "dhcpcd" )

config_eth0=( "dhcp" )

dhcpcd_eth0="-I ' '"

preup() {

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

                sleep 3

        fi

        return 0

}

associate_order="forecepreferred"

modules_eth1=("wpa_supplicant")

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

config_eth1=("dhcp")

associate_timeout_eth1=60

depend_eth1() {

        need ipw3945d

}

/etc/wpa_supplicant/wpa_supplicant.conf

ctrl_interface=/var/run/wpa_supplicant

#ctrl_interface_group=0

#update_config=0

eapol_version=1

ap_scan=1

fast_reauth=1

network={

        scan_ssid=1

        ssid="slinker"

        #psk="so1CC7er!71&so1CC7er!71&"

        psk=

        proto=WPA

        key_mgmt=WPA-PSK

        pairwise=TKIP

        priority=1

}

network={

        key_mgmt=NONE

        priority=99

}

This is what I get when I do:

/etc/init.d/net.eth1 start

 * Caching service dependencies ...                                                                 [ ok ]

 * Starting eth1

 *   Running preup function                                                                         [ ok ]

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

and this is what I get when I type from the command line:

wpa_supplicant -Dwext -ieth1 -c /etc/wpa_supplicant/wpa_supplicant.conf -w -dd

Initializing interface 'eth1' conf '/etc/wpa_supplicant/wpa_supplicant.conf' driver 'wext' ctrl_interface 'N/A' bridge 'N/A'

Configuration file '/etc/wpa_supplicant/wpa_supplicant.conf' -> '/etc/wpa_supplicant/wpa_supplicant.conf'

Reading configuration file '/etc/wpa_supplicant/wpa_supplicant.conf'

ctrl_interface='/var/run/wpa_supplicant'

ctrl_interface_group='wheel' (DEPRECATED)

eapol_version=1

ap_scan=1

fast_reauth=1

Line: 11 - start of a new network block

scan_ssid=1 (0x1)

ssid - hexdump_ascii(len=7):

     73 6c 69 6e 6b 65 72                              slinker         

PSK - hexdump(len=32): [REMOVED]

proto: 0x1

key_mgmt: 0x2

pairwise: 0x8

priority=1 (0x1)

Line 20: removed CCMP from group cipher list since it was not allowed for pairwise cipher

Line: 21 - start of a new network block

key_mgmt: 0x4

priority=99 (0x63)

Priority group 99

   id=1 ssid=''

Priority group 1

   id=0 ssid='slinker'

Initializing interface (2) 'eth1'

EAPOL: SUPP_PAE entering state DISCONNECTED

EAPOL: KEY_RX entering state NO_KEY_RECEIVE

EAPOL: SUPP_BE entering state INITIALIZE

EAP: EAP entering state DISABLED

EAPOL: External notification - portEnabled=0

EAPOL: External notification - portValid=0

ioctl[SIOCSIWMODE]: Resource temporarily unavailable

Could not configure driver to use managed mode

ioctl[SIOCGIWRANGE]: Resource temporarily unavailable

WEXT: Operstate: linkmode=1, operstate=5

Own MAC address: 00:19:d2:23:a9:58

wpa_driver_wext_set_wpa

ioctl[SIOCSIWAUTH]: Resource temporarily unavailable

WEXT auth param 7 value 0x1 - Driver does not support WPA.

wpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0

ioctl[SIOCSIWENCODEEXT]: Resource temporarily unavailable

Driver did not support SIOCSIWENCODEEXT

wpa_driver_wext_set_key: alg=0 key_idx=1 set_tx=0 seq_len=0 key_len=0

ioctl[SIOCSIWENCODEEXT]: Resource temporarily unavailable

Driver did not support SIOCSIWENCODEEXT

wpa_driver_wext_set_key: alg=0 key_idx=2 set_tx=0 seq_len=0 key_len=0

ioctl[SIOCSIWENCODEEXT]: Resource temporarily unavailable

Driver did not support SIOCSIWENCODEEXT

wpa_driver_wext_set_key: alg=0 key_idx=3 set_tx=0 seq_len=0 key_len=0

ioctl[SIOCSIWENCODEEXT]: Resource temporarily unavailable

Driver did not support SIOCSIWENCODEEXT

wpa_driver_wext_set_countermeasures

ioctl[SIOCSIWAUTH]: Resource temporarily unavailable

WEXT auth param 4 value 0x0 - wpa_driver_wext_set_drop_unencrypted

ioctl[SIOCSIWAUTH]: Resource temporarily unavailable

WEXT auth param 5 value 0x1 - Setting scan request: 0 sec 100000 usec

ctrl_interface_group=10 (from group name 'wheel')

Added interface eth1

RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])

RTM_NEWLINK, IFLA_IFNAME: Interface 'eth1' added

State: DISCONNECTED -> SCANNING

Starting AP scan (specific SSID)

Scan SSID - hexdump_ascii(len=7):

     73 6c 69 6e 6b 65 72                              slinker         

Trying to get current scan results first without requesting a new scan to speed up initial association

ioctl[SIOCGIWSCAN]: Resource temporarily unavailable

Scan results: -1

Failed to get scan results

Failed to get scan results - try scanning again

Setting scan request: 0 sec 0 usec

Starting AP scan (broadcast SSID)

ioctl[SIOCSIWSCAN]: Resource temporarily unavailable

Failed to initiate AP scan.

Setting scan request: 10 sec 0 usec

CTRL-EVENT-TERMINATING - signal 2 received

Removing interface eth1

State: SCANNING -> DISCONNECTED

wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)

WEXT: Operstate: linkmode=-1, operstate=5

No keys have been configured - skip key clearing

EAPOL: External notification - portEnabled=0

EAPOL: External notification - portValid=0

wpa_driver_wext_set_wpa

Also at the end of my dmesg I get this:

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

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

ipw3945: Error sending cmd #08 to daemon: time out after 500ms.

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

ipw3945: 1 frames still in use.  Did we lose one?

ipw3945: Detected geography ABG (11 802.11bg channels, 13 802.11a channels)Last edited by WobblingOn on Sun Dec 09, 2007 2:50 am; edited 1 time in total

----------

## mjf55

This is more complex than my configuration.  So the thing I see is suspicious is  *Quote:*   

> dhcpcd_eth0="-I ' '" 

 .

It looks like you are trying to pass a blank ClientID (with the single quotes in there).  Is this what you want or is it a typo.  I could not find a usage example like this on Google.

Another item is  *Quote:*   

>  psk= 

 .  Here it looks like you are trying to pass a blank pass key.  Wouldn't 

```
psk=""
```

 be better?  Or remove it?  Or just use your open network configuration?

----------

## WobblingOn

 *mjf55 wrote:*   

> This is more complex than my configuration.  So the thing I see is suspicious is  *Quote:*   dhcpcd_eth0="-I ' '"  .
> 
> It looks like you are trying to pass a blank ClientID (with the single quotes in there).  Is this what you want or is it a typo.  I could not find a usage example like this on Google.
> 
> Another item is  *Quote:*    psk=  .  Here it looks like you are trying to pass a blank pass key.  Wouldn't 
> ...

 

The first line is for eth0, which is the hard lined ethernet port, no problem with that connecting.

psk= is just because I deleted my psk from my actual posting.

----------

## mjf55

I know the "dhcpcd_eth0" part is ok.  What I question is the empty space in the single quotes, which is inside the double quotes with the -I parameter. Your code:  *Quote:*   

> dhcpcd_eth0="-I ' '"

  ( the part in bold is what may be wrong)

On to psk.  I am using wpa_supplicant and everything is ok.  When I add this:

```
network={

   ssid="simple"

   psk="very secret passphrase"

   priority=5

}
```

 Everything is still ok.  So when I do this

```
network={

   ssid="simple"

   psk=       #<--removed "very secret passphrase"

   priority=5

}
```

I get invalid PSK, and other errors, the network does not start.  If I put NONE instead of blank

```
network={

   ssid="simple"

   psk=NONE   #<-- 

   priority=5

}
```

I get the same failure.  I would suggest wpa_supplicant ( version 0.5.7 ) requires a  valid psk if it is called out.

Hope this helps, Good Luck..

----------

## WobblingOn

 *mjf55 wrote:*   

> I know the "dhcpcd_eth0" part is ok.  What I question is the empty space in the single quotes, which is inside the double quotes with the -I parameter. Your code:  *Quote:*   dhcpcd_eth0="-I ' '"  ( the part in bold is what may be wrong)
> 
> Removed this line no negative affect.
> 
> On to psk.  I am using wpa_supplicant and everything is ok.  When I add this:
> ...

 

Tried this then I can not even connect to an unprotected network.

I am still getting these errors from dmesg, I believe these may be the causitive factor.

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

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

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

ipw3945: Error sending cmd #08 to daemon: time out after 500ms.

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

ipw3945: 1 frames still in use.  Did we lose one?

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

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

----------

## Yinchie

Here is how I have setup my wireless connection with ipw3945.

/etc/conf.d/net

```
## WLAN

preup() {

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

                sleep 3

        fi

        return 0

}

modules_eth1=( "wpa_supplicant" )

wpa_supplicant_eth1="-Dwext"

associate_timeout_eth1="15"

config_eth1=( "192.168.1.10/24" )

fallback_eth1=( "dhcp" )

routes_eth1=( "default gw 192.168.1.1" )

dns_servers_eth1=( "192.168.1.1" )
```

/etc/wpa_supplicant.conf

```
network={

        key_mgmt=NONE

        priority=-9999999

}

network={

        ssid="UPC82009"

        psk=1c95648943e6b3d76d5d2318a5d2456215265ca3ee4c7c122050c4ad3e9a3a74

        proto=WPA

        key_mgmt=WPA-PSK

        priority=1

}

```

----------

## tarnold

I got a similar problem as an upgrade regression: upgrading from gentoo-sources-2.6.22-r9 to gentoo-sources-2.6.23-r3 (stable) forced me to upgrade from ipw3945-1.2.0 to ipw3945-1.2.2. (stable).

After upgrading, I get the same output from /etc/init.d/net.eth1 start as in the posting. But when calling wpa_supplicant directly, I get something different - it seems to get no scan results for the SSID:

```

Starting AP scan (specific SSID)

Scan SSID - hexdump_ascii(len=10):

     <!-- deleted my private SSID -->

Scan timeout - try to get results

Received 0 bytes of scan results (0 BSSes)

Scan results: 0

Selecting BSS from priority group 5

No suitable AP found.

Setting scan request: 5 sec 0 usec

Starting AP scan (broadcast SSID)

Scan timeout - try to get results

Received 0 bytes of scan results (0 BSSes)

Scan results: 0

Selecting BSS from priority group 5

No suitable AP found.

Setting scan request: 5 sec 0 usec

...

Repeat Ad Nauseam

...

```

Exactly the same configuration works with gentoo-sources-2.6.22-r9/ipw3945-1.2.0. (I just need to downgrade ipw3945 and reboot).

So for now I'll stick with the old kernel. The whole story reminds me of xf86-video-i810, https://forums.gentoo.org/viewtopic-t-581066-highlight-xf86videoi810.html ("My laptop was working beautifully until upgrading to ...") - where I'll stick with  1.7.4 as long as I can.

----------

## Yinchie

I'm using gentoo-sources-2.6.23-r3 and ipw3945-1.2.2 by the way.

----------

## WobblingOn

I upgraded to ipw3945-1.2.2 and no joy I still get this error when starting eth1

/etc/init.d/net.eth1 start

 * Starting eth1

 *   Running preup function                                                                    [ ok ]

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

and this from dmesg

ipw3945: Detected Intel PRO/Wireless 3945ABG Network Connection

Adding 1004020k swap on /dev/sda5.  Priority:-1 extents:1 across:1004020k

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

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

ipw3945: Error sending cmd #08 to daemon: time out after 500ms.

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

ipw3945: 1 frames still in use.  Did we lose one?

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

spurious 8259A interrupt: IRQ7.

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

ipw3945: Error sending cmd #08 to daemon: time out after 500ms.

sky2 eth0: enabling interface

sky2 eth0: Link is up at 100 Mbps, full duplex, flow control both

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

ipw3945: Radio disabled by module parameter.

additionally my rf_kill is set to 1 always, and it can only by changed manually to 0 via

echo 0 > /sys/class/net/eth1/device/rf_kill

and this in dmesg

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

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

ipw3945: Error sending cmd #08 to daemon: time out after 500ms.

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

ipw3945: 1 frames still in use.  Did we lose one?

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

spurious 8259A interrupt: IRQ7.

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

ipw3945: Error sending cmd #08 to daemon: time out after 500ms.

sky2 eth0: enabling interface

sky2 eth0: Link is up at 100 Mbps, full duplex, flow control both

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

ipw3945: Radio disabled by module parameter.

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

ipw3945: Radio disabled by module parameter.

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

ipw3945: Radio disabled by module parameter.

ipw3945: 3945ABG card ucode DOWNLOAD FAILED 

ipw3945: Unable to load firmware: -110

ipw3945: 3945ABG card ucode DOWNLOAD FAILED 

ipw3945: Unable to load firmware: -110

ipw3945: 3945ABG card ucode DOWNLOAD FAILED 

ipw3945: Unable to load firmware: -110

ipw3945: 3945ABG card ucode DOWNLOAD FAILED 

ipw3945: Unable to load firmware: -110

ipw3945: 3945ABG card ucode DOWNLOAD FAILED 

ipw3945: Unable to load firmware: -110

ipw3945: Unable to initialize device after 5 attempts.

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

ipw3945: Radio disabled by module parameter.

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

ipw3945: Radio disabled by module parameter.

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

ipw3945: Radio disabled by module parameter.

ipw3945: 3945ABG card ucode DOWNLOAD FAILED 

ipw3945: Unable to load firmware: -110

ipw3945: 3945ABG card ucode DOWNLOAD FAILED 

ipw3945: Unable to load firmware: -110

ipw3945: 3945ABG card ucode DOWNLOAD FAILED 

ipw3945: Unable to load firmware: -110

ipw3945: 3945ABG card ucode DOWNLOAD FAILED 

ipw3945: Unable to load firmware: -110

ipw3945: 3945ABG card ucode DOWNLOAD FAILED 

ipw3945: Unable to load firmware: -110

ipw3945: Unable to initialize device after 5 attempts.

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

----------

## mattdev121

I get the exact same problem, and I've tried with basically every version combination of ipw3945, ipw3945d and gentoo-sources

If you ask me, it's an upstream problem, probably with the closed-source binary-only part of the ipw3945d package. 

Unfortunately, I haven't had any luck with the iwl driver yet

The strange thing is that this bug seems to be completely random. Happens to me using a WEP network, WPA and open, after heavy usage or light usage, after 5 minutes or 24+ hours, low speeds or high speeds, b or g network, when I'm on battery or AC adapter. 

I've been lucky for weeks at a time, with no problems whatsoever or (like tonight, for instance) it happens every 2 or 3 minutes and is a very big nuisance.

----------

## tarnold

My specific regression problem with not getting the (hidden, as I forgot to mention) SSID seems to be confirmed, see https://bugs.gentoo.org/show_bug.cgi?id=202267 and https://forums.gentoo.org/viewtopic-t-592046.html

----------

