I wrote a program using VC++ that should scan for available wireless networks in the area.
In my SW I use the commands OID_802_11_BSSID_LIST_SCAN and OID_802_11_BSSID_LIST.
My questions are:
1. How can I Force the Wireless NIC to do ACTIVE SCAN (as contrary to PASSIVE scan) ?
2. According to tests that I did, the card does not flush the list between scans, i.e. I get for several scan a result of an AP that was on air during an old scan, but is no longer there, and new scans return's it's data as if it is still there.
A code part that I used is attached - in order to illustrate which functions I am using.
m_pBSSIDList = (NDIS_802_11_BSSID_LIST *) VirtualAlloc (NULL,
sizeof (NDIS_802_11_BSSID_LIST) * NUMBEROF_BSSIDS,
MEM_RESERVE | MEM_COMMIT,
memset (m_pBSSIDList, 0, sizeof (NDIS_802_11_BSSID_LIST) * NUMBEROF_BSSIDS);
oidcode = OID_802_11_BSSID_LIST_SCAN;
(ULONG *) NULL,
oidcode = OID_802_11_BSSID_LIST;
if (DeviceIoControl( m_handle,
(ULONG *) m_pBSSIDList,
sizeof(NDIS_802_11_BSSID_LIST) * NUMBEROF_BSSIDS,
NULL) == 0)
If you have any idea of how can I solve my problems, or if you see that I forgot any important line- please let me know.
I am open to hear about completely new ways to do this. only requirement is that I will use VC++.
Thanks a lot,