Bug#471905: wpasupplicant: Wpasupplicant works only good if I start it with low Priority

15 views
Skip to first unread message

Gregor Adamczyk

unread,
Mar 20, 2008, 8:10:08 PM3/20/08
to
Package: wpasupplicant
Version: 0.6.3-1
Severity: important

Hi, if I start or configure wpasupplicant with normal priority, it is not possible to establish
the WPA2 or WPA connection.

But a simple nice -10 in pre-up solve the problem completely.

The problem exists only in the daemon mode.

In debug mode I didn't have any problems.

Here is my temporary solve (work perfekt):

/etc/network/interfaces

allow-hotplug wlan0
iface wlan0 inet dhcp
pre-up nice -19 wpa_supplicant -B -i wlan0 -c "/etc/wpa_supplicant/wpa_supplicant.conf" -D wext;
sleep 10;
post-down killall -q dhclient wpa_supplicant;

I worked at thy moment with ndiswrapper and the wext driver.

I test it on three different systems with stable, testing and unstable version of wpasupplicant.

Two slow systems haves the problem. (ndiswrapper WG111v3)

One new system with kernel rtl8187 driver works fine without any hotfixes.

Here is the udev rule from the worked system without any hotfixes:
# USB device 0bda:8187 (rtl8187)
SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:15:af:04:ac:37", ATTR{type}=="1", NAME="wlan0"

For this both systems i need the "nice" low priority.
# USB device 0846:4260 (ndiswrapper)
SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:1b:2f:d2:94:e8", ATTR{type}=="1", NAME="wlan0"

# USB device 0846:4260 (ndiswrapper)
SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:1b:2f:d2:94:f1", ATTR{type}=="1", NAME="wlan0"


-- System Information:
Debian Release: lenny/sid
APT prefers testing
APT policy: (700, 'testing'), (40, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.24-1-686 (SMP w/1 CPU core)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages wpasupplicant depends on:
ii adduser 3.106 add and remove users and groups
ii libc6 2.7-6 GNU C Library: Shared libraries
ii libdbus-1-3 1.1.2-1 simple interprocess messaging syst
ii libpcsclite1 1.4.99-2 Middleware to access a smart card
ii libreadline5 5.2-3 GNU readline and history libraries
ii libssl0.9.8 0.9.8g-4 SSL shared libraries
ii lsb-base 3.1-24 Linux Standard Base 3.1 init scrip

wpasupplicant recommends no packages.

-- no debconf information

--
To UNSUBSCRIBE, email to debian-bugs-...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org

Kel Modderman

unread,
Mar 20, 2008, 9:40:10 PM3/20/08
to
On Friday 21 March 2008 09:57:15 Gregor Adamczyk wrote:
> Package: wpasupplicant
> Version: 0.6.3-1
> Severity: important
>
> Hi, if I start or configure wpasupplicant with normal priority, it is not possible to establish
> the WPA2 or WPA connection.

Show the failing configuration.

Thanks.

Gregor Adamczyk

unread,
Mar 21, 2008, 2:30:16 AM3/21/08
to
> Show the failing configuration.
>
> Thanks.


The same config without the "nice" fails.

/etc/network/interfaces:

allow-hotplug wlan0
iface wlan0 inet dhcp

pre-up wpa_supplicant -B -i wlan0 -c

"/etc/wpa_supplicant/wpa_supplicant.conf" -D wext; sleep 10;
post-down killall -q dhclient wpa_supplicant;

I can reproduce this.
If I delete only the nice in the pre-up it is much more difficult to
establish a connection.

I test it with:
ifdown wlan0
ifup wlan0

with the low priority of wpa_supplicant, dhcp works very fast and
becomes every time an IP.
with normal priority, dhclient starts but fails very often.

Gregor Adamczyk

unread,
Mar 21, 2008, 2:50:07 AM3/21/08
to
I spend much time to sole the problem, I tested more than one configuration.

A test with here described configuration methods:
/usr/share/doc/wpasupplicant/README.modes.gz

like (psk is not true in this example):

allow-hotplug wlan0
iface wlan0 inet dhcp

wpa-driver wext
wpa-ssid netkult
wpa-psk
000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f

or

iface wlan0 inet dhcp
wpa-driver wext
wpa-ssid netkult
wpa-psk
000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f
auto wlan0

if I start the interface with:

ifup wlan0

I don't become an IP.

I try again with manual dhcp test:

killall dhclient
dhclient wlan0

Wait wait wait

After this I "renice" the deamon of wpa-supplicant with htop.

dhclient wlan0 works directly.

After some other tests I write the pre-up config.

Gregor Adamczyk

unread,
Mar 21, 2008, 2:50:10 AM3/21/08
to
Can you tell me for this example, in witch script on witch position I
can write my "nice" to start wpa-supplicant directly in low priority?


allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-driver wext
wpa-ssid netkult
wpa-psk
000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f


I change in my tests:
/etc/wpa_supplicant/functions.sh

the line to
WPA_SUP_BIN="nice -10 /sbin/wpa_supplicant"

but this is maybe not correct, and wpa_supplicant doesn't start anymore.

I change it back to original and write the per-up line in
/etc/networking/interfaces

Gregor Adamczyk

unread,
Mar 21, 2008, 1:20:05 PM3/21/08
to
modification
/etc/wpa_supplicant/functions.sh

line: 260 add --nicelevel 19:

start-stop-daemon --start --nicelevel 19 --oknodo $DAEMON_VERBOSITY \
--name $WPA_SUP_PNAME --startas $WPA_SUP_BIN --pidfile
$WPA_SUP_PIDFILE \
-- $WPA_SUP_OPTIONS $WPA_SUP_CONF


now is the problem for me completely solved.

I can use the preferred configuration in /etc/network/interfaces

allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-driver wext
wpa-ssid netkult
wpa-psk
000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f

and it works perfectly !

Kel Modderman

unread,
Mar 25, 2008, 9:30:16 PM3/25/08
to
tags 471905 moreinfo help
thanks

On Friday 21 March 2008 16:08:09 Gregor Adamczyk wrote:
> Kel Modderman schrieb:


> > On Friday 21 March 2008 09:57:15 Gregor Adamczyk wrote:
> >
> >> Package: wpasupplicant
> >> Version: 0.6.3-1
> >> Severity: important
> >>
> >> Hi, if I start or configure wpasupplicant with normal priority, it is not possible to establish
> >> the WPA2 or WPA connection.
> >>
> >
> > Show the failing configuration.
> >
> > Thanks.
> >
> >
> >
>

> The same config without the "nice" fails.
>

> /etc/network/interfaces:
>
> allow-hotplug wlan0
> iface wlan0 inet dhcp

> pre-up wpa_supplicant -B -i wlan0 -c

> "/etc/wpa_supplicant/wpa_supplicant.conf" -D wext; sleep 10;
> post-down killall -q dhclient wpa_supplicant;
>

> I can reproduce this.
> If I delete only the nice in the pre-up it is much more difficult to
> establish a connection.
>
> I test it with:
> ifdown wlan0
> ifup wlan0
>
> with the low priority of wpa_supplicant, dhcp works very fast and
> becomes every time an IP.
> with normal priority, dhclient starts but fails very often.

I cannot reproduce this on a variety of hardware, and I have no way of
guessing of what it could possibly be.

Does anyone else have any ideas?

Thanks, Kel.

Stefan Lippers-Hollmann

unread,
May 22, 2012, 8:50:02 PM5/22/12
to
tags 471905 + moreinfo
thanks

Hi

On Wednesday 23 May 2012, Gregor Adamczyk wrote:
> Package: wpasupplicant
> Version: 0.6.3-1
> Severity: important
>
> Hi, if I start or configure wpasupplicant with normal priority, it is not possible to establish
> the WPA2 or WPA connection.
>
> But a simple nice -10 in pre-up solve the problem completely.
>
> The problem exists only in the daemon mode.
>
> In debug mode I didn't have any problems.
>
> Here is my temporary solve (work perfekt):
>
> /etc/network/interfaces
>
> allow-hotplug wlan0
> iface wlan0 inet dhcp
> pre-up nice -19 wpa_supplicant -B -i wlan0 -c "/etc/wpa_supplicant/wpa_supplicant.conf" -D wext;
> sleep 10;
> post-down killall -q dhclient wpa_supplicant;
>
> I worked at thy moment with ndiswrapper and the wext driver.
[…]

Is this still a problem for you?

Looking through the bugreport and the involved source, I strongly
suggest that this is a ndiswrapper problem, rather than a bug in
wpasupplicant (the kernel module really needs to accept commands in
order), but before reassigning, I'd like to reconfirm that this is
still open.

Regards
Stefan Lippers-Hollmann
signature.asc
Reply all
Reply to author
Forward
0 new messages