Hi All,

I have a problem using NDIS OIDs to retrieve parametrics of
802_11 rf signal like rssi. I open device handle
and seems to be missing portion on binding and setting parameters
like specific BSSID. Could anybody help/refer me in that matter.

I am using eVC++ 4.0 + ServicePack 3 + iPAQ PocketPC 2003.


In the attached code below DeviceIoControl returns 0 and GetLastError()
returns

87 ( ERROR_INVALID_PARAMETER ).



I tried code with 2 wifi CF cards ( Symbol and Sandisk ).

Device names seemed to be correctly retrieved by GetAdaptersInfo()

for type MIB_IF_TYPE_ETHERNET as NETWLAN1 ( Symbol ) and PRISMNDS1 ( Sandisk ).

I have drivers installed for both wifi cards on PPC2003 and selected appropriately.



Would anybody know why DeviceIoControl fails when querying OID_802_11_RSSI ?

Any pointers to places with examples ?
Should I be using ndis.lib functions to setup driver prior to query ?


Thanks,

Derek





Â?

ndisAccess = CreateFile( NDISUIO_DEVICE_NAME, 0, 0, NULL, OPEN_EXISTING

FILE_ATTRIBUTE_NORMAL | FILE_FLAG_OVERLAPPED,

INVALID_HANDLE_VALUE );



if ( ndisAccess == INVALID_HANDLE_VALUE ) {

return E_FAIL;

}



// Get Signal strength

queryOID = (PNDISUIO_QUERY_OID)&QueryBuffer[0];

queryOID->ptcDeviceName = ptcDeviceName; // = NETWLAN1 for Symbol CFwifi
// = PRISMNDS1 for SanDisk CFwifi

queryOID->Oid = OID_802_11_RSSI;



retval = DeviceIoControl( ndisAccess,

IOCTL_NDISUIO_QUERY_OID_VALUE,

(LPVOID) queryOID,

sizeof(NDISUIO_QUERY_OID) + sizeof(DWORD),

(LPVOID) queryOID,

sizeof(NDISUIO_QUERY_OID) + sizeof(DWORD),

&dwBytesReturned,

NULL);

Â?

Re: PPC2003 / querying OID_802_11_RSSI / NDIS 5.1 by Maxim

Maxim
Fri Apr 02 12:50:56 CST 2004

> Device names seemed to be correctly retrieved by GetAdaptersInfo()

Try IOCTL_NDIS_GET_ADAPTER_NAMES instead. It must be called on a handle which
is a result of opening "NDS0:" filename.

It definitely works, and belongs to the same layer as the OID queries - while
GetAdaptersInfo is IP-layer routine.

Then use IOCTL_NDISUIO_QUERY_OID_VALUE on "UIO1:" filename to query the OID.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com