Networking Forums

Networking Forums > Computer Networking > Linux Networking > NetworkManager und wpa_supplicant overview

Reply
Thread Tools Display Modes

NetworkManager und wpa_supplicant overview

 
 
Boris Glawe
Guest
Posts: n/a

 
      12-26-2007, 01:30 PM
Hello,

I cannot connect to my AP via WPA/2 anymore after upgrading my distro to
Fedora 8.

I'm using NetworkManager. My WLAN Adapter is a Netgear wg511v2 which can
only be run via ndiswrapper.

Here's what happens during the establishment of the connection
(interpreted by me from the log entries in /var/log/messages):


- The NetworkManager detects the desired Network/SSID and tries to connect


- The NetworkManager detects that "secrets" are required and uses the
gnome-keyring-daemon to retrieve the correct PSK. The PSK is
99.99999999% correct - I've checked it a thousand times. If I
intentionally enter a different PSK, it is rejected by the NetworkManager.


- The NetworkManager shows this (maybe relevant) message in
/var/log/messages:
Dec 25 19:56:10 esel NetworkManager: Missing or invalid key management


- The NetworkManager uses these values for wpa_supplicant configurtaion:
Dec 25 19:56:10 esel NetworkManager: <info> Config: added 'ssid' value
'anuoona'
Dec 25 19:56:10 esel NetworkManager: <info> Config: added 'key_mgmt'
value 'WPA-PSK'
Dec 25 19:56:10 esel NetworkManager: <info> Config: added 'psk' value
'<omitted>'
Dec 25 19:56:10 esel NetworkManager: <info> Config: added 'proto' value
'WPA RSN'
Dec 25 19:56:10 esel NetworkManager: <info> Config: added 'pairwise'
value 'TKIP CCMP'
Dec 25 19:56:10 esel NetworkManager: <info> Config: added 'group' value
'WEP40 WEP104 TKIP CCMP'

These settings are different (!) to the settings which I've specified
in /etc/wpa_supplicant/wpa_supplicant.conf!!


- The NetworkManager detects a successfully established connection:
Dec 25 19:56:16 esel NetworkManager: <info> Activation (wlan0/wireless)
Stage 2 of 5 (Device Configure) successful. Connected to wireless
network 'anuoona'.


- The NetworkManager tries to retrieve an IP-Adress via DHCP and fails!
It tries again an again, each time increasing an "interval" value (maybe
a time to wait for response?) and fails after 45 seconds.

- The AP logs an error message "authorisation failed" while connecting!


The connection can be successfully established (including a successfull
DHCP configuration), if I disable all encryption on the AP.


What do you thing is going wrong here? It work with my Fedora 7
Distibution. I've tried to copy my wpa_supplicant.conf from my old
installation (from a backup), but it did not work.

Is my wpa_supplicant.conf used at all? I'm assuming the opposite due to
two facts: First of all the NetworkManager uses totally different
settings than those specified in my wpa_supplicant.conf (according to
the log messages above) and secondly I've found some settings with
gconftool-2: in /system/networking/wireless/networks
(command: gconftool-2 -R /system/networking/wireless/networks)

How can I influence the the settings used by the NetworkManager if not
via /etc/wpa_supplicant/wpa_supplicant.conf??

What could be the reason for the connection failure?

Thanks for any reply and greets
Boris


 
Reply With Quote
 
 
 
 
fchristl
Guest
Posts: n/a

 
      01-29-2008, 07:58 PM
> Is my wpa_supplicant.conf used at all?

Hey Boris,

I had right the same problem, needing to use ndiswrapper and therefore
the option "ap_scan=2" in my wpa_supplicant.conf
Your just quoted question got me on the right direction - and its
answer is definately: no. Your wpa_supplicant.conf is not used at all.
NetworkManager sets ap_scan to 1 by default - the only value that does
not work for me.

The settings are all created on the fly (which basically works out
pretty fine) - the only problem is the option ap_scan. The values for
ap_scan are hard coded and so the only fast way I see to get around
our problem is to edit directly in the code. My way was:

1. Follow the instructions on http://www.gnome.org/projects/Networ...er/developers/
until it comes to compiling NetworkManager itself
2. Do execute the autogen.sh script as described
3. Now - that's the only important part - let's change any ap_scan
value that's hardcoded to 2! From the NetworkManager source directory,
open the file "src/supplicant-manager/nm-supplicant-config.c" with an
editor of your choice
4. Search for "ap_scan" in this file. The first important occurance I
found was in line 85 (second search result) - change it to "priv-
>ap_scan = 2;". Next important result is #11 - line 343 for me. Do the

same as before. And right the next - #12, line 349 - same prodedure,
again.
5. Save the file and continue as usual

Please obey: This is not a clean method, it's just meant to get
everything working as fast as possible. Since the used code is SVN
based, the line numbers and search results can vary! It's just the
general way to fix this problem dirty and fast.

I hope I helped you...

Greetings,
Felix

 
Reply With Quote
 
fchristl
Guest
Posts: n/a

 
      01-29-2008, 08:04 PM
A patch for the current SVN version:

--- nm-supplicant-config.c 2008-01-29 22:01:36.000000000 +0100
+++ nm-supplicant-config-fc.c 2008-01-29 21:59:58.000000000 +0100
@@ -82,7 +82,7 @@
(GDestroyNotify) g_free,
(GDestroyNotify)
blob_free);

- priv->ap_scan = 1;
+ priv->ap_scan = 2;
priv->dispose_has_run = FALSE;
}

@@ -346,6 +346,7 @@
* ap_scan=1, while those that do not should use
ap_scan=2.
*/
priv->ap_scan = has_scan_capa_ssid ? 1 : 2;
+ priv->ap_scan = 2;
}

if (!nm_supplicant_config_add_option (self, "ssid",
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
NetworkManager and wpa_supplicant Paul Steckler Linux Networking 0 02-08-2008 05:48 PM
NetworkManager and DHCP Suk Linux Networking 1 06-02-2007 08:31 AM
Overview of acticities Christian Christmann Linux Networking 1 12-14-2006 08:20 AM
Overview of building a machine da1one Home Networking 0 06-28-2004 08:35 AM
IPSec overview Nico Schottelius Linux Networking 0 07-21-2003 02:00 PM



1 2 3 4 5 6 7 8 9 10 11