Problem configuring wireless card (setting SSID and other params)

Discussion in 'Wireless Networking' started by Serhiy Smirnov, Mar 6, 2005.

  1. Hello,

    I'm trying to configure my 802.11g wireless network card using
    DeviceIoControl and NDISUIO interface.

    First, I request current SSID from the card. Then I set it to my
    specific value using code below. Set operation returns success. And
    then I request SSID again to verify if the set operation really
    succeeded. But I get the same values as it was before my SET, so
    network card doesn't switch to new SSID. The same situation if I try
    to change infrastructure mode (OID_802_11_INFRASTRUCTURE_MODE) and
    configuration (OID_802_11_CONFIGURATION). Trying to do
    OID_802_11_DISASSOCIATE before sending or requesting any data returns
    success too but doesn't help.
    My be I'm missing some obvious things (wait, reset, additional
    operations)?

    Configuring card with manufacturer's utility works fine, howewer.

    I know about the issue that NDISUIO is now reserved for use by
    Windows, but with my own driver (derived from NDISUIO sample)
    situation is the same.
    Tested on systems with WinXP SP1 and SP2. WZC is turned off.

    Any siggestions, links, etc would be highly appreciated!

    TIA,
    Serhiy


    requesting SSID value:
    ---------------------

    UCHAR QueryBuffer[sizeof(NDISUIO_QUERY_OID) +
    sizeof(NDIS_802_11_SSID)];
    PNDISUIO_QUERY_OID pQueryOid;

    pQueryOid = (PNDISUIO_QUERY_OID)&QueryBuffer[0];
    pQueryOid->Oid = OID_802_11_SSID;

    bSuccess = (BOOLEAN)DeviceIoControl(Handle,
    IOCTL_NDISUIO_QUERY_OID_VALUE,
    (LPVOID)&QueryBuffer[0], sizeof(QueryBuffer),
    (LPVOID)&QueryBuffer[0], sizeof(QueryBuffer),
    &BytesReturned, NULL);

    setting SSID value:
    ---------------------

    UCHAR SetBuffer[sizeof(NDISUIO_SET_OID) - sizeof(ULONG) +
    sizeof(NDIS_802_11_SSID)];
    PNDISUIO_SET_OID pSetOid;

    pSetOid = (PNDISUIO_SET_OID)&SetBuffer[0];
    pSetOid->Oid = OID_802_11_SSID;

    PNDIS_802_11_SSID psSSID = (PNDIS_802_11_SSID)pSetOid->Data;
    psSSID->SsidLength = strlen((char *)pSrcSSID);
    memcpy(psSSID->Ssid, pSrcSSID, psSSID->SsidLength);

    bSuccess = (BOOLEAN)DeviceIoControl(Handle,
    IOCTL_NDISUIO_SET_OID_VALUE,
    (LPVOID)&SetBuffer[0], sizeof(SetBuffer),
    NULL, 0,
    &BytesReturned, NULL);
     
    Serhiy Smirnov, Mar 6, 2005
    #1
    1. Advertisements

  2. Serhiy Smirnov

    Guest Guest

    At least, Disassociate should work.
    So you might be doing something wrong - in our business every single bit
    matters...

    --PA
     
    Guest, Mar 7, 2005
    #2
    1. Advertisements

  3. Additional advice : Check in debugger ( windbg e.g.) if you send the same
    data as WZC to Ndisuio
    Arkady

     
    Arkady Frenkel, Mar 7, 2005
    #3
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.