none
Wifi Proteceted Setup(WPS) implementation in native wifi driver usb RRS feed

  • General discussion

  • Hi!

    I am trying to develop a wifi driver for my adpter, based on the reference "native wifi usb driver". WPA and WPA2 are working. Now I am trying to add support for Wifi Protected Setup (WPS). But the Push Button option is not found in wireless network wizard(its just asking network key) when I am trying to connect to WPS enabled access point. I am indicating the WPS IE to windows in OID_DOT11_ENUM_BSS_LIST, apart from it what else has to do, can anyone please help me to get out of this issue. When I have clicked on the connect, wizard is indicating "getting information from the ___Access Point" after then it is simply asking the key.

    Thanks in advance...

    Tuesday, October 16, 2012 10:01 AM

All replies

  • It's possible that you're seeing an incompatibility with the AP, or it's possible that your WLAN driver is not associating correctly.

    • Does this AP work when using a different, logo'd driver?
    • What packets are you sending/receiving?

    What needs to happen for WPS to work correctly

    WPS relies on a special IE in beacons and probe responses.  Windows 8 will additionally use special probe requests.  A wireless driver is responsible for collecting the WPS IE from beacons, along with the WPS IE from probe responses.  (You only need to keep the most recent copy of the IE from each type of management frame).  Indicate both IEs when the OS queries for them.

    If the user selects an AP from the GUI and chooses to connect to it, then Windows will check the IE to see if WPS is supported.  If it is, then things differ based on which OS you're running.

    Windows 7

    Windows 7 will show "Getting information from XXXX" on the GUI, and proceed to connect to the AP using Open/None with EAP.  (This is the usual WPS connection handshake).  Windows 7 will send a WSC_START, expect an M1, then send an M2D and terminate the connection.  If the M1 does not arrive in time (approximately ~5 seconds), then Windows 7 will assume the AP or WLAN driver does not correctly support WPS the OS will fall back to a normal non-WPS connection.

    Windows 8

    Windows 8 will skip the steps above.

    All versions

    Windows will examine the most recently-returned WPS config methods flags to determine which GUI to show (PIN vs PushButton).  If the device claims to support Dynamic PIN, Windows will show the PIN entry screen.  Else, if the device claims to support Push Button, Windows will show the PushButton screen.  Else, Windows will show the PIN entry screen.

    How to diagnose connection failures

    If you're running Windows 7 and you see the GUI stall at "Getting information from XXX" for some time, then abandon WPS and fall back to normal WPA passphrase, then the EAP association probably failed.  You should capture the authentication/association/EAP_START/M1/M2D packets and verify that they all come through correctly.  It would be helpful to have a known-good capture too, so you can compare what the differences are.

    You can capture packets with Microsoft Network Monitor, but (last time I looked) Wireshark will not work.  Wireshark does not understand Windows' Native WiFi driver model, so it will miss out on the authentication/association frames.

    If you can, capture over-the-air traces from a 3rd PC, so that you can put that PC into wireless Monitor Mode.  Fix the monitoring PC onto the same WiFi channel as the AP.  (It helps to go into the AP's configuration page and fix the AP onto a specific channel).

    Tuesday, October 16, 2012 7:16 PM
  • Hi!

    Thanks for your Reply But I think I didn’t put forward the question clearly. The problem I’m facing is at very early stage (before association or even start of WPS handshake). Let me try again

    I’m working on a Windows 7 system with ndis 6.0

    I have developed a miniport driver with which I can connect to an AP in WPA and WPA2 modes. In both of these cases, after scanning, when I select the AP and click ‘Connect’, the GUI prompts for a WPA/WPA2 password. After getting the password from the user, it gives the OID_DOT11_CONNECT_REQUEST and this is trigger to start the auth->assoc->4-way handshake. The connection is successful in this case.

    Now, the same AP also has support for WPS. When I attempt to connect to this AP from a Third party WiFi card (Intel) on a Windows 7 PC, the GUI prompts for a WPA/WPA2 password. However, it also indicates that the AP has support for WPS and you can connect by pushing the button on the AP. (Please see the screen shot below or at "http://social.msdn.microsoft.com/Forums/getfile/180507"). I don’t seem to be getting this option with my driver. I’m sure that I’m passing the WPS IE (along with WPA and WPA2 IEs) to the OS when the OID_DOT11_ENUM_BSS_LIST is called. Below are the contents of the buffer that the driver returns when OID_DOT11_ENUM_BSS_LIST is called. I’m not sure what extra information I need to include here so that the OS can detect that the AP is WPS capable.

    Hope my question is clear now.

    The following are the Information elements which I am indicating to OS, apart from other fields.

    In Beacon

    SSID Information Element with Element ID = 0 Length = 11

    Belkin.5184
     
    Information element with Element ID = 1 Length = 8
    82 84 b 16 24 30 48 6c
     
    Information element with Element ID = 3 Length = 1
    1

    Information element with Element ID = 5 Length = 4
    1 3 0 0

    Information element with Element ID = 42 Length = 1
    0

    Information element with Element ID = 47 Length = 1
    0
     
    RSN Information Element with Element ID = 48 Length = 20
    1 0 0 f ac 4 1 0 0 f ac 4 1 0 0 f ac 2 c 0

    Information element with Element ID = 50 Length = 4
    c 12 18 60

    Information element with Element ID = 45 Length = 26
    7c 18 1b ff ff 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

    Information element with Element ID = 61 Length = 22
    1 8 11 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
     
    VENDOR SPECIFIC Information Element with Element ID = 221 Length = 14 (This is WPS IE)
    0 50 f2 4 10 4a 0 1 10 10 44 0 1 2
     
    VENDOR SPECIFIC Information Element with Element ID = 221 Length = 9
    0 10 18 2 0 f0 5 0 0
     
    VENDOR SPECIFIC Information Element with Element ID = 221 Length = 24
    0 50 f2 2 1 1 80 0 3 a4 0 0 27 a4 0 0 42 43 5e 0 62 32 2f 0
     
    VENDOR SPECIFIC Information Element with Element ID = 221 Length = 30
    0 90 4c 33 7c 18 1b ff ff 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
     
    VENDOR SPECIFIC Information Element with Element ID = 221 Length = 26
    0 90 4c 34 1 8 11 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

    No.of Vendor Specific Entries:5

    In case of Probe Response

    SSID Information Element with Element ID = 0 Length = 11
    Belkin.5184
     
    Information element with Element ID = 1 Length = 8
    82 84 b 16 24 30 48 6c
     
    Information element with Element ID = 3 Length = 1
    1

    Information element with Element ID = 42 Length = 1
    0

    Information element with Element ID = 47 Length = 1
    0
     
    RSN Information Element with Element ID = 48 Length = 20
    1 0 0 f ac 4 1 0 0 f ac 4 1 0 0 f ac 2 c 0
     
    Information element with Element ID = 50 Length = 4
    c 12 18 60

    Information element with Element ID = 45 Length = 26
    7c 18 1b ff ff 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

    Information element with Element ID = 61 Length = 22
    1 8 11 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
     
    VENDOR SPECIFIC Information Element with Element ID = 221 Length = 113 (This is WPS IE)
    0 50 f2 4 10 4a 0 1 10 10 44 0 1 2 10 41 0 1 0 10 3b 0 1 3 10 47 0 10 ca 7f fa 47 eb aa 5b 91 2 2c db 15 4a 42 2e 61 10 21 0 6 42 65 6c 6b 69 6e 10 23 0 6
    42 65 6c 6b 69 6e 10 24 0 6 31 32 33 34 35 36 10 42 0 5 31 32 33 34 35 10 54 0 8 0 6 0 50 f2 4 0 1 10 11 0 8 42 65 6c 6b 69 6e 41 50 10 8 0 2 0 84
     
    VENDOR SPECIFIC Information Element with Element ID = 221 Length = 9
    0 10 18 2 0 f0 5 0 0
     
    VENDOR SPECIFIC Information Element with Element ID = 221 Length = 24
    0 50 f2 2 1 1 80 0 3 a4 0 0 27 a4 0 0 42 43 5e 0 62 32 2f 0
     
    VENDOR SPECIFIC Information Element with Element ID = 221 Length = 30
    0 90 4c 33 7c 18 1b ff ff 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
     
    VENDOR SPECIFIC Information Element with Element ID = 221 Length = 26
    0 90 4c 34 1 8 11 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0


    No.of Vendor Specific Entries:5

    Thanks in advance...





    Wednesday, October 17, 2012 4:36 AM
  • I am developing native wifi driver for my wifi dongle, based on sample native wifi driver usb.

    How to indicate to operating system that the wifi dongle supports wifi protected setup?

    Working on Windows 7 with ndis 6.0

    Friday, October 19, 2012 7:03 AM
  • Hi!

    I found the solution, earlier I didn't implement OID_DOT11_DESIRED_BSSID_LIST.

    After Implementing it I could able to connect in WPS case also...

    Friday, October 19, 2012 11:19 AM