xtdg
asked on
ADD WEP Problem
Hi:
Im Trying to Set WEP Authentication on my application using OID Calls but cant get it to work. I can succesfully link to a WEP Disable AP. These is what Im doing:
1- Stopping WZC and then staring the NDISUIO.
2- Setting Auth Mode to Shared.
3- Setting Infrastructure mode to Autounknow.
4- Adding the Wep Key using OID_802_11_ADD_WEP and the code publish here earlier.
Code:
MyString = "aaaaaaaaaa";
index = 0;
while(MyString[index*2] != '\0'){
wepkey.KeyMaterial[index] = (UCHAR)HEX(MyString[index* 2])<<4;
wepkey.KeyMaterial[index] |= HEX(MyString[index*2+1]);
index++;
}
wepkey.KeyIndex = 0x80000000;
wepkey.KeyLength = index;
wepkey.Length = sizeof(NDIS_802_11_WEP) + wepkey.KeyLength;
5- Setting WEP STATUS to Wep Enable.
6- Setting SSID to my AP.
Every time I run the application it gives an NDIS_STATUS_SUCCESS return but the network card cant connect to the AP. Also I try Doing
Can somebody help me with this?
Thx.
Im Trying to Set WEP Authentication on my application using OID Calls but cant get it to work. I can succesfully link to a WEP Disable AP. These is what Im doing:
1- Stopping WZC and then staring the NDISUIO.
2- Setting Auth Mode to Shared.
3- Setting Infrastructure mode to Autounknow.
4- Adding the Wep Key using OID_802_11_ADD_WEP and the code publish here earlier.
Code:
MyString = "aaaaaaaaaa";
index = 0;
while(MyString[index*2] != '\0'){
wepkey.KeyMaterial[index] = (UCHAR)HEX(MyString[index*
wepkey.KeyMaterial[index] |= HEX(MyString[index*2+1]);
index++;
}
wepkey.KeyIndex = 0x80000000;
wepkey.KeyLength = index;
wepkey.Length = sizeof(NDIS_802_11_WEP) + wepkey.KeyLength;
5- Setting WEP STATUS to Wep Enable.
6- Setting SSID to my AP.
Every time I run the application it gives an NDIS_STATUS_SUCCESS return but the network card cant connect to the AP. Also I try Doing
Can somebody help me with this?
Thx.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Jhance, your answers was very helpfull but i needed to change from the OID_802_11_ADD_WEP to OID_802_11_ADD_KEY in to make this code work. Thats why i gave you an B. All the other steps you describe where OK. Thanks for the help.
Thanks for the explanation. That's good with me.
How can change the OID_802_11_ADD_WEP to OID_802_11_ADD_KEY because the OID_802_11_ADD_WEP return error 87(Not in all wifi adapters!)! Do you have any C++ Code?
>>>Grade: B