Menu

#242 Encryption problems with FRITZ!WLAN USB Stick

closed
nobody
None
5
2012-10-06
2009-03-14
Jost
No

Hi everybody!

At first thanks for your great work so far!

I am using a FRITZ!WLAN USB Stick with ndiswrapper (1.52-29.2-i586) on OpenSuse 11.0.

Kernel 2.6.25.20.0.1-i586
I use the KNetworkManager
My Router is a FRITZ!Box WLAN 3170

I am having the following problem:

  • If i set the Router to no encryption everything is fine.
  • If i set the Router to WPA, WPA2 or WEP encryption it takes about ten tries to connect. The router-log says "wlan authorisation failed".

I found one way to get encryption to work:
If i set it to WEP and enter the hex-code to KNetworkManager it is fine. As soon as i try it with ASCII it wont work again.

Is this a problem with ndiswrapper? I found some posts in another forum, where people are having the same problem:
http://www.linux-club.de/viewtopic.php?f=19&t=68622 (german)

If you need more information, just tell me!

Cheers,
Jost

Discussion

  • Dirk

    Dirk - 2009-03-19

    Hi Jost,

    I had the same problem after upgrading from SuSE 10.3 to SuSE 11.1. Although I'm not an expert in this field: It seems, as if wpa_supplicant (the process that is responsible for wpa authentication) has some trouble. You can verify this, if you do some repetitive iwconfig after the network has been started. If the displayed encryption key changes every few seconds, wpa_supplicant is in trouble. You can also start wpa_supplicant at the command line with -dd to get debugging-Information from wpa_supplicant:

    wpa_supplicant -iwlan0 -c/var/run/wpa_supplicant-wlan0.conf -Dwext -P/var/run/wpa_supplicant/wlan0.pid -dd

    You probably will see a line like "State: COMPLETED -> 4WAY_HANDSHAKE" (or wpa_supplicant works now due to changed timing)

    I've made a little workaround in wpa_supplicant (just a sleep in wpa_supplicant_process_3_of_4), that solved the problem for me (maybe it works for you, too):

    diff --git a/src/rsn_supp/wpa.c b/src/rsn_supp/wpa.c
    index b221476..d7a7510 100644
    --- a/src/rsn_supp/wpa.c
    +++ b/src/rsn_supp/wpa.c
    @@ -994,6 +994,8 @@ static void wpa_supplicant_process_3_of_4(struct wpa_sm *sm,
    NULL, 0, &sm->ptk))
    return;

    • sleep(1);
      +
      /* SNonce was successfully used in msg 3/4, so mark it to be renewed
      • for the next 4-Way Handshake. If msg 3 is received again, the old
      • SNonce will still be used to avoid changing PTK. */

    If you're not afraid of receiving binaries from untrusted sources, I can send you the binaries, but I suggest you get the wpa sources from http://w1.fi/ and patch them by yourself.

    By the way: I had these troubles only with the Fritz Stick and only after I updated to SuSE 11.1

    Best regards,

    Dirk

     
  • Jost

    Jost - 2009-03-19

    Hi Dirk,

    thanks for your excellent answer!
    I noticed the key changing all the time in WPA-mode too! It thought this was WPA-specific / normal ;-)

    Maybe i will try your workaround in the next days. I am a bit short of time right now. Is wpa_supplicant a part of ndiswrapper or should we report the bug at some other place?

     
  • Dirk

    Dirk - 2009-03-19

    Hi Jost,

    WPA really changes the keys from time to time, but not in that short intervalls (for example: FritzBoxes use a key renewal interval of 3600sek)
    wpa_supplicant doesn't belong to ndiswrapper and is a project of its own. So you have to have a look at their site. The problem seems to be a subtle timing issue between wpa_supplicant, ndiswrapper and the windows wlan driver. If you run wpa_supplicant with full debugging at the command line, chances are that you don't see this error at all. I guess the only people who can clarify this are the wpa_supplicant gurus. I've already sent an eMail to the maintainer of wpa_supplicant, but haven't got an answer until now.

    Good luck with your Fritz!Stick

    Dirk

     
  • joep meloen

    joep meloen - 2010-06-12

    @ schwende :
    wow !!!! the patch works well
    problem solved ,
    many thx !!!!

     
  • Dirk

    Dirk - 2010-09-13

    (probably) not a ndiswrapper, but a wpa_supplicant problem

     

Log in to post a comment.