This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC3235MODASF: Using WiFi only 5GHz band

Part Number: CC3235MODASF
Other Parts Discussed in Thread: CC3235SF

Tool/software:

Hi,

My customer wants to evaluate CC3235MODASF using only 5GHz band. (2.4GHz band is not used)
He refers to below E2E thread.
https://e2e.ti.com/support/wireless-connectivity/wi-fi-group/wifi/f/wi-fi-forum/905158/cc3235sf-selecting-5ghz-channels-only

He used Network_terminal example project and modified as below, but the device still connects with 2.4GHz.
Could you check what is wrong?

Base project : newwork_terminal_CC3235SF_LAUNCHXL_freertos_tilang

What were changed:
In Wlan_cmd.c, around line#494, 
- comment out between "/* Set scan parameters for 2.4Gz */" to line#519.
- add "/* connect only 5GHz config try */" to "sl_WlanSet(SL_WLAN_CFG_GENERAL_PRAM_ID, ...)"

      /* connect only 5GHz config try */
    SlWlanScanParam5GCommand_t ScanParamConfig5G;

    // 5.0G channels bits order: 36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112, 116, 120, 124, 128, 132,
    // 136, 140, 144, 149, 153, 157, 161, 165, 169, 184, 188, 192, 196

    ScanParamConfig5G.ChannelsMask = 0x0000000F; // Select ChannelsMask for channels 36, 40, 44, 48
    ScanParamConfig5G.RssiThreshold = -70;
    sl_WlanSet(SL_WLAN_CFG_GENERAL_PARAM_ID, SL_WLAN_GENERAL_PARAM_OPT_SCAN_PARAMS, sizeof(SetPolicyParams.ScanParamConfig5G), (uint8_t *)(&SetPolicyParams.ScanParamConfig));

//    /* Set scan parameters for 2.4Gz */
//    ret =
//        sl_WlanSet(SL_WLAN_CFG_GENERAL_PARAM_ID,
//                   SL_WLAN_GENERAL_PARAM_OPT_SCAN_PARAMS,
//                   sizeof(SetPolicyParams.ScanParamConfig),
//                   (uint8_t *)(&SetPolicyParams.ScanParamConfig));
//    ASSERT_ON_ERROR(ret, WLAN_ERROR);
//
//    configSize = sizeof(SlDeviceVersion_t);
//
//    /* Get device version info. */
//    sl_DeviceGet(SL_DEVICE_GENERAL, &configOpt, &configSize, (uint8_t*)(&ver));
//
//    /* Update deviceType to 323XX or 3220X */
//    deviceType = ver.ChipId;
//
//    if (deviceType & CC3x35_BIT)
//    {
//        /* Set scan parameters for 5Ghz */
//        ret =
//              sl_WlanSet(SL_WLAN_CFG_GENERAL_PARAM_ID,
//                         SL_WLAN_GENERAL_PARAM_OPT_SCAN_PARAMS_5G,
//                         sizeof(SetPolicyParams.ScanParamConfig5G),
//                         (uint8_t *)(&SetPolicyParams.ScanParamConfig5G));
//          ASSERT_ON_ERROR(ret, WLAN_ERROR);
//    }


Thanks and regards,
Koichiro Tashiro

  • Hi Koichiro,

    I think your customer should try to disable fast connection policy.

    sl_WlanPolicySet(SL_WLAN_POLICY_CONNECTION,SL_WLAN_CONNECTION_POLICY(1,0,0,0),NULL,0)

    Jan

  • Hi Jan,

    Thanks for your reply.
    The customer tried it as below, but it seems 2.4GHz band is still used.

          /* connect only 5GHz config try */
        ret = sl_WlanPolicySet(SL_WLAN_POLICY_CONNECTION,SL_WLAN_CONNECTION_POLICY(1,0,0,0),NULL,0);
        ASSERT_ON_ERROR(ret, WLAN_ERROR);
    
        SlWlanScanParam5GCommand_t ScanParamConfig5G;
    
        // 5.0G channels bits order: 36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112, 116, 120, 124, 128, 132,
        // 136, 140, 144, 149, 153, 157, 161, 165, 169, 184, 188, 192, 196
    
        ScanParamConfig5G.ChannelsMask = 0x0000000F; // Select ChannelsMask for channels 36, 40, 44, 48
        ScanParamConfig5G.RssiThreshold = -70;
        sl_WlanSet(SL_WLAN_CFG_GENERAL_PARAM_ID, SL_WLAN_GENERAL_PARAM_OPT_SCAN_PARAMS, sizeof(SetPolicyParams.ScanParamConfig5G), (uint8_t *)(&SetPolicyParams.ScanParamConfig));
    

    Then, he executed the code and put below command in terminal to execute cmdSetPolicyCallback
    .
    set policy -i 10

    Then, put below command in terminal to check channels are limited with ch36 to ch196.

    scan -n

    But he got below output. Ch#1 to ch#13 are shown. 
    user:scan -n
    ---------------------------------------------------------------------------------------------
        |               SSID               |       BSSID       | RSSI  | Ch | Hidden | Security |
    ---------------------------------------------------------------------------------------------
     1  | aaaaaaaa                         | f4:d5:80:1b:a0:88 | -46   | 1  | NO     | WPA2     |
     2  | bbbbbbbb                         | 5c:03:39:c3:dc:76 | -57   | 10 | NO     | WPA/WPA2 |
     3  | cccccccc                         | f4:d5:80:1c:1f:30 | -53   | 6  | NO     | WPA2     |
     4  | dddddddd                         | f4:d5:80:1b:95:1a | -71   | 6  | NO     | WPA2     |
     5  | eeeeeeee                         | ac:44:f2:fe:a6:d0 | -62   | 6  | NO     | WPA/WPA2 |
     6  | ffffffff                         | 88:10:8f:45:fd:d7 | -31   | 13 | NO     | WPA/WPA2 |
     7  | gggggggg                         | 14:ac:60:c0:30:ff | -74   | 13 | NO     | WPA2     |
     8  | hhhhhhhh                         | f4:d5:80:1b:58:48 | -65   | 116 | NO
    


    Any suggestions?

    Thanks and regards,
    Koichiro Tashiro

  • Hi Koichiro,

    You customer use wrong API for a wrong structure:

    • API SL_WLAN_GENERAL_PARAM_OPT_SCAN_PARAMS use structure SlWlanScanParamCommand_t which set scan parameters for 2.4GHz network. If your customer want to limit 2.4GHz channels, he need to use this API and this structure.
    • API SL_WLAN_GENERAL_PARAM_OPT_SCAN_PARAMS_5G use structure SlWlanScanParam5GCommand_t which is used to 5GHz channels control.

    But your customer mixed API SL_WLAN_GENERAL_PARAM_OPT_SCAN_PARAMS with structure SlWlanScanParam5GCommand_t.

    What type of connection your customer use (manual connection using sl_WlanConnect() or automatic connection using profiles)? What SDK version and ServicePack your customer use?

    Jan

  • Hi Jan,

    Thanks for your advices.
    The customer uses SimpleLink CC32xxSDK-7.10.00.13 with CCS 12.7.1.00001.

    He modified cmdSetPolicyCallback() as following.

    int32_t cmdSetPolicyCallback(void *arg)
    {
        uint8_t policyOpt;
        uint8_t  configOpt  = SL_DEVICE_GENERAL_VERSION;
        uint16_t configSize = 0;
        int32_t ret;
        uint32_t deviceType;
        SetPolicyCmd_t SetPolicyParams;
        SlDeviceVersion_t ver = {0};
    
        /* Call the command parser */
        memset(&SetPolicyParams, 0x0, sizeof(SetPolicyParams));
        ret = ParseSetPolicyCmd(arg , &SetPolicyParams);
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    omitted
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /* fixed following */
        ret = sl_WlanPolicySet(SL_WLAN_POLICY_CONNECTION,SL_WLAN_CONNECTION_POLICY(1,0,0,0),NULL,0);
        ASSERT_ON_ERROR(ret, WLAN_ERROR);
    
        sl_WlanSet(SL_WLAN_CFG_GENERAL_PARAM_ID, SL_WLAN_GENERAL_PARAM_OPT_SCAN_PARAMS, sizeof(SetPolicyParams.ScanParamConfig5G), (uint8_t *)(&SetPolicyParams.ScanParamConfig));
    
        ret = sl_WlanPolicySet(SL_WLAN_POLICY_CONNECTION ,policyOpt , NULL, 0);
        ASSERT_ON_ERROR(ret, WLAN_ERROR);
    /* set 2.4GHz scan policy */
        ret =
            sl_WlanSet(SL_WLAN_CFG_GENERAL_PARAM_ID,
                        SL_WLAN_GENERAL_PARAM_OPT_SCAN_PARAMS,
                        sizeof(SetPolicyParams.ScanParamConfig),
                        (uint8_t *)(&SetPolicyParams.ScanParamConfig));
        ASSERT_ON_ERROR(ret, WLAN_ERROR);
    /* set 5GHz scan policy */
        ret =
                sl_WlanSet(SL_WLAN_CFG_GENERAL_PARAM_ID,
                        SL_WLAN_GENERAL_PARAM_OPT_SCAN_PARAMS_5G,
                        sizeof(SetPolicyParams.ScanParamConfig5G),
                        (uint8_t *)(&SetPolicyParams.ScanParamConfig5G));
        ASSERT_ON_ERROR(ret, WLAN_ERROR);
    /* */
        /* Enable scan */
        policyOpt = SL_WLAN_SCAN_POLICY(1, SetPolicyParams.hiddenSsid);
    
        /* Set scan policy - this API starts the scans */
        ret =
            sl_WlanPolicySet(SL_WLAN_POLICY_SCAN, policyOpt,
                            (uint8_t*)(&SetPolicyParams.ScanIntervalinSec),
                            sizeof(SetPolicyParams.ScanIntervalinSec));
        ASSERT_ON_ERROR(ret, WLAN_ERROR);
    
        return(0);
    }
    


    Still there are a few issues remain.
    He did below command in terminal to mask 2.4GHz.
    setpolicy -c 0x0000 -d 0x1FFF
    Then, got AP information by "scan -n". He got same SSID multiple times as below. Why?
    user:scan -n
    ---------------------------------------------------------------------------------------------
        |               SSID               |       BSSID       | RSSI  | Ch | Hidden | Security |
    ---------------------------------------------------------------------------------------------
     1  | aaaaaa                           | xx:xx:xx:xx:4b:28 | -84   | 100 | NO     | WPA2     |
     2  | bbb                              | xx:xx:xx:xx:4b:29 | -83   | 100 | NO     | WPA2     |
     3  | aaaaaa                           | xx:xx:xx:xx:95:20 | -77   | 100 | NO     | WPA2     |
     4  | bbb                              | xx:xx:xx:xx:95:21 | -76   | 100 | NO     | WPA2     |
     5  | cccccccc                         | xx:xx:xx:xx:95:22 | -76   | 100 | NO     | WPA2     |
     6  | aaaaaa                           | xx:xx:xx:xx:a0:90 | -61   | 100 | NO     | WPA2     |
     7  | bbb                              | xx:xx:xx:xx:a0:91 | -61   | 100 | NO     | WPA2     |
     8  | cccccccc                         | xx:xx:xx:xx:a0:92 | -61   | 100 | NO     | WPA2     |
    ---------------------------------------------------------------------------------------------
    


    And he often got below failure with "scan -n" after "setpolicy". Do you have any idea to fix?
    user:setpolicy -c 0x0000 -d 0x1FFF
    user:scan -n
    [scan] : Unable to retrieve the network list
    
    user:scan -n
    [scan] : Unable to retrieve the network list
    


    Thanks and regards,
    Koichiro Tashiro

  • Hi Koichiro,

    That is returned multiple lines with same SSID is pretty expected. Your customer have multiple APs which are broadcasting same SSID (see different BSSID).

    Hard to say why error from WLAN scan is returned without knowing return code from sl_ API call. But it is likely that your customer call API for get WLAN scan results too early and results are not ready yet. E.g. return code SL_ERROR_WLAN_GET_NETWORK_LIST_EAGAIN.

    Jan

  • Hi Jan,

    Based on the customer's evaluation, it seem ~1min. period is needed before "setpolicy" command.

    The customer did additional tests using WiFi AP (portable WiFI) which can switch between 2.4GHz and 5GHz.
    Even after masking 2.4GHz by below setpolicy command,

    >user:setpolicy -c 0x0000 -d 0x1FFF

    Wlan can be connected by below command.

    >user:wlanconnect -s "SSID" -t WPA2 -p "password"

    He wonders he may need another configuration that is not a setpolicy.
    What do you think about it?

    Thanks and regards,
    Koichiro Tashiro

  • Hi Koichiro,

    What your customer see does not make much sense. There need to be something else wrong. Hard to say what without debugging real code. Unfortunately such type of debugging a code of your customer I am not able do. You will need to ask guys from WiFi support team, if they will have time to check your end user code.

    For usage of 5GHz mode it should be enough disable 2.4GHz channels with scan mask and disable fast connect policy just for a case. Maybe your customer can restart NWP after settings of scan parameters by calling (sl_Stop()/sl_Start()). According table B-1 in SWRU455m parameters SL_WLAN_GENERAL_PARAM_OPT_SCAN_PARAMS and SL_WLAN_GENERAL_PARAM_OPT_SCAN_PARAMS_5G should be permanent.

    Be aware that values at WLAN scan table are refreshed according set scan interval.

    Jan

  • Hi,

    From what I remember, the scan channel mask API is for scanning only (also referred as one-shot scan or application scan).

    The actual connection uses a 'connection scan' and this does not take into account the scan mask.

    Generally, you can limit the scan mask to filter and detect only specific SSIDs and connect accordingly.

    Regards,

    Shlomi

  • Hi Shlomi,

    Thank you for updating. Because I really thought that connection is affected by settings of scan mask. Because I discussed this topic with some member of WiFi team in the past, but maybe it was some kind of misunderstanding.

    Jan

  • Hi,

    Still need to dig into the code to verify but I did a test where I even didn't use 5GHz, only 2.4GHz and simply masked the upper channels where my AP resides.

    Then I was able to scan according to the mask and didn't see my AP but when I explicitly connect - it was able to connect and the scan list was updated with my list.

    The AP remained in the list until the next round of scanning (which is according to the mask), where it got disappeared.

    Regards,

    Shlomi

  • Hi Shomi, Jan,

    The customer did some more tests and found followings.
    - After the AP was once connected to CC3235 in 2.4GHz (or 5GHz), even 2.4GHz (or 5GHz) is masked by setpolicy, the AP can connect to CC3235 with 2.4GHz (or 5GHz). 
    - If the AP is never connected to CC3235 before, masking 2.4GHz (or 5GHz) seems working. The AP cannot be connected and Timeout happens.
            [wlanconnect] : Timeout expired connecting to AP: xxxxxxxxxxx-2G

    It is probably the AP side remembers CC3235 information once it is connected.
    In summary,
    - Setpolicy mask works for the new AP which is never connected to CC3235 before.
    - AP initialization is needed to clear CC3235 information, if setpolicy mask is used for the AP which was once connected to CC3235 before.

    He has one more question.
    sl_wlanGetExtNetworkList is executed by "scan -n" command. According to swru455.pdf section 4.7.1, it is active scan. 
    Is it possible to use passive scan?

    Thanks and regards,
    Koichiro Tashiro

  • Hi,

    This is just a general note.

    The device picks between active and passive scan according to the regulatory domain set to the device.

    You can look at the same doc, appendix C, Regulatory Domain. Under the 5GHz DFS column, you can find all the channels that are using passive scans. The other channels are using active scans.

    Regards,

    Shlomi

  • Hi Shlomi, Jan,

    Thanks for your support on this.
    This item is now considered as closed.

    Thanks and regards,
    Koichiro Tashiro

  • Thanks for the update.