I'm writing an application that uses the PCAUSA rawether tool to set various
settings on 802.11b wireless cards. Rawether (amoung many other things)
lets user level programs get and set network adapter card properties
described by the various NDIS OID values.
For purposes of this question, I am working with 802.11b infrastructure mode
using WEP authentication as you would find in a home or small office. No
server based authentication is used, I'm working with the access points and
wireless adapters you would purchase at Best Buy.
I am able to get and set SSIDs on most wireless cards, and am able to set
WEP keys for most wireless cards, but I am running into some anomalies. In
particular, when I set the WEP key with my application, the settings usually
do not persist through a reset, but when I use WZC or the OEM setup utility
to set values then the WEP keys and SSID settings persist through resets,
even if I disable WZC and the OEM setup before I reset. I'm trying to
figure out why this is happening.
Here are some questions I have about WEP based on the IEEE guidelines for
802.11 network adapters (
1) Under OID_802_11_ADD_WEP it talks about global and per client keys. I'm
a little hazy on what these terms mean. I talk it that a global key is the
WEB key that we usually use with garden variety access points. Are there
access points that support a different key for each client ("per client"?).
2) When setting a value for OID_802_11_ADD_WEP the guideline says about the
NDIS_802_11_WEP keyindex value: "Specifies which key to add or remove. The
global keys are represented by values of zero to n. When bit 31 is set to 1,
it indicates the key used to transmit to the access point. When bit 30 is
set to 1, it indicates that the key is a per-client key". What is this all
about? In my experiments, setting bit 31 of the key index seems to make no
difference, and setting bit 30 causes the call to fail.
2) The standard says "When this OID sets the same index twice, the miniport
driver should overwrite the previous WEP key at that index". What does that
mean in practice? What is the difference in adapter behavior if I only set
the wep key an a particular once or twice?
Besides making a valid call to OID_802_11_ADD_WEP and turning WEP on by
setting Ndis802_11WEPEnabled to Ndis802_11WEPEnabled, is there anything
else I should do to make the WEP key persist through a reset?
Any hints will be very welcome.