Hi,

I am writing an application that allows a user to connect to 802.1x
access points. I connect to the access point, and use EAPOL to get
both the broadcast and unicast keys. I try setting the keys using
OID_802_11_ADD_WEP, but I don't get a valid connection (i.e a valid
DHCP connection).

Here is some pseudocode of what I am doing:

if (!SetInfrastructureMode(Ndis802_11Infrastructure))
return FALSE;
if (!SetAuthenticationMode(Ndis802_11AuthModeOpen))
return FALSE;
if (!SetEncryptionStatus(Ndis802_11Encryption1Enabled))
return FALSE;
if(!SetSSID(strSSID))
return FALSE;
// do EAPOL code, to get WEP Keys
if (!SetWEPKey(broadcastkey, keyLength, keyIndex,bBroadCast /*= TRUE
*/))
return FALSE;
if (!SetWEPKey(unicastkey, keyLength, keyIndex,bBroadCast /*=
FALSE*/))
return FALSE;


The keys get set correctly, but I do not get a valid DHCP address. I
found some Microsoft documentation, that basically said that unicast
keys are not supported yet. Is this true? It also set that only one
key can be set. The last key set is the active one. So I have tried
only setting one of the keys, and it still does not work. Also below
is a sample of how I set the WEP key.

PNDIS_802_11_WEP pWEP;
UCHAR * pOidData = NULL;
int nLength;
nLength = keyLength + 12;
// D311 has a problem if the data is not at least 16 bytes long and
has a 4 byte boundary
if (nLength % 4)
nLength += (4 - (nLength % 4));
pOidData = new UCHAR[nLength];
memset(pOidData,0,nLength);
pWEP = (PNDIS_802_11_WEP) pOidData;
pWEP->Length = nLength; // sizeof NIDS_802_11_WEP structure, this
includes length of network key
if (bBroadcast)
pWEP->KeyIndex = keyIndex | 0x80000000; // we set bit 31 to specify
global key
else
pWEP->KeyIndex = keyIndex;
pWEP->KeyLength = keyLength;
memcpy(pWEP->KeyMaterial,pKey,keyLength);


If someone could tell me what I am missing or what I am doing wrong,
it would be greatly appreciated.


Thanks

Shane

Re: 802.1x - Setting the Dynamic WEP Keys by Thomas

Thomas
Thu Mar 04 09:35:23 CST 2004

This is related to the newer "W-Fi Protected Access" (WPA). There are
updated ntddndis.h header files that include this definition and a Microsoft
document describing WPA modifications found through NDIS.COM at the URL:

http://www.ndis.com/faq/QA08010301.htm

Good luck,

Thomas F. Divine
http://www.rawether.net

"davide_lenza" <anonymous@discussions.microsoft.com> wrote in message
news:1687BF76-F9C4-4E56-B3DF-6DE834076369@microsoft.com...
> What is "SetEncryptionStatus(Ndis802_11Encryption1Enabled)" ?
>



Re: 802.1x - Setting the Dynamic WEP Keys by anonymous

anonymous
Thu Mar 04 10:31:06 CST 2004

How can I set a wep key without using the "W-Fi Protected Access" (WPA)?

Re: 802.1x - Setting the Dynamic WEP Keys by Thomas

Thomas
Thu Mar 04 12:22:57 CST 2004

The topic "NDIS 802.11 Notes" at NDIS.COM amy be helpful. See the URL:

http://www.ndis.com/papers/ieee802_11_notes.htm

The NDIS.COM FAQ may also offer some help:

http://www.ndis.com/faq/default.htm#NDIS_802_11

At the very least, study the DDK NDIS documentation carefully.

Good luck,

Thomas F. Divine
http://www.rawetehr.net


"davide_lenza" <anonymous@discussions.microsoft.com> wrote in message
news:C477A763-4051-41A8-9C3F-B11B246C16AB@microsoft.com...
> How can I set a wep key without using the "W-Fi Protected Access" (WPA)?



Re: 802.1x - Setting the Dynamic WEP Keys by anonymous

anonymous
Fri Mar 05 02:21:06 CST 2004

Thanks. Now I'm going to try.....