locked
Why I am getting "Capability matching failed at NIC." while trying to use WlanSetProfile() - WinXP, NativeWiFi RRS feed

  • Question

  • Hello there,

    I am trying to create an ZeroConfig client to connect my Atheros WiFi device to an AP (for learning purpose). I am using NativeWiFi (WinXP SP3) to query my device & set a profile against the device so that it can connect to an AP. The steps I have taken follows like this -

    1. get NativeWiFi handle by calling openHandle.

    2. Enumerate the device list & Get a GUID of the device.

    3. Scan & Retrieve a list of available network.

    4. Trying to set a autoconnect profile with WlanSetProfile()

    I am getting "Capability matching failed at NIC." while trying to set a custom profile using WlanSetProfile API. My sample profile is based on microsoft's sample profile and follows as below -

    LPCWSTR profile = L"<?xml version=\"1.0\" encoding=\"US-ASCII\"?>\
    <WLANProfile xmlns=\"http://www.microsoft.com/networking/WLAN/profile/v1\">\
     <name>DevilsDen</name>\n\
     <SSIDConfig>\n\
      <SSID>\n\
    			<hex>446576696C7344656E</hex>\n\
       <name>DevilsDen</name>\n\
      </SSID>\n\
     </SSIDConfig>\n\
     <connectionType>ESS</connectionType>\n\
     <connectionMode>auto</connectionMode>\n\
     <autoSwitch>false</autoSwitch>\n\
     <MSM>\n\
      <security>\n\
       <authEncryption>\n\
        <authentication>WPAPSK</authentication>\n\
        <encryption>AES</encryption>\n\
        <useOneX>false</useOneX>\n\
       </authEncryption>\n\
    			<sharedKey>\n\
    				<keyType>passPhrase</keyType>\n\
    				<protected>false</protected>\n\
    				<keyMaterial>wifi123</keyMaterial>\n\
    			</sharedKey>\n\
      </security>\n\
     </MSM>\n\
    </WLANProfile>";
    

    Is this profile is correct or something is wrong? Also I can connect to my AP using the Client Utility Application provided by the Atheros. I cannot figure out what might be the cause of this message. Can any one suggest?

    Thank you in advance & sorry for my English.


    fadedreamz
    Tuesday, May 24, 2011 2:46 PM

Answers

  • The XML tag autoSwitch is not supported in Windows XP.

    You should remove it from the profile.

    • Marked as answer by fadedreamz Wednesday, June 1, 2011 3:44 PM
    Wednesday, June 1, 2011 12:23 PM

All replies

  • The XML tag autoSwitch is not supported in Windows XP.

    You should remove it from the profile.

    • Marked as answer by fadedreamz Wednesday, June 1, 2011 3:44 PM
    Wednesday, June 1, 2011 12:23 PM
  • The XML tag autoSwitch is not supported in Windows XP.

    You should remove it from the profile.

    Thank you theredguy for your reply.

    I tried to use the sample XML file from msdn, but it didn't work.

    I think NativeWiFi is buggy in WINXP. Because the same code worked perfectly in Win7.

    Thank you again for your reply.


    fadedreamz
    Wednesday, June 1, 2011 3:43 PM