Re: pb with OID_802_11_BSSID_LIST_SCAN

From: Yannick SCHMIEDER (y.schmieder_at_swinnovaiton.com)
Date: 03/24/04


Date: Wed, 24 Mar 2004 11:29:57 +0100

I open my device with its name because when I use the NDISUI_DEVICE_NAME
with the device name in the queryOID->ptcDeviceName = adapName nothing
works.
Paul T., I have try your project "RFSSIDList", but the problem is that I
need some files like windev.h, lss.h, etc. I have understand that I can find
these files in the Platform Builder (am I right ?) but when I try to install
PB I always have an error during the installation. To compile your project I
put the #include <windev.h> and the #include "ndis.h" in commentary (//)
and I replace the IOCTL_NDISUIO_SET_OID_VALUE by its hex value. Maybe I make
a enormous mistake by forgiving the include of windev.h and ndis.h, are they
mandatory ? I build it with evc4 and pocketPC2003 SDK.

I have try lot of possibilities in the DeviceIOControl : NULL with 0,
queryBuffer[ 0 ] with 1024, queryBuffer[ 0 ] with 0. Anything is working. I
put queryBuffer[ 0 ] with 0 in the case I show you because I have seen it in
WRAPI.

The other idea you have is that the device doesn't handle the OID, but I
have look at supported OID(with OID_GEN_SUPPORTED_LIST) and the
OID_802_11_BSSID_LIST_SCAN is in the list. Maybe it is simply my device wich
does not really support this command (it is a dell axim x3i pocket pc 2003).
Maybe you have a reference of pocket pc with built in wifi wich works
perfectly with your code.

I become desperate, so If you manage to solve my problem or to find a
solution, I will probably send you a postcard from where I come or even send
you a bottle of wine.

"Paul G. Tobey [eMVP]" <ptobey_no_spam@instrument_no_spam.com> wrote in
message news:OCp10VPEEHA.2424@TK2MSFTNGP09.phx.gbl...
> You have to be talking to NDISUIO to send that message. Don't try to open
> your device name for that purpose. It's quite possible that the driver
for
> the RF on that device doesn't handle the OID, and there's also a
possibility
> that passing a pointer for the output buffer, but passing a size of zero
is
> causing a test in the driver to fail before it does anything. Can you
tell
> us why you are doing that, rather than passing NULL with 0, or passing the
> length 1024 with &queryBuffer[ 0 ]?
>
> Paul T.
>
> "Yannick SCHMIEDER" <y.schmieder@swinnovaiton.com> wrote in message
> news:OVwrXFPEEHA.3424@tk2msftngp13.phx.gbl...
> > hi all,
> > i am trying to scan my wifi environement with a pocket pc 2003 but i
have
> a
> > trouble. The only thing that I want to do is to scan my environement to
> have
> > the list of access point.
> > When i run the following code i have an error, could you tell me what is
> > wrong.
> >
> > UCHAR QueryBuffer[1024];
> > PNDISUIO_SET_OID pSetOid;
> > HANDLE ndisAccess;
> > ndisAccess = INVALID_HANDLE_VALUE;
> >
> > BOOL retval;
> >
> > // I use my device name (_T("SCP1:") in my case) because it does not
> > work
> > // if i use NDISUI_DEVICE_NAME with the device name
> > // in the queryOID->ptcDeviceName = adapName;
> > ndisAccess = CreateFile( deviceName//NDISUIO_DEVICE_NAME
> > ,
GENERIC_READ|GENERIC_WRITE//
> 0
> > , 0
> > , NULL
> > , OPEN_EXISTING
> > , FILE_ATTRIBUTE_NORMAL |
> > FILE_FLAG_OVERLAPPED
> > , INVALID_HANDLE_VALUE
> > );
> > if ( ndisAccess == INVALID_HANDLE_VALUE )
> > return -1;
> >
> > pSetOid = (PNDISUIO_SET_OID) &QueryBuffer[0];
> > pSetOid->Oid = OID_802_11_BSSID_LIST_SCAN;
> >
> > retval = DeviceIoControl(ndisAccess,
> >
> > 0x205,//IOCTL_NDISUIO_SET_OID_VALUE,
> > (LPVOID) &QueryBuffer[0],
> > 1024,
> > (LPVOID) &QueryBuffer[0],
> > 0,
> > &dwBytesReturned,
> > NULL);
> > if (!retval)
> > {
> > int ret = GetLastError();
> > printf("%d",ret);
> > }
> > the last error was 87 -> "The parameter is incorrect.
> > ERROR_INVALID_PARAMETER"
> >
> > I have made querys by myself(programmatically) like OID_802_11_RSSI,
etc.
> > and all works fine.
> > My device is a dell axim x3i with built in wifi and pocket pc 2003 OS.
I
> > have try other set_oid_value like OID_802_11_DISASSOCIATE but it does
not
> > work. Maybe i made a mistake in my createFile attribute but i don't
really
> > see what can be wrong.
> >
> > Someone has suggested me to try without the FILE_FLAG_OVERLAPPED flag
but
> > when i do that, the getLastError() returns 120->"this function is not
> > supported on this system ERROR_CALL_NOT_IMPLEMENTED".
> > I have look at supported OID(with OID_GEN_SUPPORTED_LIST) and the
> > OID_802_11_BSSID_LIST_SCAN is in the list.
> >
> > Maybe it cames from my included files, I just included ntddndis.h and
> > nuiouser.h. Should I include ndis.h ? I have not include ndis.h because
it
> > generates some errors due to missing headers.
> > Another thing is that I put the hex value of
IOCTL_NDISUIO_SET_OID_VALUE
> > because it generates an errors at compilation.
> >
> > thx for your help.
> >
> >
>
>



Relevant Pages

  • Re: pb with OID_802_11_BSSID_LIST_SCAN
    ... Paul T., I have try your project "RFSSIDList", but the problem is that I ... does not really support this command (it is a dell axim x3i pocket pc 2003). ... > that passing a pointer for the output buffer, but passing a size of zero ... > causing a test in the driver to fail before it does anything. ...
    (microsoft.public.pocketpc.developer)
  • Re: pb with OID_802_11_BSSID_LIST_SCAN
    ... Paul T., I have try your project "RFSSIDList", but the problem is that I ... does not really support this command (it is a dell axim x3i pocket pc 2003). ... > that passing a pointer for the output buffer, but passing a size of zero ... > causing a test in the driver to fail before it does anything. ...
    (microsoft.public.windowsce.app.development)
  • Re: pb with OID_802_11_BSSID_LIST_SCAN
    ... Paul T., I have try your project "RFSSIDList", but the problem is that I ... does not really support this command (it is a dell axim x3i pocket pc 2003). ... > that passing a pointer for the output buffer, but passing a size of zero ... > causing a test in the driver to fail before it does anything. ...
    (microsoft.public.pocketpc.developer.networking)
  • RE: changing hyperlinks within item templates at runtime
    ... Paul, there are a couple ways to go, but here's one: return the string for your "return page" from a public function of the page class, then use something like... ... want to redirect them back from ... where they came (passing the stockitemID). ... I'm using a datagrid to display the items that fit the search criteria. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Theres sometimes a cop around when you need one
    ... that's a problem for the cops to solve. ... car to pull this asshole move of brush passing and then slamming on the ... which meant I violated no part of the traffic code and his driver racked ... They are dangerous bicycle ghettos. ...
    (rec.autos.driving)