Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. DeviceIoControl & OID_802_11_BSSID_LIST_SCAN ?

DeviceIoControl & OID_802_11_BSSID_LIST_SCAN ?

Scheduled Pinned Locked Moved C / C++ / MFC
helpdatabasesysadmintutorialquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    clintsinger
    wrote on last edited by
    #1

    Hi All, I am hoping that there is someone out there who will understand my problem as there seems to be very little documentation avalible to read the values of the NDIS 5.1 compatible drivers. I would like to initiate a scan of the BSSID's in my network area. The documentaion tells me I need to use OID_802_11_BSSID_LIST_SCAN to force the wirelss nic to scan the area for access points. Unforetunately I haven't been able to guess how to call this feature. The code that I tried is the following

    	PNDISUIO_QUERY_OID		pQueryOid		= NULL;
    
    	pSetOid = (PNDISUIO_SET_OID)&QueryBuffer[0];
    	pSetOid->ptcDeviceName = _T("WLAGS461");
    	pSetOid->Oid = OID_802_11_BSSID_LIST_SCAN;
    		
    	hr = DeviceIoControl(
    			m_hNdisUio,
    			IOCTL_NDISUIO_SET_OID_VALUE,
    			(LPVOID) pSetOid,
    			sizeof(PNDISUIO_SET_OID),
    			NULL,
    			0,
    			&dwBytesReturned,
    			NULL);
    

    but it fails with error 0x57 (parameter not correct) and I don't know what to change. I also have the following code that I have been using to get the aquired list (or the one already in the NIC database)

    	PNDISUIO_QUERY_OID		pQueryOid		= NULL;
    
    	pQueryOid = (PNDISUIO_QUERY_OID)&QueryBuffer[0];
    	pQueryOid->ptcDeviceName = _T("WLAGS461");
    	pQueryOid->Oid = OID_802_11_BSSID_LIST;
    
    	hr = DeviceIoControl(
    			m_hNdisUio,
    			IOCTL_NDISUIO_QUERY_OID_VALUE,
    			(LPVOID) pQueryOid,
    			0xFFF,
    			(LPVOID) pQueryOid,
    			0xFFF,
    			&dwBytesReturned,
    			NULL);
    

    and it works fine. I get a list of access points. Anyone have any suggestions? Sincerly, Clint Singer P.S. I should mention that I am also working on Windows CE (although that shouldn't make a differance except for the ptcDeviceName) paramter.

    A 1 Reply Last reply
    0
    • C clintsinger

      Hi All, I am hoping that there is someone out there who will understand my problem as there seems to be very little documentation avalible to read the values of the NDIS 5.1 compatible drivers. I would like to initiate a scan of the BSSID's in my network area. The documentaion tells me I need to use OID_802_11_BSSID_LIST_SCAN to force the wirelss nic to scan the area for access points. Unforetunately I haven't been able to guess how to call this feature. The code that I tried is the following

      	PNDISUIO_QUERY_OID		pQueryOid		= NULL;
      
      	pSetOid = (PNDISUIO_SET_OID)&QueryBuffer[0];
      	pSetOid->ptcDeviceName = _T("WLAGS461");
      	pSetOid->Oid = OID_802_11_BSSID_LIST_SCAN;
      		
      	hr = DeviceIoControl(
      			m_hNdisUio,
      			IOCTL_NDISUIO_SET_OID_VALUE,
      			(LPVOID) pSetOid,
      			sizeof(PNDISUIO_SET_OID),
      			NULL,
      			0,
      			&dwBytesReturned,
      			NULL);
      

      but it fails with error 0x57 (parameter not correct) and I don't know what to change. I also have the following code that I have been using to get the aquired list (or the one already in the NIC database)

      	PNDISUIO_QUERY_OID		pQueryOid		= NULL;
      
      	pQueryOid = (PNDISUIO_QUERY_OID)&QueryBuffer[0];
      	pQueryOid->ptcDeviceName = _T("WLAGS461");
      	pQueryOid->Oid = OID_802_11_BSSID_LIST;
      
      	hr = DeviceIoControl(
      			m_hNdisUio,
      			IOCTL_NDISUIO_QUERY_OID_VALUE,
      			(LPVOID) pQueryOid,
      			0xFFF,
      			(LPVOID) pQueryOid,
      			0xFFF,
      			&dwBytesReturned,
      			NULL);
      

      and it works fine. I get a list of access points. Anyone have any suggestions? Sincerly, Clint Singer P.S. I should mention that I am also working on Windows CE (although that shouldn't make a differance except for the ptcDeviceName) paramter.

      A Offline
      A Offline
      amitalonm
      wrote on last edited by
      #2

      Hi, please have a look here: WLAN Scan with NDIS Miniport and Much More[^] I hope that it will help you. in case that you already overcame your problem and in case that you can contribute to the questions that I asked under the responses of the article that I just gave you - I will appreciate your help as well. Thanks, -- Amit.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups