|
Hi Richard,
Thanks for trying. This thread was amusing and educational.
BDF
People don't mind being mean; but they never want to be ridiculous.
-- Moliere
|
|
|
|
|
Big Daddy Farang wrote: Thanks for trying. This thread was amusing and educational.
A pity it did not succeed! But thanks for the comment; always appreciated, even on those many occasions when I get it all wrong.
|
|
|
|
|
Hi,
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.
NDIS_802_11_BSSID_LIST* m_pBSSIDList;
m_pBSSIDList = (NDIS_802_11_BSSID_LIST *) VirtualAlloc (NULL,
sizeof (NDIS_802_11_BSSID_LIST) * NUMBEROF_BSSIDS,
MEM_RESERVE | MEM_COMMIT,
PAGE_READWRITE) ;
memset (m_pBSSIDList, 0, sizeof (NDIS_802_11_BSSID_LIST) * NUMBEROF_BSSIDS);
oidcode = OID_802_11_BSSID_LIST_SCAN;
DeviceIoControl (m_handle,
IOCTL_NDIS_QUERY_GLOBAL_STATS,
&oidcode,
sizeof(oidcode),
(ULONG *) NULL,
0,
&bytesreturned,
NULL);
Sleep (6100);
oidcode = OID_802_11_BSSID_LIST;
if (DeviceIoControl( m_handle,
IOCTL_NDIS_QUERY_GLOBAL_STATS,
&oidcode,
sizeof(oidcode),
(ULONG *) m_pBSSIDList,
sizeof(NDIS_802_11_BSSID_LIST) * NUMBEROF_BSSIDS,
&bytesreturned,
NULL) == 0)
{
return NULL;
}
else
{
return m_pBSSIDList;
}
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,
--Amit.
|
|
|
|
|
See responses here.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Hi David,
Thanks for your answer.
it answered my first question, but the second question, that bothers me much more is still left unanswered.
My problem is that the Wireless Card returns old scanned data, that is no longer relevant, of APs that are no longer on air.
According to the text in here:
http://msdn.microsoft.com/en-us/library/ms799400.aspx[^]
it says that
"...The miniport driver must manage its cached BSSID scan list in the following ways:<br />
<br />
* The driver must clear its BSSID scan list when set by OID_802_11_BSSID_LIST_SCAN before it starts the explicit network scan.<br />
...<br /> "
I tried my code, which uses the OID_802_11_BSSID_LIST_SCAN command, on 2 different Wireless NICs (DELL, and Intel) and both Wireless NICs did not clear the history and kept returning the result of old scanned APs that are no longer on air.
Can you maybe help me here as well ?
Thanks,
-- Amit.
|
|
|
|
|
What happens if you issue the OID_802_11_BSSID_LIST commad by itself? I have no idea if that is even valid. I'm just tossing out ideas.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
I don't think that it will help.
According to the documentation the Wireless card will return it's most up to date database, without flushing old information.
The data may have been collected using passive scan or any other action that the card's driver was doing to collect, before the _LIST query (command) was issued.
|
|
|
|
|
Hi:
I also got the confusion with this question, when I want collect each AP's RSSI real-time.
quote:
The miniport driver must manage its cached BSSID scan list in the following ways:
The driver must clear its BSSID scan list when set by OID_802_11_BSSID_LIST_SCAN
before it starts the explicit network scan.
Because we use the OID in the upper layer of the system. The Application just pass down the OID to the under miniport driver. It seems that the driver will do the clear things for us. The actual implement of the hardware is variety, so it is unforeseen.
|
|
|
|
|
Hi Fibers,
here are my understandings about this issue:
1. The fastest promised "response time" for updated information that you can get using NDIS API will be around 6 seconds.
2. If you need faster response time then this - you need to work wuth wireless NIC's drivers.
3. In order to check yourself, you may do some tests and from time to time switch the power of the transmitting AP on/off. when you switch it off - you will know exactly when the reading of the relevant AP should vanish from the list.
according to my tests, I could not make them disappear fast, i.e. the reading of the AP that is no longer on air, kept reporting as if it was on air, sometimes for about 1-2 minutes (!!!) after the AP was turned off. the rx database was not flushed and held old information.
This, of course, is not what I wanted.
The scan command, which should have flush the RXed AP's database, surely did not work.
I think that this problem is due to incompatibility of the Wireless card's vendors with NDIS requirements.
If you find any wireless card (NIC) that the NDIS SCAN command actually cleans the old data from the database, using NDIS interface, please inform me with the exact model of the wireless NIC.
If you find any wireless NIC that you can access it's Firmware and control it using your code (bypass the NDIS level), and that can do it with no cost (no need to pay for information on how to do this), please update me as well with the wireless card's model and brand, and with relevant sample code.
As a matter of fact, I think that in order to achieve fast response, this is that direction that you should focus on.
Any help will be very much appreciated !
In second thought, please update us anyway
Thanks a lot and good luck.
-- Amit.
|
|
|
|
|
|
Infinite1UP wrote: I either want to resolve this error or just suppress the error message since it doesn't provide any useful information.
The dialog message clearly states that it cannot find the file in question and thus the program cannot continue. You have also obliterated part of the directory path on your picture so it is not possible to tell if there is something else wrong with the path. You should use the debugger to trace through your program until you get to the point at which it tries to open the file and then check both the path that you are trying to open, and the path where the file is stored.
|
|
|
|
|
The program completes the extraction from the RGSSAD archive with no trouble, the error message doesn't appear until all the files in the archive are extracted, that's why the message is useless. There is nothing wrong with the path as the files that it says aren't there are indeed present and intact at that location.
If the code looks okay then I'm really stumped.
modified on Sunday, October 4, 2009 9:27 PM
|
|
|
|
|
Infinite1UP wrote: There is nothing wrong with the path as the files that it says aren't there are indeed present and intact at that location.
Logically thinking, this is not possible, so we need to consider why the program is throwing this error. The only thing that I can think of is that the path being used to access the file is somehow incorrect, but the path put into the message is the correct path of the actual file. I can only suggest that you step through the program with the debugger until you get to the point of failure (or set a breakpoint at that line) and check the values of all the relevant variables to see what is going on.
|
|
|
|
|
I'm new to MFC and I'm trying to get the grid control to work in a very basic fashion. I really headed down this path because I wanted a better multi-column listbox than it seemed that MFC supported. I probably don't need a Y-axis set of buttons (vertical column 0) but I do need column header buttons that can be used for sorting the rows etc. The demo program does more than I need. I tried to create a custom control on a new form and display a simple grid control and it is failing.
Q. Can the grid control be configured to not display the y-axis buttons?
Q. Does anybody have source-code for a more simple multi-column listbox example using this grid-control like I am describing?
Thanks!
|
|
|
|
|
|
Use rather native Win32 Grid controls, mainly undocumented ones which can do everything... with a few lines of code
|
|
|
|
|
hello friends
i made an application, it works fine in all OS`s except vista 32 bit.
i believe i am missing some macro and i don`t know what macro i should define in order to run my application on vista
Any suggestion is greatly appreciated
Thanks
|
|
|
|
|
Aabid wrote: Any suggestion is greatly appreciated
I suggest you consult a mind reader.
|
|
|
|
|
have u consulted Michael Schubert
|
|
|
|
|
Michael is saying that we have no idea what your problem is. All you have told us is that your program does not work; and yet you seem to think we might know how to fix it.
|
|
|
|
|
Hm, yeah. I did not think of the possibility that he might not get the hint.
|
|
|
|
|
|
|
You should post it in the Collaboration / Testing [^] forum.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi,Here is the question:
How to develop a Peer-to-Peer networking conference through Windows Peer-to-Peer SDK?
I know that through Microsoft's Windows Peer-to-Peer SDK we can develop the Peer-to-Peer applications convenient.But in the Windows Peer-to-Peer SDK's help book,it just said that the Peer-to-Peer Infrastructure does not support audio or video streaming.So developing Peer-to-Peer networking conference with PNRP is a little difficult.
I also know the WCF in the Microsoft's vista OS provide a strong support about developing P2P applications,So how can I do with it in VC++?
I just want to develop a pure Peer-to-Peer networking conference in VC++.Can anyone else help me?
Thank you very much~~~
lktse
dbs-soft,Inc.
|
|
|
|