none
Configuring the Native Wifi connection timeout Parameters RRS feed

  • Question

  • Hi,

    I would like to configure the following wlan parameters in Windows Embedded Compact 7.

    Is there any way to configure the following parameters?

    1. Scan time out

    2. Association time out

    3. Periodic scan when connected

    4. Periodic scan when disconnected

    Thanks in Advance.

    Wednesday, December 12, 2012 9:48 AM

All replies

  • That depends on the NWIFI driver. What module are you using?

    Good luck,

    Michel Verhagen, eMVP
    Check out my blog: http://guruce.com/blog

    GuruCE
    Microsoft Embedded Partner
    http://guruce.com
    Consultancy, training and development services.

    Thursday, December 13, 2012 5:24 AM
    Moderator
  • Hello Michel,

    Thanks for your reply.

    We are using our custom wifi module.

    Regarding the timeouts, these can be configured in windows ce 5 & 6 with wzctool.

    I am trying to find the way of configuring these values on WEC7.

    I believe these timeouts are not depends on the Wifi Module/driver. This is some thing to do with native wifi supplicant, as connection request needs to be initiated from the supplicant. Please suggest me on this. I am looking for the periodic scan/connect request in disconnected state.

    Thanks,

    Srinivas Reddy.


    Srinivas Reddy. CH

    Thursday, December 13, 2012 5:56 AM
  • I'm also interested on that. I guess Srinivas is looking for the equivalent for WEC7 of following WCE6 functionality:

    \> wzctool -set -?
    tmTr  Scan time out.
          WZC requests BSSID scan to the miniport driver then waits for 'tmTr'
          until wireless miniport finishes scanning.
          default = 3 sec (3000 ms)
    tmTp  Association time out.
          WZC requests wifi adapter to associate to the given SSID.
          If wifi adapter does not finish association within time 'tmTp',
          WZC tries next SSID in the [Preferred Networks].
          default = 2 sec (2000 ms)
    tmTc  Periodic scan when connected.
          The scanning requires channel switching on wireless card.
          in order to listen beaconing packets on all channels.
          The channel switching is not preferable when STA is in connected-state
          since wireless packets transfer is blocked during the scanning.
          This timer is set to possible maximum value INFINITE by default.
          default = INFINITE (0x70000000=1879048192)
    tmTf  Periodic scan when disconnected.
          This is the interval that WZC sends scanning requests
          to find connection candidate SSIDs given by [Preferred Networks].
          default = 1 min (60000 ms)

    Regards, Buji


    Regards, Buji

    Tuesday, December 18, 2012 9:58 AM
  • I'm also interested on that. I guess Srinivas is looking for the equivalent for WEC7 of following WCE6 functionality:

    \> wzctool -set -?
    tmTr  Scan time out.
          WZC requests BSSID scan to the miniport driver then waits for 'tmTr'
          until wireless miniport finishes scanning.
          default = 3 sec (3000 ms)
    tmTp  Association time out.
          WZC requests wifi adapter to associate to the given SSID.
          If wifi adapter does not finish association within time 'tmTp',
          WZC tries next SSID in the [Preferred Networks].
          default = 2 sec (2000 ms)
    tmTc  Periodic scan when connected.
          The scanning requires channel switching on wireless card.
          in order to listen beaconing packets on all channels.
          The channel switching is not preferable when STA is in connected-state
          since wireless packets transfer is blocked during the scanning.
          This timer is set to possible maximum value INFINITE by default.
          default = INFINITE (0x70000000=1879048192)
    tmTf  Periodic scan when disconnected.
          This is the interval that WZC sends scanning requests
          to find connection candidate SSIDs given by [Preferred Networks].
          default = 1 min (60000 ms)

    Regards, Buji


    Regards, Buji

    Tuesday, December 18, 2012 9:58 AM
  • I'm also interested on that. I guess Srinivas is looking for the equivalent for WEC7 of following WCE6 functionality:

    \> wzctool -set -?
    tmTr  Scan time out.
          WZC requests BSSID scan to the miniport driver then waits for 'tmTr'
          until wireless miniport finishes scanning.
          default = 3 sec (3000 ms)
    tmTp  Association time out.
          WZC requests wifi adapter to associate to the given SSID.
          If wifi adapter does not finish association within time 'tmTp',
          WZC tries next SSID in the [Preferred Networks].
          default = 2 sec (2000 ms)Regards, Buji


    Regards, Buji

    Tuesday, December 18, 2012 9:58 AM
  • Hi,

    WzcTool is not included in WEC7. This may be already known to you.

    There seem to be two alternatives i.e. use the wlantool sample present in $(WINCEROOT)\public\servers\oak\samples\wlantool  or use the NetUI and modify the parameters.

    Now when i was browsing through NetUI source i could see a few timeouts configured.

    $(WINCEROOT)\public\common\oak\drivers\netui\QuickConfigui.h

    #define NWQC_RFSH_TIMEOUT 20000
    #define NW_RFSH_TIMEOUT 3000
    #define NW_RFSH_ASSOCIATED_TIMEOUT 300000
    #define IPQC_RFSH_TIMEOUT 2000
    #define NW_SIGNAL_STRENGTH_TIMEOUT 1000

    You can modify these (cloned) and give it a try.

    Regards,

    Balaji.

    Wednesday, December 19, 2012 5:34 AM
  • Thanks for the answer Balaji,

    I know zlantool.exe is a kind of wzctool.exe replacement; but it can't configure such global timeout parameters as it could be done in WinCE6 with the 'wzctool -set' command.

    The defines you mention seems to be just cosmetics to refresh the list of APs... and they are just local parameters for this application. 

    The parameters we are taljing about are global parameters stablished by 'wzctool.exe' but used later by 'wzcsrvc'... the service in charge of stablishing connections automatically.

    Thanks in advance, Buji


    Regards, Buji

    Wednesday, December 19, 2012 9:30 AM
  • I think the conclusion is that we don't know whether you can configure those or how to do it if possible. I don't have CE in front of me. Do you have wzcsrvc source for your target CE version? That would be my investigation in your place: find the code that actually uses the time outs, determine where it gets time out values and when, and create a suitable replacement for wzctool to manage the settings.

    Paul T.

    Thursday, December 20, 2012 5:45 PM
  • Hi Paul,

    Yes, wzctool source available. pls have a look so that you could figure some thing.

    wzctool is configuring the WZC_CONTEXT, which is not applicable for Windows Embedded Compact 7.

    void
    SetWzcParameter
    // set WZC parameters.
    // WZC has 4 timer parameters; tmTr, tmTp, tmTc, tmTf
    (
        IN int argc,      // number of args
        IN WCHAR* argv[]  // arg array
    )
    {
        WZC_CONTEXT WzcContext;
        DWORD dwStatus = WZCQueryContext(NULL, 0x00, &WzcContext, NULL);
        if (dwStatus != ERROR_SUCCESS)
        {
            wprintf(L"!!! Failed WZCQueryContext.  Err = [0x%08X] !!!\n", dwStatus);
            return;
        }

        if(WasOption(argc, argv, L"?")>0)
        {
            WCHAR *szHelp[] = {
                L"tmTr  Scan time out.\n"
                L"      WZC requests BSSID scan to the miniport driver then waits for 'tmTr'\n",
                L"      until wireless miniport finishes scanning.\n",
                L"      default = 3 sec (3000 ms)\n",
                L"tmTp  Association time out.\n",
                L"      WZC requests wifi adapter to associate to the given SSID.\n",
                L"      If wifi adapter does not finish association within time 'tmTp',\n",
                L"      WZC tries next SSID in the [Preferred Networks].\n",
                L"      default = 2 sec (2000 ms)\n",
                L"tmTc  Periodic scan when connected.\n",
                L"      The scanning requires channel switching on wireless card.\n",
                L"      in order to listen beaconing packets on all channels.\n",
                L"      The channel switching is not preferable when STA is in connected-state\n",
                L"      since wireless packets transfer is blocked during the scanning.\n",
                L"      This timer is set to possible maximum value INFINITE by default.\n",
                L"      default = INFINITE (0x70000000=1879048192)\n",
                L"tmTf  Periodic scan when disconnected.\n",
                L"      This is the interval that WZC sends scanning requests\n",
                L"      to find connection candidate SSIDs given by [Preferred Networks].\n",
                L"      default = 1 min (60000 ms)\n",
                L"\n",
                L"usage:\n",
                L"wzctool -set -tmtr 1000\n",
                L"      set 'tmTr' timer to 1000 mili-second\n",
                L"wzctool -set -tmtr 1000 -tmtf 2000\n",
                L"      set 'tmTr' = 1000 mili-second, 'tmTf' = 2000 mili-second\n",
                L"wzctool -set -tmtr 0\n",
                L"      will set back to the default value.\n",
                L"wzctool -set -tmtr -1\n",
                L"      will set to INFINITE number.\n",
                L"\n",
            };

            ShowTextMessages(szHelp);
            wprintf(L"current parameter value:\n");
        }
        else
        {
            WCHAR *szVal = NULL;
            int iValue = 0;
            if(GetOption(argc, argv, L"tmtr", &szVal) > 0)
            {
                iValue = _wtoi(szVal);
                WzcContext.tmTr = ((iValue==0) ? TMMS_DEFAULT_TR :
                        ((iValue<0) ? TMMS_INFINITE : iValue));
            }
            if(GetOption(argc, argv, L"tmtp", &szVal) > 0)
            {
                iValue = _wtoi(szVal);
                WzcContext.tmTp = ((iValue==0) ? TMMS_DEFAULT_TP :
                        ((iValue<0) ? TMMS_INFINITE : iValue));
            }
            if(GetOption(argc, argv, L"tmtc", &szVal) > 0)
            {
                iValue = _wtoi(szVal);
                WzcContext.tmTc = ((iValue==0) ? TMMS_DEFAULT_TC :
                        ((iValue<0) ? TMMS_INFINITE : iValue));
            }
            if(GetOption(argc, argv, L"tmtf", &szVal) > 0)
            {
                iValue = _wtoi(szVal);
                WzcContext.tmTf = ((iValue==0) ? TMMS_DEFAULT_TF :
                        ((iValue<0) ? TMMS_INFINITE : iValue));
            }

            dwStatus = WZCSetContext(NULL, 0x00, &WzcContext, NULL);
        }

        if (dwStatus != ERROR_SUCCESS)
            wprintf(L"!!! Failed WZCSetContext. Err = [0x%08X] !!!\n", dwStatus);
        else
        {
            wprintf(L"tmTr = %d mili-seconds (Scan time out)\n", WzcContext.tmTr);
            wprintf(L"tmTp = %d mili-seconds (Association time out)\n", WzcContext.tmTp);
            wprintf(L"tmTc = %d mili-seconds (Periodic scan when connected)\n", WzcContext.tmTc);
            wprintf(L"tmTf = %d mili-seconds (Periodic scan when disconnected)\n", WzcContext.tmTf);
        }
    }   // SetWzcParameter()


    Srinivas Reddy. CH

    Friday, December 21, 2012 7:38 AM
  • I'm asking about the WZC *service* source, not the tool source from an old version of the OS. What we want to do, effectively, is look at the code for WiFi operations and figure out how it decides on timeouts, etc. It would be like reading the Windows CE operating system code to figure out how display timeouts are set (look for registry access in the source, figure out what values are loaded and observe the code's use to determine semantics).

    Paul T.

    Thursday, December 27, 2012 6:45 PM