NetworkManager und wpa_supplicant overview - Networking

This is a discussion on NetworkManager und wpa_supplicant overview - Networking ; 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 ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: NetworkManager und wpa_supplicant overview

  1. NetworkManager und wpa_supplicant overview

    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: Config: added 'ssid' value
    'anuoona'
    Dec 25 19:56:10 esel NetworkManager: Config: added 'key_mgmt'
    value 'WPA-PSK'
    Dec 25 19:56:10 esel NetworkManager: Config: added 'psk' value
    ''
    Dec 25 19:56:10 esel NetworkManager: Config: added 'proto' value
    'WPA RSN'
    Dec 25 19:56:10 esel NetworkManager: Config: added 'pairwise'
    value 'TKIP CCMP'
    Dec 25 19:56:10 esel NetworkManager: 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: 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



  2. Re: NetworkManager und wpa_supplicant overview

    > 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


  3. Re: NetworkManager und wpa_supplicant overview

    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 to Thread