Networking Forums

Networking Forums > Wireless Networking > Wireless Networks > WlanSetProfile...how to create an adhoc connection

Reply
Thread Tools Display Modes

WlanSetProfile...how to create an adhoc connection

 
 
Arsalan Ahmad
Guest
Posts: n/a

 
      07-09-2007, 07:58 AM
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

 
Reply With Quote
 
 
 
 
Arsalan Ahmad
Guest
Posts: n/a

 
      07-09-2007, 08:03 AM
What I have observed that if i remove sharedKey and change encryption from
WEP to none then the function returns successfully.


"Arsalan Ahmad" <(E-Mail Removed)> wrote in message
news:A5535CED-DEAF-4007-A7DF-(E-Mail Removed)...
> 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


 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't establish a connection to adhoc network and p2p programs Aditzero Wireless Networks 4 05-16-2007 04:26 PM
cannot create new connection in windows xp Queen's Machinery Windows Networking 0 03-05-2007 01:20 PM
Adhoc connection between two laptops Marius Wireless Networks 3 05-24-2006 10:39 AM
Create a wireless connection johnevison Wireless Networks 1 09-26-2005 04:25 PM
How do I create a wireless ad hoc connection? ZYL Wireless Networks 1 12-11-2004 12:13 AM



1 2 3 4 5 6 7 8 9 10 11