# Highly Unstable WPA_Supplicant -- HELP!!!

## KristyX

Hi!

I'm having some really annoying troubles with my wpa_supplicant

Everytime I startup the laptop, I never know if the wireless network is going to connect or not.. sometimes it does

(after 10 seconds or more), other times wpa_supplicant will timeout when "Daemonizing.." (and the worse part is that

it will timeout after trying for what seems like eternity).

During the day, my network connection drops a lot and having to restart the net.eth1 is back to the same problem of

not knowing whether it's going to connect. 

The strength of the signal is never the issue as I'm sitting a few feet away from the wireless hardware and Windows XP

never has a problem connecting (and reports the strength as excellent).

I'm at my wits end as to what to do.. sometimes, after trying to restart the network multiple times, I end up rebooting..

and sometimes this works and sometimes it doesnt.

Can someone help?? I'm losing my mind!

Thanks,

Kristy

When the network doesn't work..

```

rainforest kristy # /etc/init.d/net.eth1 restart

 * Stopping eth1

 *   Bringing down eth1

 *     Shutting down eth1 ...                                             [ ok ]

 *     Stopping wpa_supplicant on eth1 ...                                [ ok ]

 * Starting eth1

 *   Starting wpa_supplicant on eth1 ...

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

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

Reading configuration file '/etc/wpa_supplicant.conf'

update_config=1

ctrl_interface='/var/run/wpa_supplicant'

ctrl_interface_group=0

ap_scan=1

fast_reauth=1

Line: 13 - start of a new network block

ssid - hexdump_ascii(len=8):

     66 69 72 65 70 6f 72 74                           homenet

scan_ssid=1 (0x1)

PSK (ASCII passphrase) - hexdump_ascii(len=10): [REMOVED]

priority=5 (0x5)

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

Priority group 5

   id=0 ssid='homenet'

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

SIOCGIWRANGE: WE(compiled)=18 WE(source)=16 enc_capa=0x0

  capabilities: key_mgmt 0x0 enc 0x3

Own MAC address: 00:13:ce:83:a9:bd

wpa_driver_wext_set_wpa

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

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

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

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

wpa_driver_wext_set_countermeasures

wpa_driver_wext_set_drop_unencrypted

Setting scan request: 0 sec 100000 usec

Added interface eth1

Daemonize..                                                               [ ok ]

 *     timed out                                                          [ !! ]

```

When the network works..

```

rainforest kristy # /etc/init.d/net.eth1 restart

 * Unmounting network filesystems ...                                     [ ok ]

 * samba -> stop: smbd ...                                                [ ok ]

 * samba -> stop: nmbd ...                                                [ ok ]

 * Stopping eth1

 *   Bringing down eth1

 *     Stopping dhcpcd on eth1 ...                                        [ ok ]

 *     Shutting down eth1 ...                                             [ ok ]

 *     Stopping wpa_supplicant on eth1 ...                                [ ok ]

 * Starting eth1

 *   Starting wpa_supplicant on eth1 ...

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

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

Reading configuration file '/etc/wpa_supplicant.conf'

update_config=1

ctrl_interface='/var/run/wpa_supplicant'

ctrl_interface_group=0

ap_scan=1

fast_reauth=1

Line: 13 - start of a new network block

ssid - hexdump_ascii(len=8):

     66 69 72 65 70 6f 72 74                           homenet

scan_ssid=1 (0x1)

PSK (ASCII passphrase) - hexdump_ascii(len=10): [REMOVED]

priority=5 (0x5)

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

Priority group 5

   id=0 ssid='homenet'

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

SIOCGIWRANGE: WE(compiled)=18 WE(source)=16 enc_capa=0x0

  capabilities: key_mgmt 0x0 enc 0x3

Own MAC address: 00:13:ce:83:a9:bd

wpa_driver_wext_set_wpa

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

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

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

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

wpa_driver_wext_set_countermeasures

wpa_driver_wext_set_drop_unencrypted

Setting scan request: 0 sec 100000 usec

Added interface eth1

Daemonize..                               [ ok ]

 *     eth1 connected to "homenet" at 00:16:B6:0B:0A:23

 *   Bringing up eth1

 *     dhcp

 *       Running dhcpcd ...                                               [ ok ]

 *       eth1 received address 192.168.0.6

 * Mounting network filesystems ...                                       [ ok ]

 * samba -> start: smbd ...                                               [ ok ]

 * samba -> start: nmbd ...                                               [ ok ]

```

/etc/wpa_supplicant.conf

```

update_config=1

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=0

ap_scan=1

fast_reauth=1

# Simple case: WPA-PSK, PSK as an ASCII passphrase, allow all valid ciphers

network={

   ssid="homenet"

   scan_ssid=1

   psk="secretkey"

   priority=5

}

```

/etc/conf.d/net

```

config_eth1=( "dhcp" )

modules=( "wpa_supplicant" )

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

```

dmesg | grep Intel

```

Dell Inspiron 6000

ieee80211: Copyright (C) 2004-2005 Intel Corporation <jketreno@linux.intel.com>

ipw2200: Intel(R) PRO/Wireless 2200/2915 Network Driver, 1.0.8

ipw2200: Copyright(c) 2003-2005 Intel Corporation

ipw2200: Detected Intel PRO/Wireless 2200BG Network Connection

agpgart: Detected an Intel 915GM Chipset.

```

Thanks,

Kristy

----------

## joelwright

I'm having the exact same problem.

I retry and retry and retry ....... and eventually I get connected

The diagnostic output from wpa_supplicant appears to be the same in both cases - it either times out or works. I've tried wpa_supplicant 0.4.7 0.4.8 and 0.5.1. Other details: ipw2200 v1.1.0 and kernel 2.6.16_rc5.

Joel.

----------

## KristyX

If we can't fix this... can we find an alternative to wpa_supplicant?

Kristy

----------

## unclecharlie

Howdy yall,

Is everyone on this thread using intel wireless? (Thinking it may be a driver issue, not wpa supplicant.)

Charlie

[edit] p.s.- If so- The 3.0 firmware is now in portage and is supposed to load smoother than the 2.4. It requires the 1.1.1 driver. Both are ~x86. Might be worth a try... [/edit]

----------

## KristyX

I am on an Intel Pro Wireless card.

Kristy

----------

## joelwright

Me too. I'll try the new driver (wasn't in portage this morning).

Let's hope it fixes the issue!

----------

## joelwright

Ok, so it's not a driver issue. All the versions I've tried (1.0.10 1.1.0 and 1.1.1) have the same problems. I also tried switching the network to plain WEP and wpa_supplicant has the same problems. However iwconfig connects perfectly and very quickly. This isn't a solution for me though, as I need to connect to networks using wpa and 802.1x authentication for work.

Any other ideas what could be wrong?

Joel.

----------

## unclecharlie

kristyx,

I notice you've got 

 *Quote:*   

> 
> 
> /etc/conf.d/net
> 
> Code:
> ...

 

Have you already tried -Dipw instead of -Dwext? (Specifying the ipw driver should also allow you to use WPA2 if you like...)

Charlie

----------

## KristyX

Hi Charlie,

Yes, I first tried ipw but it didn't work for me.. I had some errors (my network is working right now so

I *really* don't want to change the settings and lookup the error message.. but as soon as it drops, I will   :Wink:  )

Thanks,

Kristy

----------

## unclecharlie

Kristyx,

I understand...

 The only other thing I might suggest trying is to omit scan_ssid=1 from wpa_supplicant.conf. (unless your AP does not broadcast it's ESSID.) 

Charlie

----------

## KristyX

Hi Charlie,

Yes, the AP isn't broadcasting.. as for the ipw driver, here's the error:

```

wpa_driver_ipw_set_wpa: enabled=1

ioctl[IPW_IOCTL_WPA_SUPPLICANT]: Operation not supported

wpa_driver_ipw_set_key: alg=none key_idx=0 set_tx=0 seq_len=0 key_len=0

ioctl[IPW_IOCTL_WPA_SUPPLICANT]: Operation not supported

Failed to set encryption.

wpa_driver_ipw_set_key: alg=none key_idx=1 set_tx=0 seq_len=0 key_len=0

ioctl[IPW_IOCTL_WPA_SUPPLICANT]: Operation not supported

Failed to set encryption.

wpa_driver_ipw_set_key: alg=none key_idx=2 set_tx=0 seq_len=0 key_len=0

ioctl[IPW_IOCTL_WPA_SUPPLICANT]: Operation not supported

Failed to set encryption.

wpa_driver_ipw_set_key: alg=none key_idx=3 set_tx=0 seq_len=0 key_len=0

ioctl[IPW_IOCTL_WPA_SUPPLICANT]: Operation not supported

Failed to set encryption.

wpa_driver_ipw_set_countermeasures: enabled=0

ioctl[IPW_IOCTL_WPA_SUPPLICANT]: Operation not supported

wpa_driver_ipw_set_drop_unencrypted: enabled=1

ioctl[IPW_IOCTL_WPA_SUPPLICANT]: Operation not supported

```

Thanks,

Kristy

----------

## unclecharlie

Kristyx,

I'm kinda shooting in the dark here. But have you tried changing the hwcrypto option when loading the ipw2200 driver? Loading the module with hwcrypto=1 uses firmware encryption, while hwcrypto=0 forces software encryption. If I remember correctly, the option defaults to 1 on drivers < 1.1.0 and defaults to 0 on 1.1.0 & 1.1.1. If you haven't tried already, you might try toggling this flag to force software encryption... (or toggle the other way if your using the new (>1.1.0) driver...

Other than that, I'm not sure what else could resolve this.

Charlie

----------

## joelwright

I have to say, I'm having all the same problems and I've tried all the suggestions so far with various versions of the drivers and wpa_supplicant. Frankly I'm beginning to lose hope that this will ever get sorted  :Sad:  Maybe I'll just have to wait - things usually magically fix themselves ......

Thanks for all the help,

I'm still willing to try anything anyone can think of,

Joel.

----------

## KristyX

Charlie, any idea where I'm supposed to set the hwcrypto option? I've been googling but haven't found which config file I'm supposed to edit!   :Embarassed:  Thanks !

----------

## seiichiro0185

its in /etc/modules.d/ipw2200 you have to add this line:

```
options ipw2200 hwcrypto=0/1
```

and run modules-update afterwards

btw. I'm using the ipw2200 drivers and wpa_supplicant without problems, the driver is 1.1.1 and wpa_supplicant is 0.4.7

PS: If someone wants to see my config, just say so

----------

## unclecharlie

KristyX,

Yeah, what seiichiro0185 said   :Wink:  ...

Charlie

----------

## tam1138

I figured I'd add myself to the "me too" list.  Perhaps a bug ought to be filed?

(BTW, I found that toggling the hwcrypto option on the ipw2200 module to have no effect.)

Edit: It appears this was a problem with the WAP and actually had nothing at all to do with wpa_supplicant.  D'oh.Last edited by tam1138 on Fri Apr 07, 2006 4:15 am; edited 1 time in total

----------

## plastikman187

Edit - https://bugs.gentoo.org/show_bug.cgi?id=127799

Edit part deux - it appears that after updating to net-wireless/ipw2200-1.1.1-r1 and adding -ieth1 to my /etc/confd.net

```
wpa_supplicant_eth1="-Dwext -dd -ieth1"

```

 the issue is resolved for me

just a me too here....

do you get this message in 

```

Mar 28 03:18:04 slacktop netplugd[6108]: eth1: ignoring event

Mar 28 03:18:04 slacktop netplugd[6108]: eth1: ignoring event

Mar 28 03:18:05 slacktop netplugd[6108]: No interface name

Mar 28 03:18:05 slacktop netplugd[6108]: Callback failed

Mar 28 03:18:05 slacktop netplugd[6108]: No interface name

Mar 28 03:18:05 slacktop netplugd[6108]: Callback failed

Mar 28 03:18:05 slacktop netplugd[6108]: No interface name

Mar 28 03:18:05 slacktop netplugd[6108]: Callback failed

Mar 28 03:18:05 slacktop netplugd[6108]: No interface name

Mar 28 03:18:05 slacktop netplugd[6108]: Callback failed

Mar 28 03:18:05 slacktop netplugd[6108]: No interface name

Mar 28 03:18:05 slacktop netplugd[6108]: Callback failed

Mar 28 03:18:05 slacktop netplugd[6108]: No interface name

Mar 28 03:18:05 slacktop netplugd[6108]: Callback failed

Mar 28 03:18:05 slacktop netplugd[6108]: No interface name

Mar 28 03:18:05 slacktop netplugd[6108]: Callback failed

Mar 28 03:18:05 slacktop netplugd[6108]: eth1: ignoring event

Mar 28 03:18:05 slacktop TKIP: replay detected: STA=00:04:e2:fd:a5:41 previous TSC 000000000000 received TSC 000000000000

```

Here is the output for when i start the device

```

slacktop ~ # /etc/init.d/net.eth1 start

 * Starting eth1

 *   Starting wpa_supplicant on eth1 ...

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=0 (from group name 'root')

Line: 10 - start of a new network block

ssid - hexdump_ascii(len=20):

     5xxxxxxxxxxx

scan_ssid=1 (0x1)

proto: 0x1

key_mgmt: 0x2

pairwise: 0x8

group: 0x8

PSK (ASCII passphrase) - hexdump_ascii(len=15): [REMOVED]

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

Priority group 0

   id=0 ssid='xxxxxxxx'

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

SIOCGIWRANGE: WE(compiled)=19 WE(source)=18 enc_capa=0xf

  capabilities: key_mgmt 0xf enc 0xf

Own MAC address: xx.xx.xx.xx.xx.xx

wpa_driver_wext_set_wpa

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

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

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

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

wpa_driver_wext_set_countermeasures

wpa_driver_wext_set_drop_unencrypted

Setting scan request: 0 sec 100000 usec

Added interface eth1

Daemonize..                                                               [ ok ] *   Starting wpa_cli on eth1 ...                                         [ ok ] *     Backgrounding ...

slacktop ~ #

```

the device starts but constantly looses signal strength

I am not boradcasting the SSID

My configs are as follows

/etc/conf.d/net

```

config_eth1=( "dhcp" )

modules=( "wpa_supplicant" )

wpa_supplicant_eth1="-Dwext -dd"

```

/etc/wpa_supplicant/wpa_supplicant.conf

```

#allow frontend (e.g., wpa_cli) to be used by all users in 'root' group

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=root

#fast_reauth=1

#

# home network; allow all valid ciphers

network={

        ssid="xxxxxxxxxxxxxxxxxxxxxxxxx"

        scan_ssid=1

        proto=WPA

        key_mgmt=WPA-PSK

        pairwise=TKIP

        group=TKIP

        psk="xxxxxxxxxxxxxxxxxxxxxx"

                                                }

```

----------

## plastikman187

ok...I lied i am still having the same issue as before.  I had no issues with the wireless for about 2 days but today i am back to the same conenct and disconnect.....stoopid wpa.....

----------

## plastikman187

I have created a bug upstream since the bug I created with gentoo got closed asying to open a bug upstream

http://bughost.org/bugzilla/show_bug.cgi?id=985

What version of baselayout are you all using?

```

sys-apps/baselayout-1.12.0_pre16-r3
```

I wonder if this could be a baselayout issue

----------

## GaardenZwerch

 *plastikman187 wrote:*   

> I have created a bug upstream since the bug i created with gentoo got closed asying to open a bug upstream
> 
> http://bughost.org/bugzilla/show_bug.cgi?id=985
> 
> What version of baselayout are you all using?
> ...

 

I have:

sys-apps/baselayout-1.12.0_pre16-r3

Same problem.

Frank

----------

## plastikman187

I downgraded to a stable version of baselayout and I had the same issue so I dont think that it is an issue with baselayout.  I guess will have to wait and see waht upstream has to say...

----------

## plastikman187

Just picked up a new router Belkin F5D7231-4P and every thing look like it is stable.  I beleive that my issue may have been with the previous router (Was having issues with windows machines too) it was a  SMC2804WBRP-G took that **** back and got a router that actually works.  I will post more status here as i do more testing.

----------

## plastikman187

It has been 6 days since my last post and I have had zero problems with it.  for me this issue is [Solved]  :Wink: 

----------

## m.vandenheuvel

I use wpa_supplicant with ipw2100 drivers, with the same problem. I fixed it with removing ivman from rc-update. I think ivman tries to load the firmware and asks for an IP while booting the net.ethX service. With kde-3.5 automounting still works ok, so it seems that the problem is fixed here...

----------

## infecticide

Instead of an Intel Chipset i'm using an Atheros chipset which is experiencing the same types of seemly random connection/disconnection.

A few things i've noticed:

================

- As long as I set (via command line) a static IP and gateway it connects fine and all I have to do is start wpa_supplicant and provide a default gateway VIA route.

```

infecticide ~ # ifconfig ath0 192.168.0.100/24 broadcast 192.168.0.255 up

SIOCSIFNETMASK: Cannot assign requested address

infecticide ~ # wpa_supplicant -Dmadwifi -iath0 -c/etc/wpa_supplicant.conf

Trying to associate with SSID 'brown'

Associated with 00:13:46:bd:0c:d8

WPA: Key negotiation completed with 00:13:46:bd:0c:d8 [PTK=TKIP GTK=TKIP]

CTRL-EVENT-CONNECTED - Connection to 00:13:46:bd:0c:d8 completed (auth)

route add default gw 192.168.0.1 (entered in another window)

```

- If I bring ath0 up, run wpa_supplicant, then run dhcpcd ath0 it drops and will not reconnect short of me ctrl+c'ing it and running wpa_supplicant again.

```

infecticide ~ # dhcpcd ath0

<wpa_supplicant running in another window shows>

CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys

Trying to associate with SSID 'brown'

Authentication with 00:00:00:00:00:00 timed out.

Trying to associate with SSID 'brown'

<will not reconnect unless I terminate wpa_supplicant and restart it from command line>

```

I tried using the init scripts:

--------------------------------

```

# /etc/init.d/net.ath0 start

 * Starting ath0

 *   Loading networking modules for ath0

 *     modules: wpa_supplicant essidnet iptunnel ifconfig dhcpcd apipa

 *       wpa_supplicant provides wireless

 *       ifconfig provides interface

 *       dhcpcd provides dhcp

 *   Starting wpa_supplicant on ath0 ...

Initializing interface 'ath0' conf '/etc/wpa_supplicant.conf' driver 'madwifi' ctrl_interface 'N/A'

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

Reading configuration file '/etc/wpa_supplicant.conf'

ctrl_interface='/var/run/wpa_supplicant'

ctrl_interface_group=0

ap_scan=2

eapol_version=1

Line: 12 - start of a new network block

ssid - hexdump_ascii(len=5):

     62 72 6f 77 6e                                    brown

BSSID - hexdump(len=6): 00 13 46 bd 0c d8

scan_ssid=1 (0x1)

proto: 0x1

key_mgmt: 0x2

pairwise: 0x8

PSK (ASCII passphrase) - hexdump_ascii(len=32): [REMOVED]

priority=5 (0x5)

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

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

Priority group 5

   id=0 ssid='brown'

Initializing interface (2) 'ath0'

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

SIOCGIWRANGE: WE(compiled)=19 WE(source)=13 enc_capa=0xf

  capabilities: key_mgmt 0xf enc 0xf

Own MAC address: 00:13:46:6f:0e:17

wpa_driver_madwifi_del_key: keyidx=0

wpa_driver_madwifi_del_key: keyidx=1

wpa_driver_madwifi_del_key: keyidx=2

wpa_driver_madwifi_del_key: keyidx=3

wpa_driver_madwifi_set_countermeasures: enabled=0

wpa_driver_madwifi_set_drop_unencrypted: enabled=1

Setting scan request: 0 sec 100000 usec

Added interface ath0

Daemonize..

 *     Waiting for association                                                                                                   [ ok ]

 *     timed out                                                                                                                 [ !! ]

infecticide ~ #

```

Tried setting a static ip with the same results.

Some info i'm sure you'll want to see:

-------------------------------------------

/etc/conf.d/net

```

modules=( "!iwconfig" )

config_ath0=( "192.168.0.100/24 broadcast 192.168.0.255" )

routes_ath0=(

        "default via 192.168.0.1"

)

modules=( "wpa_supplicant" )

wpa_supplicant_ath0="-Dmadwifi -iath0 -dd" # For Atheros based cards

wpa_timeout_eth0=60

config_ESSID=( "brown" )

```

/etc/wpa_supplicant

```

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=0

ap_scan=2

eapol_version=1

network={

  ssid="brown"

  bssid=00:13:46:bd:0c:d8

  scan_ssid=1

  proto=WPA

  key_mgmt=WPA-PSK

  pairwise=TKIP

  psk="97F83CA854562D1AD49F795F793E1F63"

  # The higher the priority the sooner we are matched

  priority=5

}

```

Software versions:

----------------------

```

[ebuild   R   ] sys-apps/baselayout-1.11.14-r8  -bootstrap -build -static -unicode 0 kB

[ebuild   R   ] net-wireless/wpa_supplicant-0.4.8  -gsm +madwifi +qt +readline +ssl 0 kB

[ebuild   R   ] net-wireless/madwifi-ng-0.1531.20060427  -amrr -onoe 0 kB

```

wpa_supplicant with -dd showing disconnection when using dhcpcd:

-----------------------------------------------------------------------------

```

infecticide ~ # wpa_supplicant -Dmadwifi -iath0 -c/etc/wpa_supplicant.conf -dd

Initializing interface 'ath0' conf '/etc/wpa_supplicant.conf' driver 'madwifi' ctrl_interface 'N/A'

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

Reading configuration file '/etc/wpa_supplicant.conf'

ctrl_interface='/var/run/wpa_supplicant'

ctrl_interface_group=0

ap_scan=2

eapol_version=1

Line: 12 - start of a new network block

ssid - hexdump_ascii(len=5):

     62 72 6f 77 6e                                    brown

BSSID - hexdump(len=6): 00 13 46 bd 0c d8

scan_ssid=1 (0x1)

proto: 0x1

key_mgmt: 0x2

pairwise: 0x8

PSK (ASCII passphrase) - hexdump_ascii(len=32): [REMOVED]

priority=5 (0x5)

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

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

Priority group 5

   id=0 ssid='brown'

Initializing interface (2) 'ath0'

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

SIOCGIWRANGE: WE(compiled)=19 WE(source)=13 enc_capa=0xf

  capabilities: key_mgmt 0xf enc 0xf

Own MAC address: 00:13:46:6f:0e:17

wpa_driver_madwifi_del_key: keyidx=0

wpa_driver_madwifi_del_key: keyidx=1

wpa_driver_madwifi_del_key: keyidx=2

wpa_driver_madwifi_del_key: keyidx=3

wpa_driver_madwifi_set_countermeasures: enabled=0

wpa_driver_madwifi_set_drop_unencrypted: enabled=1

Setting scan request: 0 sec 100000 usec

Added interface ath0

Wireless event: cmd=0x8b06 len=8

Ignore event for foreign ifindex 4

RTM_NEWLINK, IFLA_IFNAME: Interface 'ath0' added

RTM_NEWLINK, IFLA_IFNAME: Interface 'ath0' added

State: DISCONNECTED -> SCANNING

Trying to associate with SSID 'brown'

Cancelling scan request

WPA: clearing own WPA/RSN IE

Automatic auth_alg selection: 0x1

WPA: No WPA/RSN IE available from association info

WPA: Set cipher suites based on configuration

WPA: Selected cipher suites: group 14 pairwise 8 key_mgmt 2

WPA: clearing AP WPA IE

WPA: clearing AP RSN IE

WPA: using GTK TKIP

WPA: using PTK TKIP

WPA: using KEY_MGMT WPA-PSK

WPA: Set own WPA IE default - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50 f2 02 01 00 00 50 f2 02 01 00 00 50 f2 02

No keys have been configured - skip key clearing

wpa_driver_madwifi_set_drop_unencrypted: enabled=1

State: SCANNING -> ASSOCIATING

wpa_driver_madwifi_associate

Setting authentication timeout: 60 sec 0 usec

EAPOL: External notification - EAP success=0

EAPOL: External notification - EAP fail=0

EAPOL: External notification - portControl=Auto

Wireless event: cmd=0x8b1a len=14

Wireless event: cmd=0x8b19 len=8

Received 574 bytes of scan results (2 BSSes)

Scan results: 2

Wireless event: cmd=0x8b15 len=20

Wireless event: new AP: 00:13:46:bd:0c:d8

State: ASSOCIATING -> ASSOCIATED

Associated to a new BSS: BSSID=00:13:46:bd:0c:d8

No keys have been configured - skip key clearing

Network configuration found for the current AP

WPA: Using WPA IE from AssocReq to set cipher suites

WPA: Selected cipher suites: group 8 pairwise 8 key_mgmt 2

WPA: clearing AP WPA IE

WPA: clearing AP RSN IE

WPA: using GTK TKIP

WPA: using PTK TKIP

WPA: using KEY_MGMT WPA-PSK

WPA: Set own WPA IE default - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50 f2 02 01 00 00 50 f2 02 01 00 00 50 f2 02

EAPOL: External notification - EAP success=0

EAPOL: External notification - EAP fail=0

EAPOL: External notification - portControl=Auto

Associated with 00:13:46:bd:0c:d8

WPA: Association event - clear replay counter

EAPOL: External notification - portEnabled=0

EAPOL: External notification - portValid=0

EAPOL: External notification - EAP success=0

EAPOL: External notification - portEnabled=1

EAPOL: SUPP_PAE entering state CONNECTING

EAPOL: SUPP_BE entering state IDLE

Setting authentication timeout: 10 sec 0 usec

RTM_NEWLINK, IFLA_IFNAME: Interface 'ath0' added

RX EAPOL from 00:13:46:bd:0c:d8

RX EAPOL - hexdump(len=99): 01 03 00 5f fe 00 89 00 20 00 00 00 00 00 00 00 01 3c 1f 0d 02 14 99 70 90 0a db df b1 ff 6c 53 59 df 95 ef bf 0f 1e 86 9d 61 fe 3c a0 9f fb 75 3e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

Setting authentication timeout: 10 sec 0 usec

IEEE 802.1X RX: version=1 type=3 length=95

  EAPOL-Key type=254

WPA: RX EAPOL-Key - hexdump(len=99): 01 03 00 5f fe 00 89 00 20 00 00 00 00 00 00 00 01 3c 1f 0d 02 14 99 70 90 0a db df b1 ff 6c 53 59 df 95 ef bf 0f 1e 86 9d 61 fe 3c a0 9f fb 75 3e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

State: ASSOCIATED -> 4WAY_HANDSHAKE

WPA: RX message 1 of 4-Way Handshake from 00:13:46:bd:0c:d8 (ver=1)

WPA: WPA IE for msg 2/4 - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50 f2 02 01 00 00 50 f2 02 01 00 00 50 f2 02

WPA: Renewed SNonce - hexdump(len=32): c9 7e b1 0f b7 a8 89 ba 55 6e 44 15 36 ad f8 76 7b eb 5b d9 a7 90 0c 40 d7 62 67 9a 19 12 14 1f

WPA: PMK - hexdump(len=32): [REMOVED]

WPA: PTK - hexdump(len=64): [REMOVED]

WPA: Sending EAPOL-Key 2/4

WPA: TX EAPOL-Key - hexdump(len=123): 01 03 00 77 fe 01 09 00 20 00 00 00 00 00 00 00 01 c9 7e b1 0f b7 a8 89 ba 55 6e 44 15 36 ad f8 76 7b eb 5b d9 a7 90 0c 40 d7 62 67 9a 19 12 14 1f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2a 2f 1f 4e 13 ad cc 0e 78 00 ec 48 0a ee d7 f9 00 18 dd 16 00 50 f2 01 01 00 00 50 f2 02 01 00 00 50 f2 02 01 00 00 50 f2 02

RX EAPOL from 00:13:46:bd:0c:d8

RX EAPOL - hexdump(len=123): 01 03 00 77 fe 01 c9 00 20 00 00 00 00 00 00 00 02 3c 1f 0d 02 14 99 70 90 0a db df b1 ff 6c 53 59 df 95 ef bf 0f 1e 86 9d 61 fe 3c a0 9f fb 75 3e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 b9 26 8e 38 97 82 53 d2 01 be 3f 73 94 0a a4 80 00 18 dd 16 00 50 f2 01 01 00 00 50 f2 02 01 00 00 50 f2 02 01 00 00 50 f2 02

IEEE 802.1X RX: version=1 type=3 length=119

  EAPOL-Key type=254

WPA: RX EAPOL-Key - hexdump(len=123): 01 03 00 77 fe 01 c9 00 20 00 00 00 00 00 00 00 02 3c 1f 0d 02 14 99 70 90 0a db df b1 ff 6c 53 59 df 95 ef bf 0f 1e 86 9d 61 fe 3c a0 9f fb 75 3e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 b9 26 8e 38 97 82 53 d2 01 be 3f 73 94 0a a4 80 00 18 dd 16 00 50 f2 01 01 00 00 50 f2 02 01 00 00 50 f2 02 01 00 00 50 f2 02

State: 4WAY_HANDSHAKE -> 4WAY_HANDSHAKE

WPA: RX message 3 of 4-Way Handshake from 00:13:46:bd:0c:d8 (ver=1)

WPA: IE KeyData - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50 f2 02 01 00 00 50 f2 02 01 00 00 50 f2 02

WPA: No WPA/RSN IE for this AP known. Trying to get from scan results

WPA: set AP WPA IE - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50 f2 02 01 00 00 50 f2 02 01 00 00 50 f2 02

WPA: set AP RSN IE - hexdump(len=22): 30 14 01 00 00 0f ac 02 01 00 00 0f ac 02 01 00 00 0f ac 02 01 00

WPA: Found the current AP from updated scan results

WPA: Sending EAPOL-Key 4/4

WPA: TX EAPOL-Key - hexdump(len=99): 01 03 00 5f fe 01 09 00 20 00 00 00 00 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 b1 21 7d f0 4d ce 10 dc ae 55 30 7c 5a 73 02 10 00 00

WPA: Installing PTK to the driver.

WPA: RSC - hexdump(len=6): 00 00 00 00 00 00

wpa_driver_madwifi_set_key: alg=TKIP key_idx=0 set_tx=1 seq_len=6 key_len=32

State: 4WAY_HANDSHAKE -> GROUP_HANDSHAKE

RX EAPOL from 00:13:46:bd:0c:d8

RX EAPOL - hexdump(len=131): 01 03 00 7f fe 03 91 00 20 00 00 00 00 00 00 00 03 aa 2d ee e0 51 7e 3e 88 81 cf 62 cf 0b 65 d1 14 c2 88 bc 26 3b 39 f0 b7 01 ff 78 fe 2e 73 39 9d 09 ea f7 0e bf 93 e4 df c3 c0 99 28 6f 29 b3 e6 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 7c 95 84 08 b2 63 be 8e 99 d6 0f 97 18 ed 62 5c 00 20 69 d2 ec 75 54 26 5b 7f c3 dd b9 eb 9b 1d 35 bc 9f 53 6e 61 9c 04 4e fd de f9 a3 c3 03 b2 92 95

IEEE 802.1X RX: version=1 type=3 length=127

  EAPOL-Key type=254

WPA: RX EAPOL-Key - hexdump(len=131): 01 03 00 7f fe 03 91 00 20 00 00 00 00 00 00 00 03 aa 2d ee e0 51 7e 3e 88 81 cf 62 cf 0b 65 d1 14 c2 88 bc 26 3b 39 f0 b7 01 ff 78 fe 2e 73 39 9d 09 ea f7 0e bf 93 e4 df c3 c0 99 28 6f 29 b3 e6 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 7c 95 84 08 b2 63 be 8e 99 d6 0f 97 18 ed 62 5c 00 20 69 d2 ec 75 54 26 5b 7f c3 dd b9 eb 9b 1d 35 bc 9f 53 6e 61 9c 04 4e fd de f9 a3 c3 03 b2 92 95

State: GROUP_HANDSHAKE -> GROUP_HANDSHAKE

WPA: RX message 1 of Group Key Handshake from 00:13:46:bd:0c:d8 (ver=1)

WPA: Group Key - hexdump(len=32): [REMOVED]

WPA: Installing GTK to the driver (keyidx=1 tx=0).

WPA: RSC - hexdump(len=6): 00 00 00 00 00 00

wpa_driver_madwifi_set_key: alg=TKIP key_idx=1 set_tx=0 seq_len=6 key_len=32

WPA: Sending EAPOL-Key 2/2

WPA: TX EAPOL-Key - hexdump(len=99): 01 03 00 5f fe 03 11 00 20 00 00 00 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 cf 2e d8 fa 1e 3e cd fc fe a9 e0 42 b9 6a af 42 00 00

WPA: Key negotiation completed with 00:13:46:bd:0c:d8 [PTK=TKIP GTK=TKIP]

Cancelling authentication timeout

State: GROUP_HANDSHAKE -> COMPLETED

CTRL-EVENT-CONNECTED - Connection to 00:13:46:bd:0c:d8 completed (auth)

EAPOL: External notification - portValid=1

EAPOL: External notification - EAP success=1

EAPOL: SUPP_PAE entering state AUTHENTICATING

EAPOL: SUPP_BE entering state SUCCESS

EAP: EAP entering state DISABLED

EAPOL: SUPP_PAE entering state AUTHENTICATED

EAPOL: SUPP_BE entering state IDLE

EAPOL: startWhen --> 0

Wireless event: cmd=0x8b15 len=20

Wireless event: new AP: 00:00:00:00:00:00

Setting scan request: 0 sec 100000 usec

Added BSSID 00:13:46:bd:0c:d8 into blacklist

State: COMPLETED -> DISCONNECTED

EAPOL: External notification - portEnabled=0

EAPOL: SUPP_PAE entering state DISCONNECTED

EAPOL: SUPP_BE entering state INITIALIZE

EAPOL: External notification - portValid=0

EAPOL: External notification - EAP success=0

CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys

wpa_driver_madwifi_del_key: keyidx=0

wpa_driver_madwifi_del_key: keyidx=1

wpa_driver_madwifi_del_key: keyidx=2

wpa_driver_madwifi_del_key: keyidx=3

wpa_driver_madwifi_del_key: keyidx=0

RTM_NEWLINK, IFLA_IFNAME: Interface 'ath0' added

State: DISCONNECTED -> SCANNING

Trying to associate with SSID 'brown'

Cancelling scan request

WPA: clearing own WPA/RSN IE

Automatic auth_alg selection: 0x1

WPA: No WPA/RSN IE available from association info

WPA: Set cipher suites based on configuration

WPA: Selected cipher suites: group 14 pairwise 8 key_mgmt 2

WPA: clearing AP WPA IE

WPA: clearing AP RSN IE

WPA: using GTK TKIP

WPA: using PTK TKIP

WPA: using KEY_MGMT WPA-PSK

WPA: Set own WPA IE default - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50 f2 02 01 00 00 50 f2 02 01 00 00 50 f2 02

No keys have been configured - skip key clearing

wpa_driver_madwifi_set_drop_unencrypted: enabled=1

State: SCANNING -> ASSOCIATING

wpa_driver_madwifi_associate

Setting authentication timeout: 60 sec 0 usec

EAPOL: External notification - EAP success=0

EAPOL: External notification - EAP fail=0

EAPOL: External notification - portControl=Auto

Wireless event: cmd=0x8b1a len=14

Authentication with 00:00:00:00:00:00 timed out.

Added BSSID 00:00:00:00:00:00 into blacklist

State: ASSOCIATING -> DISCONNECTED

No keys have been configured - skip key clearing

EAPOL: External notification - portEnabled=0

EAPOL: External notification - portValid=0

Setting scan request: 0 sec 0 usec

State: DISCONNECTED -> SCANNING

Trying to associate with SSID 'brown'

Cancelling scan request

WPA: clearing own WPA/RSN IE

Automatic auth_alg selection: 0x1

WPA: No WPA/RSN IE available from association info

WPA: Set cipher suites based on configuration

WPA: Selected cipher suites: group 14 pairwise 8 key_mgmt 2

WPA: clearing AP WPA IE

WPA: clearing AP RSN IE

WPA: using GTK TKIP

WPA: using PTK TKIP

WPA: using KEY_MGMT WPA-PSK

WPA: Set own WPA IE default - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50 f2 02 01 00 00 50 f2 02 01 00 00 50 f2 02

No keys have been configured - skip key clearing

wpa_driver_madwifi_set_drop_unencrypted: enabled=1

State: SCANNING -> ASSOCIATING

wpa_driver_madwifi_associate

Setting authentication timeout: 60 sec 0 usec

EAPOL: External notification - EAP success=0

EAPOL: External notification - EAP fail=0

EAPOL: External notification - portControl=Auto

Wireless event: cmd=0x8b1a len=14

Authentication with 00:00:00:00:00:00 timed out.

BSSID 00:00:00:00:00:00 blacklist count incremented to 2

State: ASSOCIATING -> DISCONNECTED

```

Hopefully I havn't overwhelmed and angered the forum gods with my obscenely large post but I know that being thorough helps in the end.

Thank you for your time.

----------

## forgotten1

This may or may not be related to your connection dropping problems.  I haven't completed the install for my Inspiron 600m yet, and an Intel PRO/Wireless  2915ABG MiniPCI adapter is installed.  So I cannot speak from experience under the Gentoo GNU/Linux environment.  But this I know, I experienced the very same thing with my connection under the windows (tm) environment.  Additionally, my wife's laptop was experiencing the same thing.

So I went about troubleshooting, upgrading drivers, etc.  What I learned in the end, is that it was the router, and NOT the card.  I am using one of those Linksys WRT54GC's.  If I plugged either laptop into the router physically, it remained connected and stayed that way (using DHCP).  I determined that the problem with the wireless connection had to do with DHCP.  So I then set a static IP for each laptop, and bingo, problem resolved.  And just in time, the wife was getting ready to fire me as the Chief Technical Officer of the household.  We haven't had any problems since then, and it connects within seconds.

Hope this helps.

----------

## infecticide

That is nodought something I will look into but the issue here is the connection failing (not so terrible, it is wireless after all) and not reassociating.

----------

## forgotten1

That was the exact same issue we were having.  The connection would fail, sometimes it would reconnect, other times it would not.  If I ran to the basement and restarted the router, it would reconnect.  Then it would be ok for a time, then the problem would start again.  

I deduced through much time and effort that DHCP over wireless (using encryption) creates problems.  If I disable the encryption, then 'voila' no problem, except now all traffic would be available for knowledgeable eyes to see.  Keep in mind these were two laptops running windows (tm).  And like I said, I haven't finished installing Gentoo on mine, but I expect I'll have to set a static IP for the wireless connection, just as I have to do in windows.

----------

## infecticide

Does anyone know what the INIT scripts are looking for in the program output to concider the service "successfully started" and where I would find the file that determines that?

----------

