WlanSetProfile...how to create an adhoc connection

Discussion in 'Wireless Networking' started by Arsalan Ahmad, Jul 9, 2007.

  1. Hi all,

    I am trying to create an adhoc connection between two computers running
    vista.

    For this i am creating a custom profile and then tryint to set the profile
    using WlanSetProfile() API. The xml is given below:

    <?xml version="1.0" ?>
    - <WLANProfile xmlns="http://www.microsoft.com/networking/WLAN/profile/v1">
    <name>NetTest1-adhoc</name>
    - <SSIDConfig>
    - <SSID>
    <name>NetTest1</name>
    </SSID>
    </SSIDConfig>
    <connectionType>IBSS</connectionType>
    - <MSM>
    - <security>
    - <sharedKey>
    <protected>FALSE</protected>
    <keyType>passPhrase</keyType>
    <keyMaterial>0896745231</keyMaterial>
    </sharedKey>
    - <authEncryption>
    <authentication>open</authentication>
    <encryption>WEP</encryption>
    </authEncryption>
    </security>
    </MSM>
    </WLANProfile>

    However, I am getting error with error code
    WLAN_REASON_CODE_INVALID_PROFILE_SCHEMA.

    Could any one please tell me what am I missing here?

    I want to create a network with open or shared authentication and WEP
    encryption.

    Thanks,

    Arsalan
    Arsalan Ahmad, Jul 9, 2007
    #1
    1. Advertising

  2. What I have observed that if i remove sharedKey and change encryption from
    WEP to none then the function returns successfully.


    "Arsalan Ahmad" <> wrote in message
    news:...
    > Hi all,
    >
    > I am trying to create an adhoc connection between two computers running
    > vista.
    >
    > For this i am creating a custom profile and then tryint to set the profile
    > using WlanSetProfile() API. The xml is given below:
    >
    > <?xml version="1.0" ?>
    > - <WLANProfile
    > xmlns="http://www.microsoft.com/networking/WLAN/profile/v1">
    > <name>NetTest1-adhoc</name>
    > - <SSIDConfig>
    > - <SSID>
    > <name>NetTest1</name>
    > </SSID>
    > </SSIDConfig>
    > <connectionType>IBSS</connectionType>
    > - <MSM>
    > - <security>
    > - <sharedKey>
    > <protected>FALSE</protected>
    > <keyType>passPhrase</keyType>
    > <keyMaterial>0896745231</keyMaterial>
    > </sharedKey>
    > - <authEncryption>
    > <authentication>open</authentication>
    > <encryption>WEP</encryption>
    > </authEncryption>
    > </security>
    > </MSM>
    > </WLANProfile>
    >
    > However, I am getting error with error code
    > WLAN_REASON_CODE_INVALID_PROFILE_SCHEMA.
    >
    > Could any one please tell me what am I missing here?
    >
    > I want to create a network with open or shared authentication and WEP
    > encryption.
    >
    > Thanks,
    >
    > Arsalan
    Arsalan Ahmad, Jul 9, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. dkh

    adhoc network 11g wireless dropout woes

    dkh, Jul 10, 2004, in forum: Wireless Networking
    Replies:
    1
    Views:
    3,502
    David Whitney
    Aug 2, 2004
  2. =?Utf-8?B?TWFyaXVz?=

    Adhoc connection between two laptops

    =?Utf-8?B?TWFyaXVz?=, May 19, 2006, in forum: Wireless Networking
    Replies:
    3
    Views:
    5,294
    RalfG
    May 24, 2006
  3. Adnan
    Replies:
    2
    Views:
    387
    John Smith
    May 8, 2006
  4. =?Utf-8?B?QWRpdHplcm8=?=

    Can't establish a connection to adhoc network and p2p programs

    =?Utf-8?B?QWRpdHplcm8=?=, May 15, 2007, in forum: Wireless Networking
    Replies:
    4
    Views:
    733
    =?Utf-8?B?QWRpdHplcm8=?=
    May 16, 2007
  5. MrGarbage

    using winsock over an adhoc wireless connection

    MrGarbage, Jun 13, 2009, in forum: Wireless Networking
    Replies:
    1
    Views:
    778
    Tae Song
    Jun 14, 2009
Loading...

Share This Page