wireless signal strength

C

Christian Verdani

Hello,

i want to query the signal strength of the nearby accesspoints on my
notebook.
I found out that i have to query the NDIS drivers, however the MSDN does not
offer smaple code how to do that (or i am to silly to find one).
I am working with visual c++. Can anyone tell me how to do that or can
anyone tell me a better solution?


sincerly,
Cristian
 
M

Maxim S. Shatskih

Try WMI, this is possibly the easiest way.

You can also try to send OID_802_11_RSSI to the kernel-mode components via
IOCTL_NDIS_QUERY_GLOBAL_STATS.
 
M

Michael Grobelkovsky

See DDK for OID_802_11_RSSI.

Download also Oidscope.exe aplication.
It simulates OID_802_11_RSSI.

Michael.
 
C

Christian Verdani

Hello,
i have fought throught the MSDN and a few web pages. now i have a solution,
hoever, i don't know how to extract the data from the result.

The code snipet looks like this:


hres = pSvc->ExecQuery(
bstr_t("WQL"), bstr_t("SELECT * FROM
MSNdis_80211_ReceivedSignalStrength Where active=true"),
WBEM_FLAG_FORWARD_ONLY | WBEM_FLAG_RETURN_IMMEDIATELY, NULL,
&pEnumerator);


IWbemClassObject *pclsObj;
ULONG uReturn = 0;

while (pEnumerator)
{
HRESULT hr = pEnumerator->Next(WBEM_INFINITE, 1, &pclsObj,
&uReturn); //WBEM_INFINITE

if(0 == uReturn)
{
cout << "Need to BREAK!" << endl;
break;
}

VARIANT vtProp;
VariantInit(&vtProp);

// Get the value of the Name property
hr = pclsObj->Get(L"Name", 0, &vtProp, 0, 0);
// wcout << " OS Name : " << vtProp.bstrVal << endl;

VariantClear(&vtProp);
}





is there any location that describes the results i get from my query?





sincerly,
christian
 
P

Pavel A.

No, MSNdis_80211_ReceivedSignalStrength is the RSSI value of the
currently associated AP.
You need to get the scan list (SSIDs with their RSSI).
If you prefer using WMI, please search in the WMI newsgroups
( microsoft.public.windowsxp.wmi ...)

Or follow the advise of MVP Arkady Frenkel.

To interpret results of all these queries, you need description of
the 802_11 specific OIDs in the latest DDK documentation.
(if you haven't read it yet, do this now).

--PA
 
A

Arkady Frenkel

Maybe Cristian mean how to treat received value , in this case miniport have
to return it in
decibel milliwatts ( dBm ) and typical range are from -10 to -200
Arkady
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top