Sign in with
Sign up | Sign in
Your question

How to query 802.11 OIDs from NDIS

Last response: in Windows XP
Share
Anonymous
a b \ Driver
May 12, 2005 11:33:47 PM

Archived from groups: microsoft.public.development.device.drivers,microsoft.public.pocketpc.developer.networking,microsoft.public.windowsxp.device_driver.dev (More info?)

Hi all,

I have written a simple application in which I open the handle to file
NDISUIO_DEVICE_NAME and then use IOCTL_NDISUIO_QUERY_OID_VALUE in the call
to DeviceIOControl() to query different 802.11 OIDs like OID_802_11_SSID,
OID_802_11_RSSI etc etc and some other OIDs like OID_GEN_RCV_OK,
OID_GEN_XMIT_OK. The sample code is shown below:

BOOL MyClass::IOQueryOID(HANDLE hNdisUio, PTCHAR adapter_name, NDIS_OID oid,
LPVOID pData, int length)
{
DWORD dwBytesReturned = 0;
PNDISUIO_QUERY_OID pQOid=NULL;
DWORD dwQueryOidBufferSize = sizeof(NDISUIO_QUERY_OID) + length;

pQOid = (PNDISUIO_QUERY_OID) new BYTE[dwQueryOidBufferSize];
if (!pQueryOid)
{
return false;
}

pQueryOid->Oid = oid;
pQueryOid->ptcDeviceName = adapter_name;

if(!DeviceIoControl(hNdisUio,
IOCTL_NDISUIO_QUERY_OID_VALUE,
pQueryOid,
dwQueryOidBufferSize,
pQueryOid,
dwQueryOidBufferSize,
&dwBytesReturned,
0))
{
delete [] pQueryOid;
return false;
}

if(pData != NULL && length > 0)
memcpy(pData, &pQueryOid->Data[0], (dwBytesReturned < length) ?
dwBytesReturned : length);

delete [] pQueryOid;
return true;
}

But now i want to open file DD_NDIS_DEVICE_NAME and want to query same
OIDs..how should i do this?

Thanks,

Arsalan

More about : query 802 oids ndis

Anonymous
a b \ Driver
May 13, 2005 3:04:37 PM

Archived from groups: microsoft.public.development.device.drivers,microsoft.public.pocketpc.developer.networking,microsoft.public.windowsxp.device_driver.dev (More info?)

If that device support those you can try
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q304296
Arkady
"Arsalan Ahmad" <arsal__@hotmail.com> wrote in message
news:u1LcCjxVFHA.3620@TK2MSFTNGP09.phx.gbl...
> Hi all,
>
> I have written a simple application in which I open the handle to file
> NDISUIO_DEVICE_NAME and then use IOCTL_NDISUIO_QUERY_OID_VALUE in the call
> to DeviceIOControl() to query different 802.11 OIDs like OID_802_11_SSID,
> OID_802_11_RSSI etc etc and some other OIDs like OID_GEN_RCV_OK,
> OID_GEN_XMIT_OK. The sample code is shown below:
>
> BOOL MyClass::IOQueryOID(HANDLE hNdisUio, PTCHAR adapter_name, NDIS_OID
> oid, LPVOID pData, int length)
> {
> DWORD dwBytesReturned = 0;
> PNDISUIO_QUERY_OID pQOid=NULL;
> DWORD dwQueryOidBufferSize = sizeof(NDISUIO_QUERY_OID) + length;
>
> pQOid = (PNDISUIO_QUERY_OID) new BYTE[dwQueryOidBufferSize];
> if (!pQueryOid)
> {
> return false;
> }
>
> pQueryOid->Oid = oid;
> pQueryOid->ptcDeviceName = adapter_name;
>
> if(!DeviceIoControl(hNdisUio,
> IOCTL_NDISUIO_QUERY_OID_VALUE,
> pQueryOid,
> dwQueryOidBufferSize,
> pQueryOid,
> dwQueryOidBufferSize,
> &dwBytesReturned,
> 0))
> {
> delete [] pQueryOid;
> return false;
> }
>
> if(pData != NULL && length > 0)
> memcpy(pData, &pQueryOid->Data[0], (dwBytesReturned < length) ?
> dwBytesReturned : length);
>
> delete [] pQueryOid;
> return true;
> }
>
> But now i want to open file DD_NDIS_DEVICE_NAME and want to query same
> OIDs..how should i do this?
>
> Thanks,
>
> Arsalan
>
>
Anonymous
a b \ Driver
May 17, 2005 6:17:50 PM

Archived from groups: microsoft.public.development.device.drivers,microsoft.public.pocketpc.developer.networking,microsoft.public.windowsxp.device_driver.dev (More info?)

Hi,

I am developing an application on Pocket PC 2003 which uses NDISUIO to query
different oids like OID_802_11_FRAGMENTATION_THRESHOLD, OID_11_RTS_THRESHOLD
etc. However I am getting Not Supported for these OIDs when I query for the
supported OIDs from NDISUIO driver. But even then if I need to query these
OIDs, then please tell me what should i do? Is there any other interface
available for this? Or can I query the NIC driver directly rather than using
the NDISUIO driver? My application runs on Pocket PC 2003.

Thanks,

Arsalan
"Arkady Frenkel" <arkadyf@hotmailxdotx.com> wrote in message
news:o hUtXJ5VFHA.4056@TK2MSFTNGP15.phx.gbl...
> If that device support those you can try
> http://support.microsoft.com/default.aspx?scid=kb;en-us;Q304296
> Arkady
> "Arsalan Ahmad" <arsal__@hotmail.com> wrote in message
> news:u1LcCjxVFHA.3620@TK2MSFTNGP09.phx.gbl...
>> Hi all,
>>
>> I have written a simple application in which I open the handle to file
>> NDISUIO_DEVICE_NAME and then use IOCTL_NDISUIO_QUERY_OID_VALUE in the
>> call to DeviceIOControl() to query different 802.11 OIDs like
>> OID_802_11_SSID, OID_802_11_RSSI etc etc and some other OIDs like
>> OID_GEN_RCV_OK, OID_GEN_XMIT_OK. The sample code is shown below:
>>
>> BOOL MyClass::IOQueryOID(HANDLE hNdisUio, PTCHAR adapter_name, NDIS_OID
>> oid, LPVOID pData, int length)
>> {
>> DWORD dwBytesReturned = 0;
>> PNDISUIO_QUERY_OID pQOid=NULL;
>> DWORD dwQueryOidBufferSize = sizeof(NDISUIO_QUERY_OID) + length;
>>
>> pQOid = (PNDISUIO_QUERY_OID) new BYTE[dwQueryOidBufferSize];
>> if (!pQueryOid)
>> {
>> return false;
>> }
>>
>> pQueryOid->Oid = oid;
>> pQueryOid->ptcDeviceName = adapter_name;
>>
>> if(!DeviceIoControl(hNdisUio,
>> IOCTL_NDISUIO_QUERY_OID_VALUE,
>> pQueryOid,
>> dwQueryOidBufferSize,
>> pQueryOid,
>> dwQueryOidBufferSize,
>> &dwBytesReturned,
>> 0))
>> {
>> delete [] pQueryOid;
>> return false;
>> }
>>
>> if(pData != NULL && length > 0)
>> memcpy(pData, &pQueryOid->Data[0], (dwBytesReturned < length) ?
>> dwBytesReturned : length);
>>
>> delete [] pQueryOid;
>> return true;
>> }
>>
>> But now i want to open file DD_NDIS_DEVICE_NAME and want to query same
>> OIDs..how should i do this?
>>
>> Thanks,
>>
>> Arsalan
>>
>>
>
>
Anonymous
a b \ Driver
May 17, 2005 6:17:51 PM

Archived from groups: microsoft.public.development.device.drivers,microsoft.public.pocketpc.developer.networking,microsoft.public.windowsxp.device_driver.dev (More info?)

"Arsalan Ahmad" <arsal__@hotmail.com> wrote in message
news:o p9w1ptWFHA.2288@TK2MSFTNGP14.phx.gbl...
> Hi,
>
> I am developing an application on Pocket PC 2003 which uses NDISUIO to
> query different oids like OID_802_11_FRAGMENTATION_THRESHOLD,
> OID_11_RTS_THRESHOLD etc. However I am getting Not Supported for these
> OIDs when I query for the supported OIDs from NDISUIO driver. But even
> then if I need to query these OIDs, then please tell me what should i do?
> Is there any other interface available for this? Or can I query the NIC
> driver directly rather than using the NDISUIO driver? My application runs
> on Pocket PC 2003.
>
> Thanks,
>
> Arsalan

If you are getting the "not supported" status for these NDIS queries, then
that means that the information simply is not provided by the miniport.

If you look in the MSDN topic "802.11 Wireless LAN Objects" you will see
that these OIDs (and others) are listed as "optional". This means that the
802.11 miniport writer is not required to support them. In many cases, if
the OID is listed as Optional, then that means that you probaly will never
be able to get the information.

In this case there is no way to fetch the information - regardless of how
you try to get it.

Sorry.

Thomas F. Divine, Windows DDK MVP
http://www.rawether.net
!