none
Native Wifi Functions RRS feed

  • Question

  • Hello,

    Trying to use the WlanTool program that is included with Windows Compact 2013. I had to take out the connection manager to be able to use this program with the Wlan... API's. When trying to set the profile, I get error code 1206. Using WlanReasonCodeToString(), i get an error of 1814 (not sure why this function isn't working, error ERROR_RESOURCE_NAME_NOT_FOUND??). After manually hunting down the code, it looks to be the error of: WLAN_REASON_CODE_MSMSEC_PROFILE_ONEX_DISABLED.

    How do I enable the 802.1x on WinCE? Does this make any sense?

    When I have connection manager in the OS, I use it and it works. Should I just use the connection manager API's instead? I really don't want to, since using the WlanTool can save me a decent amount of time.

    Here is the connection profile just to rule out that the WlanTool doesn't have a bug of some sort in creating it....

    <?xml version="1.0" encoding="UTF-8"?>
    <WLANProfile xmlns="http://www.microsoft.com/networking/WLAN/profile/v1">
       <name>DEMO7</name>
       <SSIDConfig>
          <SSID>
             <name>DEMO7</name>
          </SSID>
          <nonBroadcast>false</nonBroadcast>
       </SSIDConfig>
       <connectionType>ESS</connectionType>
       <connectionMode>auto</connectionMode>
       <MSM>
          <security>
             <authEncryption>
                <authentication>WPA2</authentication>
                <encryption>AES</encryption>
                <useOneX>false</useOneX>
             </authEncryption>
             <sharedKey>
                <keyType>passPhrase</keyType>
                <protected>false</protected>
                <keyMaterial>12345678</keyMaterial>
             </sharedKey>
          </security>
       </MSM>
    </WLANProfile>

    Tuesday, January 8, 2019 7:12 PM

Answers

  • Hi,

    The profile XML seems to be incorrect.

    If you are trying WPA2 in PSK mode (i.e. without a server to validate your credentials), you should use:

    <authentication>WPA2PSK</authentication> instead of just WPA2.

    More on the schema here:

    https://docs.microsoft.com/en-us/windows/desktop/nativewifi/wlan-profileschema-authentication-authencryption-element

    Regards,

    Balaji.

    Monday, January 21, 2019 6:03 AM

All replies

  • You are telling us how you are trying to accomplish a goal, but you didn't tell us what the goal is.  What is your goal or requirement?

    When we know what your goal is, then maybe we can suggest the best way to achieve that goal.


    Bruce Eitman
    Senior Enginer
    Bruce.Eitman AT Synopsys DOT com
    My BLOG http://geekswithblogs.net/bruceeitman
    I work for
    Synopsys

    Wednesday, January 9, 2019 1:38 PM
    Moderator
  • Let me try to explain a little more clearly about what i'm trying to do

    We have a third party UI software. We have wifi on our unit. Because the UI runs on top with it's own look and feel, we do not want to use the connection manager UI that comes with the OS. 

    So, in order to get the relevant information and display it on our custom UI (list of networks, type of auth, connection status, etc...) I wanted to use the WlanTool that comes with the OS. I'm assuming that this is decently mature and will save lots of time writing from scratch. This is why this is preferable then writing from scratch using the connection manager API.

    I have written a thin wrapper around the WlanTool for this purpose, and have been testing it. Getting the list of networks with it's various properties worked easily. Upon testing the connecting function, I have come across the problem described above.

    So, assuming this tool is pretty stable (maybe too much assumption), I think it has something to do with some setting on the unit that is not configured right, like something to do with the error described above.

    Hopefully this context will help.

    Wednesday, January 9, 2019 4:46 PM
  • Doing some troubleshooting, I took off all security of the Wifi AP as a test (open auth and no encryption), it connects. When I turn the WPA2 back on with password, the error comes back. 

    Going through the catalog items of the OS that we are using, I see that there is an item for Automatic Configuration and 802.1x (SYSGEN_ETH_80211_NWIFI). It is checked and included in the image.

    Seems the 802.1x is disabled for some reason. No idea why or how to troubleshoot.

    Unfortunately, the end goal is for certificate based WPA2 connections and the outlook described here doesn't look too rosy: Windows Embedded/CE and 802.1x certificates

    Wednesday, January 9, 2019 9:58 PM
  • Hi,

    The profile XML seems to be incorrect.

    If you are trying WPA2 in PSK mode (i.e. without a server to validate your credentials), you should use:

    <authentication>WPA2PSK</authentication> instead of just WPA2.

    More on the schema here:

    https://docs.microsoft.com/en-us/windows/desktop/nativewifi/wlan-profileschema-authentication-authencryption-element

    Regards,

    Balaji.

    Monday, January 21, 2019 6:03 AM