You are not logged in.

#1 2006-02-27 19:16:31

iggy
Member
From: Germany, L.E. - Leipzig
Registered: 2004-10-17
Posts: 367

ipw2200 and wpa_supplicant (wpa-psk)

hello!

i have a big problem. yesterday i tried to run my wireless lan with wpa-psk. after a search through the forum and wiki i finally get it to work.

today i tried wifi-radar. but it cannot connect, i think because of wpa-psk.

so i want to start my network via the network-deamon. but now there is an error: after /etc/rc.d/network start, i choose my profile and then:

:: Starting network profile: wlan_home       [BUSY]
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory

i reinstalled wpa_supplicant - same problem.
kernel: 2.6.15.4-2
wpa_supplicant: 0.4.7-2

lsmod | grep ipw
ipw2200 106156 0
ieee80211 31944 1 ipw2200

my wpa-config:

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
eapol_version=1
ap_scan=1

network={
    ssid="funkemariechen"
    proto=WPA
    key_mgmt=WPA-PSK
    pairwise=TKIP
    group=TKIP CCMP
    #psk="..." <-- ASCII
    psk="..."
    priority=10
}

my network-profile:

#
# Network Profile
#

DESCRIPTION="wireless-lan @home"

# Network Settings
INTERFACE=eth1
HOSTNAME=laptop

# Interface Settings (use IFOPTS="dhcp" for DHCP)
IFOPTS="dhcp"
GATEWAY=

# DNS Settings (optional)
DOMAIN=localdomain
DNS1=
DNS2=

# Wireless Settings (optional)
ESSID="funkemariechen"
#KEY="..."
IWOPTS="mode managed essid $ESSID channel 6" #key restricted $KEY

#WIFI_INTERFACE=wlan0   # use this if you have a special wireless interface
                        # that is linked to the real $INTERFACE

#WIFI_WAIT=5            # seconds to wait for the wireless card to
                        # associate before bringing the interface up

USEWPA="yes"           # start wpa_supplicant with the profile

# use "" for normal operation or specify additional
# options (eg, "-D ipw")
# see /etc/wpa_supplicant.conf for configuration
WPAOPTS="-ieth1 -Dwext -Bw -c/etc/wpa_supplicant.conf"

another problem was: with wpa-psk starting the network fails often. i had to restart it a few times. what is that?

plz help me...

thanks iggy


sorry for my bad english smile

Offline

#2 2006-02-28 00:17:53

phydeaux
Member
Registered: 2005-06-13
Posts: 68

Re: ipw2200 and wpa_supplicant (wpa-psk)

Have you tired starting wpa_supplicant manually?  Boot with out stating the network profile then use the info in the wiki to start it up manually.  Turn on the debugging and see if you can get any information from it.  If not post it up here and we'll try to figure it out.

andy

Offline

#3 2006-02-28 16:49:24

iggy
Member
From: Germany, L.E. - Leipzig
Registered: 2004-10-17
Posts: 367

Re: ipw2200 and wpa_supplicant (wpa-psk)

plz help. i need a step by step description how to realize what you mean. i tried to start it manually but there a no error messages and wlan don't work.  sad

here some lines out of my everything.log (frok inserting module up to start the network via "network start")

Feb 28 17:57:36 laptop ACPI: PCI interrupt for device 0000:01:04.0 disabled
Feb 28 17:57:36 laptop ieee80211_crypt: unregistered algorithm 'NULL'
Feb 28 17:57:37 laptop ieee80211_crypt: registered algorithm 'NULL'
Feb 28 17:57:37 laptop ieee80211: 802.11 data/management/control stack, git-1.1.7
Feb 28 17:57:37 laptop ieee80211: Copyright (C) 2004-2005 Intel Corporation <jketreno@linux.intel.com>
Feb 28 17:57:37 laptop ipw2200: Intel(R) PRO/Wireless 2200/2915 Network Driver, git-1.0.8
Feb 28 17:57:37 laptop ipw2200: Copyright(c) 2003-2005 Intel Corporation
Feb 28 17:57:37 laptop ACPI: PCI Interrupt 0000:01:04.0[A] -> GSI 18 (level, low) -> IRQ 18
Feb 28 17:57:37 laptop ipw2200: Detected Intel PRO/Wireless 2200BG Network Connection
Feb 28 17:58:04 laptop eth1: NETDEV_TX_BUSY returned; driver should report queue full via ieee_device->is_queue_full.
Feb 28 17:58:15 laptop eth1: no IPv6 routers present

sorry for my bad english smile

Offline

#4 2006-03-01 17:57:57

phydeaux
Member
Registered: 2005-06-13
Posts: 68

Re: ipw2200 and wpa_supplicant (wpa-psk)

Follow the steps here to start it manually:
http://wiki.archlinux.org/index.php/Wpa … e_Shooting

Though one thing I see right away is a problem with your WPAOPTS=.  You only need to specify the proper driver here.  The line in the script looks like this

wpa_supplicant -wB -i $WIFI_INTERFACE -c /etc/wpa_supplicant.conf $WPAOPTS

The script is able to figure out your interface name from the netowrk profiel.  ($WIFI_INTERFACE = $INTERFACE unless you specify something difernt for WIFI_INTERFACE=).  The -wB are hard coded because you will always want the program to wait for the interface and run in the background when its started from the initscritps.  The path to the configuration file is hard coded because that is where it installs from the arch path and since it can handle multiple networks I saw no reason not to do it that way at the time.

I didn't notice that error the first time I looked at it.  Trim your wapopts down to WPAOPTS="-Dwext" and give it a shot.  The rest of the configs look good.

andy

Offline

#5 2006-03-02 12:23:14

lanrat
Member
From: Poland
Registered: 2003-10-28
Posts: 1,274

Re: ipw2200 and wpa_supplicant (wpa-psk)

WPA with AES (ccmp) timeouts happen to me too sometimes. I increased wait time (a loop 10 x 2 sec. sleep -> 20 x 2 sec.) in the netcfg script.
So far so good but I'm still testing this.

Offline

#6 2006-03-04 15:58:03

iggy
Member
From: Germany, L.E. - Leipzig
Registered: 2004-10-17
Posts: 367

Re: ipw2200 and wpa_supplicant (wpa-psk)

@phydeaux: thank you! triming my wpaopts down worked. no more errors. i also changed the psk-option in the wpa_supplicant to the ascii-string, instead of the hex-string. wink

but the problem, that it sometimes connects and sometimes not (time out?) is still there.

thanks @all
mfg iggy


sorry for my bad english smile

Offline

#7 2006-03-04 19:50:55

lanrat
Member
From: Poland
Registered: 2003-10-28
Posts: 1,274

Re: ipw2200 and wpa_supplicant (wpa-psk)

Does changing /usr/bin/netcfg around the line no 124 from:

if [ $i -gt 10 ]; then

to

if [ $i -gt 20 ]; then

help you ? It seems to work for me but I need more time to be sure.
This is the wpa timeout part and sometimes during boot the standard value is not enough.
You can add before this line something like this:

wpa_cli status | grep "wpa_state"

to be sure that this is your problem too.

Offline

#8 2006-03-04 21:32:26

phydeaux
Member
Registered: 2005-06-13
Posts: 68

Re: ipw2200 and wpa_supplicant (wpa-psk)

The code that tries to detect if wpa_supplicant connected etc is kind of a hack.  I ripped it right from phracture's wireless scripts and wrote a patch to intergrate it into the arch network profiles when the profiles rolled out.  He inturn had ripped it from another previous script iirc.  Unfortunately wpa_supplicant keeps retrying if it fails to connect so it's very hard to determine if its failed or not with a script, since the retry looks exactly like the first try.  The value I used was the original default and is about 2x as long as it takes my laptop to connect to my psk network.  It worked fine for me and I had never heard compalints about it so I just left it be.  From this post I'd bet it'd be a good idea to make the timeout value configurable from the network profile similar to what they did with wifiwait.  I'll get to work on a new patch and submit it as a bug, lets hope they devs incorperate this one too.  An easy way to tell if it is the timeout value is to start it manually.  Since it won't be run from the script if. 

By the way, just for the record the actuall time out time works out to be 24 seconds, 2 second inital wait, then 2 seconds aditional for each of 11 passes through the loop.  Changing 10 to 20 brings the timeout up to 44 seconds.  A value of 28 would make the wait 1 minute.  I'll clean up the algorithm when I make it adjustable so you can actually specify the timeout in seconds.

andy

Offline

#9 2006-03-05 10:10:28

lanrat
Member
From: Poland
Registered: 2003-10-28
Posts: 1,274

Re: ipw2200 and wpa_supplicant (wpa-psk)

Thanks for your work and for the explanation. This is how it looks when I add wpa_status check inside the loop:

/etc/rc.d/network restart
:: Shutting down interface: eth1                                                                                                                                                                      [DONE] 
:: Stopping Network                                                                                                                                                                                   [DONE] 
:: Starting network profile: wireless                                                                                                                                                                  [BUSY] 
wpa_state=SCANNING
wpa_state=DISCONNECTED
wpa_state=DISCONNECTED
wpa_state=DISCONNECTED
wpa_state=DISCONNECTED
wpa_state=DISCONNECTED
wpa_state=SCANNING
wpa_state=SCANNING
                                                                                                                                                                                                      [DONE] 
:: Starting Network                                                                                                                                                                                   [DONE]

The standard timeout value works fine when I restart network from the CLI (99%). But during boot there is 50-60% chance that it will fail. It probably depends on the system configuration (loaded modules, daemons etc.), wireless router config (wpa2, G mode only etc.) and system load during boot. Assuming of course that my wireless profile is correct :-)

Offline

#10 2006-03-10 20:36:03

phydeaux
Member
Registered: 2005-06-13
Posts: 68

Re: ipw2200 and wpa_supplicant (wpa-psk)

Patch and bug have been submitted as promised.  The patch and more info can be found here: http://bugs.archlinux.org/task/4140

Offline

#11 2006-03-10 21:05:34

lanrat
Member
From: Poland
Registered: 2003-10-28
Posts: 1,274

Re: ipw2200 and wpa_supplicant (wpa-psk)

Tnx. I added my comment.

Offline

#12 2006-04-27 22:58:27

curana
Member
From: Switzerland
Registered: 2006-04-14
Posts: 97
Website

Re: ipw2200 and wpa_supplicant (wpa-psk)

@Tech-Man: Why do you use "-Dwext" for your device as you have the ipw2200 card installed? I was thinking that "-Dipw" (or similar) would be the correct device?!
Maybe this is my problem then in my WPA-configuration...

Offline

#13 2006-04-28 07:13:08

Arkamririon
Member
From: Germany
Registered: 2005-12-27
Posts: 35

Re: ipw2200 and wpa_supplicant (wpa-psk)

-Dwext is correct for the ipw2200, took me some hours when i set up my wlan because i thought it would be -Diwp, too.

Offline

#14 2006-04-28 08:11:37

curana
Member
From: Switzerland
Registered: 2006-04-14
Posts: 97
Website

Re: ipw2200 and wpa_supplicant (wpa-psk)

Yes, that was the mistake. I dont know why I thought it was ipw....ah, in the profile sample it says "ipw" so I thought...anyway, now it works.

Offline

Board footer

Powered by FluxBB