Bug 144622 - NetworkManager: WPA does not work with madwifi
Summary: NetworkManager: WPA does not work with madwifi
Status: RESOLVED FIXED
Alias: None
Product: SUSE Linux 10.1
Classification: openSUSE
Component: Network (show other bugs)
Version: Beta 1
Hardware: Other Other
: P5 - None : Critical (vote)
Target Milestone: Beta 4
Assignee: Robert Love
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-21 17:31 UTC by Andreas Jaeger
Modified: 2006-02-01 18:29 UTC (History)
1 user (show)

See Also:
Found By: Other
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
nm-scan-ssid.patch (by jg@suse.de) (929 bytes, text/plain)
2006-01-27 20:59 UTC, Christoph Thiel
Details
nm-use-madwifi-wpa-driver-rml.patch (jg?) (889 bytes, text/x-patch)
2006-01-27 21:01 UTC, Christoph Thiel
Details
Screenshot for previous comment (31.76 KB, image/png)
2006-01-28 10:12 UTC, Andreas Jaeger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Jaeger 2006-01-21 17:31:12 UTC
I tried to get NetworkManager working with my Atheros based laptop at home.

The "old" network scripts work fine and ifconfig ath0 shows:
ath0 is up
4: ath0: <BROADCAST,MULTICAST,NOTRAILERS,UP> mtu 1500 qdisc noqueue
    link/ether 00:05:4e:4e:55:50 brd ff:ff:ff:ff:ff:ff
    inet 192.168.27.14/24 brd 192.168.27.255 scope global ath0
    inet6 fe80::205:4eff:fe4e:5550/64 scope link
       valid_lft forever preferred_lft forever
    ath0      IP address: 192.168.27.14/24
Configured routes for interface ath0:
  169.254.0.0 - 255.255.0.0 ath0
Active routes for interface ath0:
  192.168.27.0/24  proto kernel  scope link  src 192.168.27.14
  169.254.0.0/16  scope link
  default via 192.168.27.3
1 of 1 configured routes for interface ath0 up
bssid=00:12:17:dd:c0:ce
ssid=Die AJs
pairwise_cipher=CCMP
group_cipher=TKIP
key_mgmt=WPA2-PSK
wpa_state=COMPLETED
ip_address=192.168.27.14

I've used both the BETA1 NetworkManager/NetworkManager-kde packages as well as the newly submitted packages.  I just could not get it working :-(

From /var/log/messages:

Jan 21 18:14:00 x40 NetworkManager: <information>       Activation (ath0) Stage 2 (
Device Configure) complete.
Jan 21 18:14:25 x40 su: (to root) aj on /dev/pts/5
Jan 21 18:14:31 x40 ifstatus: Network interface is managed from NetworkManager
Jan 21 18:14:31 x40 ifstatus: ath0 is up
Jan 21 18:14:31 x40 ifstatus: 4: ath0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500
 qdisc noqueue
Jan 21 18:14:31 x40 ifstatus:     link/ether 00:05:4e:4e:55:50 brd ff:ff:ff:ff:ff:f
f
Jan 21 18:14:31 x40 ifstatus:
Jan 21 18:15:30 x40 NetworkManager: <information>       Activation (ath0/wireless):
 association took too long (>90s), failing activation.
Jan 21 18:15:30 x40 NetworkManager: <information>       Activation (ath0) failure s
cheduled...
Jan 21 18:15:30 x40 NetworkManager: <information>       Activation (ath0) failed fo
r access point (Die AJs)
Jan 21 18:15:30 x40 NetworkManager: <information>       Activation (ath0) failed.
Jan 21 18:15:30 x40 NetworkManager: <information>       Deactivating device ath0.

Is there anything I can do to debug this?
Comment 1 Forgotten User ZhJd0F0L3x 2006-01-21 19:02:58 UTC
NM does not yet allow a different cipher type for "pairwise" and "group".

Since your access point is configured for "mixed mode" - e.g. you can use both TKIP and CCMP; this can not work. You can try the "use WPA2" and "TKIP" combination in nm-applet, this should work.

Basically, this is also a duplicate of bug #114624
Comment 2 Timo Hoenig 2006-01-21 19:04:29 UTC
Does NM survive the connection or does it crash?

There have been reports with ESSIDs containing spaces.  Could you please give it a try with an ESSID without spaces?
Comment 3 Forgotten User ZhJd0F0L3x 2006-01-21 19:09:30 UTC
it cannot work in mixed mode AFAIK. I have TKIP only here, so i cannot verify, but i have no reports that this has been fixed.
Comment 4 Timo Hoenig 2006-01-21 19:12:10 UTC
I'd like to know whether ESSIDs with spaces are causing troubles anyway ;-)
Comment 5 Andreas Jaeger 2006-01-21 20:23:40 UTC
Changed my setup to not use spaces in the ESSID:
bssid=00:12:17:dd:c0:ce
ssid=DieAJs
pairwise_cipher=CCMP
group_cipher=CCMP
key_mgmt=WPA2-PSK
wpa_state=COMPLETED

Still nothing works with NetworkManager.

/var/log/messages shows:
an 21 21:19:06 x40 NetworkManager: <information>       Activation (ath0) Stage 2 (
Device Configure) complete.
Jan 21 21:20:36 x40 NetworkManager: <information>       Activation (ath0/wireless):
 association took too long (>90s), failing activation.
Jan 21 21:20:36 x40 NetworkManager: <information>       Activation (ath0) failure scheduled...
Jan 21 21:20:36 x40 NetworkManager: <information>       Activation (ath0) failed for access point (DieAJs)
Comment 6 Andreas Jaeger 2006-01-22 05:58:06 UTC
Btw. NetworkManager did not crash with the spaces.
Comment 7 Forgotten User ZhJd0F0L3x 2006-01-22 14:58:05 UTC
(In reply to comment #5)
> Changed my setup to not use spaces in the ESSID:
> bssid=00:12:17:dd:c0:ce
> ssid=DieAJs
> pairwise_cipher=CCMP
> group_cipher=CCMP
> key_mgmt=WPA2-PSK
> wpa_state=COMPLETED

for this setup, you need to check the "WPA2" checkbox and select "CCMP" encryption. Now your access point is no longer in mixed mode, so it should work.

> Still nothing works with NetworkManager.
> 
> /var/log/messages shows:
> an 21 21:19:06 x40 NetworkManager: <information>       Activation (ath0) Stage
> 2 (
> Device Configure) complete.
> Jan 21 21:20:36 x40 NetworkManager: <information>       Activation
> (ath0/wireless):
>  association took too long (>90s), failing activation.

we need the lines before those, especially those with 
"SUP: sending command" (remove the "SET_NETWORK 0 psk ..." line ;-)
Comment 8 Andreas Jaeger 2006-01-22 17:20:07 UTC
Here it comes, hope this helps.  Btw. I used WPA2/CCMP.

Jan 21 21:18:48 x40 NetworkManager: <information>       Device ath0 activation scheduled...
Jan 21 21:18:48 x40 NetworkManager: <information>       Activation (ath0) started...
Jan 21 21:18:48 x40 NetworkManager: <information>       Activation (ath0) Stage 1 (Device Prepare) scheduled..
.
Jan 21 21:18:48 x40 NetworkManager: <information>       Activation (ath0) Stage 1 (Device Prepare) started...
Jan 21 21:18:48 x40 NetworkManager: <information>       Activation (ath0) Stage 2 (Device Configure) scheduled
...
Jan 21 21:18:48 x40 NetworkManager: <information>       Activation (ath0) Stage 1 (Device Prepare) complete.
Jan 21 21:18:48 x40 NetworkManager: <information>       Activation (ath0) Stage 2 (Device Configure) starting.
..
Jan 21 21:18:48 x40 NetworkManager: <information>       Activation (ath0/wireless): access point 'DieAJs' is e
ncrypted, but NO valid key exists.  New key needed.
Jan 21 21:18:48 x40 NetworkManager: <information>       Activation (ath0) New wireless user key requested for
network 'DieAJs'.
Jan 21 21:18:48 x40 NetworkManager: <information>       Activation (ath0) Stage 2 (Device Configure) complete.
Jan 21 21:19:05 x40 NetworkManager: <information>       Activation (ath0) New wireless user key for network 'D
ieAJs' received.
Jan 21 21:19:05 x40 NetworkManager: <information>       Activation (ath0) Stage 1 (Device Prepare) scheduled..
.
Jan 21 21:19:05 x40 NetworkManager: <information>       Activation (ath0) Stage 1 (Device Prepare) started...
Jan 21 21:19:05 x40 NetworkManager: <information>       Activation (ath0) Stage 2 (Device Configure) scheduled
...
Jan 21 21:19:05 x40 NetworkManager: <information>       Activation (ath0) Stage 1 (Device Prepare) complete.
Jan 21 21:19:05 x40 NetworkManager: <information>       Activation (ath0) Stage 2 (Device Configure) starting.
..
Jan 21 21:19:05 x40 NetworkManager: <information>       Activation (ath0/wireless): access point 'DieAJs' is e
ncrypted, and a key exists.  No new key needed.
Jan 21 21:19:06 x40 NetworkManager: <information>       SUP: sending command 'INTERFACE_ADD ath0
        wext    /var/run/wpa_supplicant '
Jan 21 21:19:06 x40 NetworkManager: <information>       SUP: response was 'OK'
Jan 21 21:19:06 x40 NetworkManager: <information>       SUP: sending command 'AP_SCAN 2'
Jan 21 21:19:06 x40 NetworkManager: <information>       SUP: response was 'OK'
Jan 21 21:19:06 x40 NetworkManager: <information>       SUP: sending command 'ADD_NETWORK'
Jan 21 21:19:06 x40 NetworkManager: <information>       SUP: response was '0 '
Jan 21 21:19:06 x40 NetworkManager: <information>       SUP: sending command 'SET_NETWORK 0 ssid "DieAJs"'
Jan 21 21:19:06 x40 NetworkManager: <information>       SUP: response was 'OK'
Jan 21 21:19:06 x40 NetworkManager: <information>       SUP: sending command 'SET_NETWORK 0 proto WPA2'
Jan 21 21:19:06 x40 NetworkManager: <information>       SUP: response was 'OK'
Jan 21 21:19:06 x40 NetworkManager: <information>       SUP: sending command 'SET_NETWORK 0 key_mgmt WPA-PSK'
Jan 21 21:19:06 x40 NetworkManager: <information>       SUP: response was 'OK'
Jan 21 21:19:06 x40 NetworkManager: <information>       SUP: sending command 'SET_NETWORK 0 psk [...]
Jan 21 21:19:06 x40 NetworkManager: <information>       SUP: response was 'OK'
Jan 21 21:19:06 x40 NetworkManager: <information>       SUP: sending command 'SET_NETWORK 0 pairwise CCMP'
Jan 21 21:19:06 x40 NetworkManager: <information>       SUP: response was 'OK'
Jan 21 21:19:06 x40 NetworkManager: <information>       SUP: sending command 'SET_NETWORK 0 group CCMP'
Jan 21 21:19:06 x40 NetworkManager: <information>       SUP: response was 'OK'
Jan 21 21:19:06 x40 NetworkManager: <information>       SUP: sending command 'ENABLE_NETWORK 0'
Jan 21 21:19:06 x40 NetworkManager: <information>       SUP: response was 'OK'
Jan 21 21:19:06 x40 NetworkManager: <information>       Activation (ath0) Stage 2 (Device Configure) complete.
Jan 21 21:20:36 x40 NetworkManager: <information>       Activation (ath0/wireless): association took too long
(>90s), failing activation.
Jan 21 21:20:36 x40 NetworkManager: <information>       Activation (ath0) failure scheduled...
Jan 21 21:20:36 x40 NetworkManager: <information>       Activation (ath0) failed for access point (DieAJs)
Jan 21 21:20:36 x40 NetworkManager: <information>       Activation (ath0) failed.
Jan 21 21:20:36 x40 NetworkManager: <information>       Deactivating device ath0.
Jan 21 21:20:36 x40 NetworkManager: <information>       Stopping ypbind.
Jan 21 21:20:36 x40 NetworkManager: <information>       Restarting autofs.
Jan 21 21:20:43 x40 klogd: ADDRCONF(NETDEV_UP): ath0: link is not ready
Comment 9 Forgotten User ZhJd0F0L3x 2006-01-22 17:46:46 UTC
"grep 'SUP:' /var/log/messages"

You did use nm-applet, did you?

does nm-tool show anything useful?
Comment 10 Andreas Jaeger 2006-01-22 18:45:35 UTC
Yes, I used nm-applet, will do another test now and report back in a few minutes.
Comment 11 Andreas Jaeger 2006-01-22 19:03:05 UTC
wpa_cli shows:
<2>Authentication with 00:00:00:00:00:00 timed out.
<2>Trying to associate with SSID 'Die AJs'
<2>Association request to the driver failed
<2>Authentication with 00:00:00:00:00:00 timed out.
<2>Trying to associate with SSID 'Die AJs'
<2>Association request to the driver failed
<2>CTRL-EVENT-TERMINATING - signal 15 received

> nm-tool

NetworkManager Tool

State: connecting

- Device: eth0 ----------------------------------------------------------------
  NM Path:           /org/freedesktop/NetworkManager/Devices/eth0
  Type:              Wired
  Active:            no
  HW Address:        00:0A:E4:2E:E1:99

  Capabilities:
    Supported:       yes
    Carrier Detect:  yes

  Wired Settings
    Hardware Link:   no

- Device: ath0 ----------------------------------------------------------------
  NM Path:           /org/freedesktop/NetworkManager/Devices/ath0
  Type:              802.11 Wireless
  Active:            yes
  HW Address:        00:05:4E:4E:55:50

  Capabilities:
    Supported:       yes

  Wireless Settings
    Scanning:        yes
    WEP Encryption:  yes
    WPA Encryption:  yes
    WPA2 Encryption: yes

  Wireless Networks (* = Current Network)
    Undertaker:      Infrastructure Mode, Freq 2.437 MHz, Strength 54%, Encrypte
d (WPA)
    *Die AJs:        Infrastructure Mode, Freq 2.462 MHz, Strength 78%, Encrypte
d (WPA2)

  IP Settings:
    IP Address:      0.0.0.0
    Subnet Mask:     0.0.0.0
    Broadcast:       0.0.0.0
    Gateway:         0.0.0.0
    Primary DNS:     0.0.0.0
    Secondary DNS:   0.0.0.0


Jan 22 19:53:58 x40 NetworkManager: <information>       SUP: sending command 'INTERFACE_ADD ath0                wext    /var/run/wpa_supplicant '
Jan 22 19:53:58 x40 NetworkManager: <information>       SUP: response was 'OK'
Jan 22 19:53:58 x40 NetworkManager: <information>       SUP: sending command 'AP_SCAN 2'
Jan 22 19:53:58 x40 NetworkManager: <information>       SUP: response was 'OK'
Jan 22 19:53:58 x40 NetworkManager: <information>       SUP: sending command 'ADD_NETWORK'
Jan 22 19:53:58 x40 NetworkManager: <information>       SUP: response was '0 '
Jan 22 19:53:58 x40 NetworkManager: <information>       SUP: sending command 'SET_NETWORK 0 ssid "Die AJs"'
Jan 22 19:53:58 x40 NetworkManager: <information>       SUP: response was 'OK'
Jan 22 19:53:58 x40 NetworkManager: <information>       SUP: sending command 'SET_NETWORK 0 proto WPA2'
Jan 22 19:53:58 x40 NetworkManager: <information>       SUP: response was 'OK'
Jan 22 19:53:58 x40 NetworkManager: <information>       SUP: sending command 'SET_NETWORK 0 key_mgmt WPA-PSK'
Jan 22 19:53:58 x40 NetworkManager: <information>       SUP: response was 'OK'
Jan 22 19:53:58 x40 NetworkManager: <information>       SUP: sending command 'SET_NETWORK 0 psk [...]'
Jan 22 19:53:58 x40 NetworkManager: <information>       SUP: response was 'OK'
Jan 22 19:53:58 x40 NetworkManager: <information>       SUP: sending command 'SET_NETWORK 0 pairwise CCMP'
Jan 22 19:53:58 x40 NetworkManager: <information>       SUP: response was 'OK'
Jan 22 19:53:58 x40 NetworkManager: <information>       SUP: sending command 'SET_NETWORK 0 group CCMP'
Jan 22 19:53:58 x40 NetworkManager: <information>       SUP: response was 'OK'
Jan 22 19:53:58 x40 NetworkManager: <information>       SUP: sending command 'ENABLE_NETWORK 0'
Comment 12 Robert Love 2006-01-23 17:08:45 UTC
The problem is the

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

line.  The madwifi-ng driver is not sending the AP's BSSID to user-space.  wpa_supplicant waits for this event and sends that message if it does not receive it within 90s.

I'll investigate a fix. 
Comment 13 Joachim Gleissner 2006-01-27 20:01:47 UTC
It seems that NetworkManager does not set scan_ssid=1, which is necessary for connections to hidden APs. And it also sets AP scan mode 2, which seems to be problematic with madwifi. I've prepared a modified NM package for testing: /work/built/mbuild/gaspode-jg-3/
Comment 14 Christoph Thiel 2006-01-27 20:44:55 UTC
Very well done Joachim! I just gave your updated package a try and it worked!

# wpa_cli status
Selected interface 'ath0'
bssid=00:15:0c:14:66:3c
ssid=onenet
pairwise_cipher=CCMP
group_cipher=CCMP
key_mgmt=WPA2-PSK
wpa_state=COMPLETED
ip_address=192.168.178.21
#
Comment 15 Robert Love 2006-01-27 20:49:05 UTC
jg, you are a star!

AJ, can you confirm that this now works?

If so, need to see what jg changed and make sure the changes don't break other cards.
Comment 16 Christoph Thiel 2006-01-27 20:59:46 UTC
Created attachment 65524 [details]
nm-scan-ssid.patch (by jg@suse.de)
Comment 17 Christoph Thiel 2006-01-27 21:01:25 UTC
Created attachment 65525 [details]
nm-use-madwifi-wpa-driver-rml.patch (jg?)

+Patch7:       nm-use-madwifi-wpa-driver-rml.patch
+Patch8:       nm-scan-ssid.patch
Comment 18 Christoph Thiel 2006-01-27 21:01:55 UTC
I'v added the patches that have been added to the /work/built/mbuild/gaspode-jg-3/ build.
Comment 19 Robert Love 2006-01-27 21:06:31 UTC
Thanks, Christoph.

(nm-use-madwifi-wpa-driver-rml.patch is from me, btw)
Comment 20 Robert Love 2006-01-28 00:48:25 UTC
Confirm that it works for me.

AJ, how about you?
Comment 21 Andreas Jaeger 2006-01-28 10:01:01 UTC
There are still some problems for me.  I'll debug a bit more later.
Comment 22 Andreas Jaeger 2006-01-28 10:11:21 UTC
Status:

ssid=DieAJs
pairwise_cipher=CCMP
group_cipher=CCMP
key_mgmt=WPA2-PSK
wpa_state=COMPLETED
ip_address=192.168.27.14

Note that I entered AES-CCMP but /var/log/messages shows:
an 28 11:08:20 x40 NetworkManager: <information>       SUP: response was 'OK'
Jan 28 11:08:20 x40 NetworkManager: <information>       SUP: sending command 'SET_NETWORK 0 proto WPA2'
Jan 28 11:08:20 x40 NetworkManager: <information>       SUP: response was 'OK'
Jan 28 11:08:20 x40 NetworkManager: <information>       SUP: sending command 'SET_NETWORK 0 key_mgmt WPA-PSK'
Jan 28 11:08:20 x40 NetworkManager: <information>       SUP: response was 'OK'
Jan 28 11:08:20 x40 NetworkManager: <information>       SUP: sending command 'SET_NETWORK 0 psk [...]
Jan 28 11:08:20 x40 NetworkManager: <information>       SUP: response was 'OK'
Jan 28 11:08:20 x40 NetworkManager: <information>       SUP: sending command 'SET_NETWORK 0 pairwise TKIP'                                                            Jan 28 11:08:20 x40 NetworkManager: <information>       SUP: response was 'OK'     Jan 28 11:08:20 x40 NetworkManager: <information>       SUP: sending command 'SET_NETWORK 0 group TKIP'                                                                                                 

This failed!
Comment 23 Andreas Jaeger 2006-01-28 10:12:11 UTC
Created attachment 65540 [details]
Screenshot for previous comment
Comment 24 Andreas Jaeger 2006-01-28 10:14:39 UTC
So, it seems that somehow knetworkmanager and NetworkManager do not set the right value.

I then used the option of knetworkmanager to "Connect to other Wireless Network" and manually entered WPA2/AES-CCMP and the password and this worked!

This comment is filled out using this connection.  So, NetworkManager seems to work now but the interaction with knetworkmanager is another issue. 
Comment 25 Christian Deckelmann 2006-01-28 10:15:15 UTC
There is another patch for madwifi which makes scanning hidden SSID´s more reliable.

http://madwifi.org/ticket/275
Comment 26 Christian Deckelmann 2006-01-28 10:24:01 UTC
The real cause of these problems is IMHO that NM tries to set specific cipher types. 
See Bug 134238.
Comment 27 Joachim Gleissner 2006-01-28 10:49:32 UTC
Probably. IMHO NM should not set a cipher but let wpa_supplicant select the right one, unless the user explicitly sets it, of course. The active scan patch for madwifi is already in our kernel.
Comment 28 Christoph Thiel 2006-01-28 11:52:42 UTC
AJ, did you try to use an updated kNetworkManager? I have one based on jg's build in mbuild zion-cthiel-21.
Comment 29 Andreas Jaeger 2006-01-28 17:01:41 UTC
I tried an updated knetworkmanager - and just tried your version as well which
showed the same behaviour.
Comment 30 Robert Love 2006-01-30 20:00:51 UTC
As of 0.5.1cvs20060130, the ciphers are determined automatically, by default.

KNetworkManager does not yet have this functionality.  But should soon.

I have not yet checked in jg's update (still trying to determine why "AP_SCAN 1" makes madwifi work).  Once I do, however, I think this bug is fixed!
Comment 31 Robert Love 2006-02-01 18:29:45 UTC
Checked in the remaining madwifi settings.  See NM 0.5.1cvs20060201.

Bug fixed!