Pocket PC Networking >> NDISUIO API and OID_802_11_BSSID

by Sibon Barman » Thu, 14 Apr 2005 06:41:38 GMT

I am trying to use the NDISUIO API to connect to a particular access point
(BSSID). But it seems like I am always getting error from the miniport
driver even though according to MS website
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wceddk40/html/cmrefoid_802_11_bssid_list_scan.asp)
the setting of OID_802_11_BSSID is mandatory by the miniport driver. I am
using Toshiba e830 and have tested the same code on a few hp PDAs running
Windows Mobile 2003/2003 SE with same result. Here is the snippet of the
code that is producing the error:



BOOL
WIFIDriverAdapter::ConnectToBssid(NDIS_802_11_MAC_ADDRESS *pBssid){

static const TCHAR *methodName = _T("WIFIDriverAdapter::ConnectToBssid");



STLOG_MARKER(methodName);

DWORD dwIOCReturn;
CHAR cBuffer[1024];
PNDISUIO_SET_OID pSetOid;
pSetOid = (PNDISUIO_SET_OID)cBuffer;
DWORD dwReturnedBytes;

dwReturnedBytes = 1024;
pSetOid->Oid = OID_802_11_BSSID;
pSetOid->ptcDeviceName = m_pCurrentWlanInfo->IntfEntry.wszGuid;





for (int i =0; i< 6; i++){
pSetOid->Data[i] = (*pBssid)[i];
}



STLOG(_T("%s: Trying to connect to BSSID [%s]\r\n"), methodName,
CommonUtility::FromBssid(pBssid));


if (DoNdisUIOControl(IOCTL_NDISUIO_SET_OID_VALUE, &dwIOCReturn, pSetOid,
sizeof(NDISUIO_SET_OID
), NULL, &dwReturnedBytes)){
STLOG(_T("%s: Setting BSSID successful\r\n"), methodName);
return TRUE;
} else {
STLOG(_T("%s: !!!!!BSSID Set Unsuccessful!!!!!!!!\r\n"), methodName);
return FALSE;
}



}



When I run the code I am getting the following error:

22:46:22(7230991),thr 0x3E23FC66 : !!!!!!!!!!!DeviceIoControl
error!!!!!!!!
22:46:22(7230992),thr 0x3E23FC66 : GetLastError returned : 0x00000032: The
network request is not supported. )
22:46:22(7230993),thr 0x3E23FC66 : WIFIDriverAdapter::ConnectToBssid:
!!!!!BSSID Set Unsuccessful!!!!!!!!



Setting of other OIDS like OID_802_11_SSID works with the driver from al the
PDAs. Only setting of OID_802_11_BSSID is giving problem. Am I setting the
PNDISUIO_SET_OID structure correctly? Is there something I have to do before
to get this to work. I have disabled the WZC before invoking this method.



Any help would be greatly appreciated.




Similar Threads

1. How to get OID_802_11_BSSID from iPaq 5500

Hi,

Let me know how to get OID_802_11_BSSID  value from WLAN card in iPaq 5500.
Thank you,

wphong

2. OID_802_11_BSSID returns extrange data - Pocket PC Networking

3. NDIS driver - implementation of OID_802_11_BSSID

Hello - what is the correct behavior when my NDIS driver is called to SET 'OID_802_11_BSSID'?
The DDK says to set the MAC address of the (associated) Access Point to a specific value - how is this possible?  The AP's MAC address is a function of its own configuration.
The '802.11 Design Guide for Windows XP' says that this OID 'sets the MAC address of the desired AP'.  What does this mean?

Thx,
Rick Farrington
ricardofarringtonscm<remove this>@hotmail.com

4. NDIS driver - implemenation of 'OID_802_11_BSSID'

5. using WinInet Api and TransmitFile Api

Hello,

i have a code where i would like to use WinInet API but i am unable to 
understand few things

1) The program is developed using win32 api's and winsock. In that 
environemnt how do i use WinInet Api for transferring the file from 1 pc to 
another

2)Once i make my ftp client, how do i  make my server application to fetch 
the request.I mean what should be my server side code.

3) There are no actual  servers in my application. All computers in the 
network are same and running the same code. In that case(in the absence of 
FTP server) can i even use that API


Also i had an another doubt on using TransmitFile API.....now how do i use 
this api in my application. I mean to say once i have the sender send the 
file...how does the receiver receive it....what should be the receiving code 
when we use that API....i tried using normal recv() function but it did not 
work.....I would request to give me a sample code  on both sender and receive 
side

Thanks

kunal s patel 

6. How to get other bss information from ndisuio? - Pocket PC Networking

7. NDISUIO connection problems

I am working on a WLAN connection module.  It is written using the
NDISUIO interface to connect my local wifi radio to remote APs.  My
module works fine on the windows desktop.  When I attempt to connect
to a remote AP using WM 5.0, the connection seems to connect for about
2 seconds then disconnects.  I am setting the Authentication Mode
(Ndis802_11AuthModeOpen), Network Mode (Ndis802_11Infrastructure),
Encryption/WEP Mode (Ndis802_11WEPDisabled), then SetSSID.  When I
look at the iPaq 802.11 WLAN monitoring program, it starts out at
"Disconnected".  It will show connected for about 2 seconds, then
disconnect.  Sometimes it shows an IP and sometimes it shows 0.0.0.0.
We're using DHCP.  Using an over the air packet sniffer, I see the
Association Request from the iPaq, Association Response from the AP,
then nothing for a couple of seconds until the iPaq Disassociates.  

Is there a step I'm missing?  Everything I've read seems to indicate
that the steps for NDISUIO desktop and CE are the same.  Maybe I need
to use connection manager after the 802.11 is connected?

Thanks.

Gene Chang.
 XXXX@XXXXX.COM 
remove "_REMOVEME" to e-mail.

8. NDISUIO ReadFile fails with unknown error code - Pocket PC Networking