Thomas
Thu May 26 15:27:45 CDT 2005
"Wojciech F." <"vankaszaner[REMOVE_IT]"@tlen.pl> wrote in message
news:1rvbva82kaysf$.dlg@tofik.homeip.net...
>I try to get signal strength and MAC's of all access points in user-mode. I
> try to make it without NDISUIO writing in pure C.
> I made a little app which uses WMI and Setup Api to find wireless network
> card.
> Unfortunately I do not know how to SET OID_802_11_BSSID_LIST_SCAN oid.
> Passing it to DeviceIoControl with IOCT_QUERY_GLOBAL_STATS returns FALSE
> and error: "50. The network request is not supported."
> ERROR_NOT_SUPPORTED".
> Although using only the query: OID_802_11_BSSID_LIST seems to work (list
> refreshes itself) but e.g. when I run Netstumbler (during work of my app)
> DeviceIoControl fails and getlasterror() shows error: "31 A device
> attached
> to the system is not functioning. ERROR_GEN_FAILURE ". And the most
> irritating thing is, that Netstumbler sees more access points than my
> programm.
> help.....
The NetStumbler author has access to some adapter vendor proprietary
information. For these adapters he uses non-NDIS adapter-vendor proprietary
APIs to fetch information that isn't accessable through NDIS. This
information is only available through license agreements with adapter
vendors.
When NetStumbler is in use it is certainly possible that the adapter may
appear to be non-functional to Windows (Although I haven't seen this
behavior myself.) No, I am not the NetStumbler author, although some
versions of NetStumbler do use PCAUSA NDIS protocol drivers.
As Pavel A. said the OS periodically makes the OID_802_11_BSSID_LIST_SCAN
call at about 60-second intervals. So, about 83% of the time you should get
a complete BSSID list if you query the OID_802_11_BSSID_LIST using WMI or
IOCT_QUERY_GLOBAL_STATS.
Do be sure to pass a LARGE buffer to be filled with list items when you make
the query.
Good luck,
Thomas F. Divine, Windows DDK MVP
http://www.rawether.net