Archived from groups: microsoft.public.win32.programmer.networks,microsoft.public.windows.networking.wireless (More info?)
Hello,
I'm trying to configure my 802.11g wireless network card using
DeviceIoControl and NDISUIO interface.
First, I request current SSID from the card. Then I set it to my
specific value using code below. Set operation returns success. And
then I request SSID again to verify if the set operation really
succeeded. But I get the same values as it was before my SET, so
network card doesn't switch to new SSID. The same situation if I try
to change infrastructure mode (OID_802_11_INFRASTRUCTURE_MODE) and
configuration (OID_802_11_CONFIGURATION). Trying to do
OID_802_11_DISASSOCIATE before sending or requesting any data returns
success too but doesn't help.
My be I'm missing some obvious things (wait, reset, additional
operations)?
Configuring card with manufacturer's utility works fine, howewer.
I know about the issue that NDISUIO is now reserved for use by
Windows, but with my own driver (derived from NDISUIO sample)
situation is the same.
Tested on systems with WinXP SP1 and SP2. WZC is turned off.
Any siggestions, links, etc would be highly appreciated!
Archived from groups: microsoft.public.win32.programmer.networks,microsoft.public.windows.networking.wireless (More info?)
At least, Disassociate should work.
So you might be doing something wrong - in our business every single bit
matters...
--PA
"Serhiy Smirnov" wrote:
> Hello,
>
> I'm trying to configure my 802.11g wireless network card using
> DeviceIoControl and NDISUIO interface.
>
> First, I request current SSID from the card. Then I set it to my
> specific value using code below. Set operation returns success. And
> then I request SSID again to verify if the set operation really
> succeeded. But I get the same values as it was before my SET, so
> network card doesn't switch to new SSID. The same situation if I try
> to change infrastructure mode (OID_802_11_INFRASTRUCTURE_MODE) and
> configuration (OID_802_11_CONFIGURATION). Trying to do
> OID_802_11_DISASSOCIATE before sending or requesting any data returns
> success too but doesn't help.
> My be I'm missing some obvious things (wait, reset, additional
> operations)?
>
> Configuring card with manufacturer's utility works fine, howewer.
>
> I know about the issue that NDISUIO is now reserved for use by
> Windows, but with my own driver (derived from NDISUIO sample)
> situation is the same.
> Tested on systems with WinXP SP1 and SP2. WZC is turned off.
>
> Any siggestions, links, etc would be highly appreciated!
>
> TIA,
> Serhiy
>
>
> requesting SSID value:
> ---------------------
>
> UCHAR QueryBuffer[sizeof(NDISUIO_QUERY_OID) +
> sizeof(NDIS_802_11_SSID)];
> PNDISUIO_QUERY_OID pQueryOid;
>
> pQueryOid = (PNDISUIO_QUERY_OID)&QueryBuffer[0];
> pQueryOid->Oid = OID_802_11_SSID;
>
> bSuccess = (BOOLEAN)DeviceIoControl(Handle,
> IOCTL_NDISUIO_QUERY_OID_VALUE,
> (LPVOID)&QueryBuffer[0], sizeof(QueryBuffer),
> (LPVOID)&QueryBuffer[0], sizeof(QueryBuffer),
> &BytesReturned, NULL);
>
> setting SSID value:
> ---------------------
>
> UCHAR SetBuffer[sizeof(NDISUIO_SET_OID) - sizeof(ULONG) +
> sizeof(NDIS_802_11_SSID)];
> PNDISUIO_SET_OID pSetOid;
>
> pSetOid = (PNDISUIO_SET_OID)&SetBuffer[0];
> pSetOid->Oid = OID_802_11_SSID;
>
> PNDIS_802_11_SSID psSSID = (PNDIS_802_11_SSID)pSetOid->Data;
> psSSID->SsidLength = strlen((char *)pSrcSSID);
> memcpy(psSSID->Ssid, pSrcSSID, psSSID->SsidLength);
>
> bSuccess = (BOOLEAN)DeviceIoControl(Handle,
> IOCTL_NDISUIO_SET_OID_VALUE,
> (LPVOID)&SetBuffer[0], sizeof(SetBuffer),
> NULL, 0,
> &BytesReturned, NULL);
>
Archived from groups: microsoft.public.win32.programmer.networks,microsoft.public.windows.networking.wireless (More info?)
Additional advice : Check in debugger ( windbg e.g.) if you send the same
data as WZC to Ndisuio
Arkady
"Pavel A." <pavel_a@NOwritemeNO.com> wrote in message
news:17FF6910-0B24-4B38-A888-62B2087AE270@microsoft.com...
> At least, Disassociate should work.
> So you might be doing something wrong - in our business every single bit
> matters...
>
> --PA
>
> "Serhiy Smirnov" wrote:
>> Hello,
>>
>> I'm trying to configure my 802.11g wireless network card using
>> DeviceIoControl and NDISUIO interface.
>>
>> First, I request current SSID from the card. Then I set it to my
>> specific value using code below. Set operation returns success. And
>> then I request SSID again to verify if the set operation really
>> succeeded. But I get the same values as it was before my SET, so
>> network card doesn't switch to new SSID. The same situation if I try
>> to change infrastructure mode (OID_802_11_INFRASTRUCTURE_MODE) and
>> configuration (OID_802_11_CONFIGURATION). Trying to do
>> OID_802_11_DISASSOCIATE before sending or requesting any data returns
>> success too but doesn't help.
>> My be I'm missing some obvious things (wait, reset, additional
>> operations)?
>>
>> Configuring card with manufacturer's utility works fine, howewer.
>>
>> I know about the issue that NDISUIO is now reserved for use by
>> Windows, but with my own driver (derived from NDISUIO sample)
>> situation is the same.
>> Tested on systems with WinXP SP1 and SP2. WZC is turned off.
>>
>> Any siggestions, links, etc would be highly appreciated!
>>
>> TIA,
>> Serhiy
>>
>>
>> requesting SSID value:
>> ---------------------
>>
>> UCHAR QueryBuffer[sizeof(NDISUIO_QUERY_OID) +
>> sizeof(NDIS_802_11_SSID)];
>> PNDISUIO_QUERY_OID pQueryOid;
>>
>> pQueryOid = (PNDISUIO_QUERY_OID)&QueryBuffer[0];
>> pQueryOid->Oid = OID_802_11_SSID;
>>
>> bSuccess = (BOOLEAN)DeviceIoControl(Handle,
>> IOCTL_NDISUIO_QUERY_OID_VALUE,
>> (LPVOID)&QueryBuffer[0], sizeof(QueryBuffer),
>> (LPVOID)&QueryBuffer[0], sizeof(QueryBuffer),
>> &BytesReturned, NULL);
>>
>> setting SSID value:
>> ---------------------
>>
>> UCHAR SetBuffer[sizeof(NDISUIO_SET_OID) - sizeof(ULONG) +
>> sizeof(NDIS_802_11_SSID)];
>> PNDISUIO_SET_OID pSetOid;
>>
>> pSetOid = (PNDISUIO_SET_OID)&SetBuffer[0];
>> pSetOid->Oid = OID_802_11_SSID;
>>
>> PNDIS_802_11_SSID psSSID = (PNDIS_802_11_SSID)pSetOid->Data;
>> psSSID->SsidLength = strlen((char *)pSrcSSID);
>> memcpy(psSSID->Ssid, pSrcSSID, psSSID->SsidLength);
>>
>> bSuccess = (BOOLEAN)DeviceIoControl(Handle,
>> IOCTL_NDISUIO_SET_OID_VALUE,
>> (LPVOID)&SetBuffer[0], sizeof(SetBuffer),
>> NULL, 0,
>> &BytesReturned, NULL);
>>
You are about to answer a thread that has been inactive for more than 6 months. If you still wish to proceed, please ensure that your posting is original and does not duplicate or overlap any prior responses to this thread.