WlanSetProfile() with OPEN-WEP and keytype as passPhrase fails


Hi all,

Finally , I am able to post messages. Earlier I was having some problems with IE7.Sad

I am getting a return value of ERROR_BAD_PROFILE aka 1206 whenever I am calling WlanSetProfile() and passing below xml file.

Reason Code value is WLAN_REASON_CODE_MSMEC_CAPABILITY_PROFILE.

--

<?xml version="1.0" ?>

- <WLANProfile xmlns="http://www.microsoft.com/networking/WLAN/profile/v1">
<name>Ascii40</name>
- <SSIDConfig>
- <SSID>
<hex>4173636969313034</hex>
<name>Ascii40</name>
</SSID>
<nonBroadcast>false</nonBroadcast>
</SSIDConfig>
<connectionType>ESS</connectionType>
<connectionMode>auto</connectionMode>
<autoSwitch>true</autoSwitch>
- <MSM>
- <security>
- <authEncryption>
<authentication>open</authentication>
<encryption>WEP</encryption>
<useOneX>false</useOneX>
</authEncryption>
- <sharedKey>
<keyType>passPhrase</keyType>
<protected>false</protected>
<keyMaterial>12345</keyMaterial>
</sharedKey>
</security>
</MSM>
</WLANProfile>
-
BUT, if I create profile with keyType as networkKey and keyMaterial in hex, this call completes successfully.

Can anybody let me know what is wrong in my xml file?

Thanks
sagrawal

[1831 byte] By [sagrawal] at [2008-2-7]
# 1

From: MS
Sent: Thursday, August 09, 2007 1:21 PM
To: sagrawal

Subject: RE: unable to post my query on msdn forums

I don’t think you need to convert it.

A network key can be a string or a hex array.

A passphrase is only applied to WPA/WPA2, which will be converted to a network key before being passed to the driver.

Thanks,

MS

From: sagrawal

Sent: Thursday, August 09, 2007 1:09 PM
To: MS

Subject: RE: unable to post my query on msdn forums

Thanks.

I will be converting passPhrase to Hex keys before calling WlanSetProfile().


From: MS
Sent: Thursday, August 09, 2007 11:33 AM
To: sagrawal

Subject: RE: unable to post my query on msdn forums

The error code WLAN_REASON_CODE_MSMEC_CAPABILITY_PROFILE indicates the security part of the profile has a compatibility error.

<keyType>passPhrase</keyType> should be <keyType>networkKey</keyType>

I don’t think you can use passphrase for WEP.

Thanks,

MS

sagrawal at 2007-10-2 > top of Msdn Tech,Windows Networking Development,Windows Vista Wireless SDK...