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.

CC3220MODA: sl_WlanGetNetworkList() Network scan does not always return Hidden SSID information

Part Number: CC3220MODA

We have designed a product with the CC3220SFMODA that awakes from hibernation, makes a connection to the AP, then sends a request to our Server. Before the device makes connection with the server it does a scan to see how many visible and hidden SSIDs are available. We know that we can't see the SSID of the hidden APs but for our application we just need to know if a hidden SSID is present at all. 

If we set up a hidden AP and then do a scan the device will only see that the hidden AP exists 10% of the time or less. It is worth noting that we are able to connect to hidden APs even if they do not show up in the scan but we need them to show up in the scan for our application. Additionally, visible APs always show up successfully in the scan. Only hidden SSIDs are inconsistently scanned.

In this block of code you can see that the scan parameters are set and then a scan is performed immediately afterwards. This is pretty straightforward and follows closely the examples from TI's resource explorer.

    _i16 Status = 0;
    Display_printf(display, 0, 0, "Set Scan Parameters\r\n");

    //Set Scan Parameters
    SlWlanScanParamCommand_t ScanParamConfig;
    ScanParamConfig.RssiThreshold = -100;
    ScanParamConfig.ChannelsMask = 0x1FFF; /* channels 1-13 */
    sizeof(ScanParamConfig), (_u8* )& ScanParamConfig);
    if( Status )
     /* error */

    //Set Scan policy
    Display_printf(display, 0, 0, "Set Scan Policy\r\n");

    _u32 intervalInSeconds = 20;

    Status = sl_WlanPolicySet(SL_WLAN_POLICY_SCAN, SL_WLAN_SCAN_POLICY(1,1),
    if( Status )
     /* error */


    Display_printf(display, 0, 0, "Get Network List\r\n");

    SlWlanExtNetworkEntry_t netExtEntries[10] = {0};

    _u8 i;

    Display_printf(display, 0, 0, "Get Network attempt #1");
    resultsCount = sl_WlanGetNetworkList(0,10,&netEntries[0]);

    //Try to get results again if first attemt fails
    int getScanTries = 2;

    while((resultsCount == SL_ERROR_WLAN_GET_NETWORK_LIST_EAGAIN) &&
          (getScanTries < 5)){

        Display_printf(display, 0, 0, "Get Network attempt # %d", getScanTries);

        //Wait 1 second

        //Try again
        resultsCount = sl_WlanGetNetworkList(0,10,&netEntries[0]);


    uint8_t closest_AP = 0;

    //If scan was succesful
    if(resultsCount > 0){

    Display_printf(display, 0, 0, "APs found: %d\r\n", resultsCount);

    Display_printf(display, 0, 0, "Print Network List\r\n");
    //Cycle through AP and find lowest RSSI of save networks
    int p = 0;

    //Set RSSI to unreasonably low value
    int rssiVal = -100;

    valid_config = 0;

    int hiddenAPfound = 0;

    for(p = 0; p < resultsCount; p++){

        //Capture RSSI here to prevent API overwrite during logic
        int APrssi = netEntries[p].Rssi;

         Display_printf(display, 0, 0, "AP # %d: %s\r\n", p, netEntries[p].Ssid);
         Display_printf(display, 0, 0, "RSSI: %d\r\n", netEntries[p].Rssi);

        //If hidden AP no need to check if it is the closest
        if(netEntries[p].SsidLen < 4){



Here is an example of our debug printout associated with the above code block. In this case it is when the device DOES see a hidden SSID. This happens in 10% or less of scans.

The device still returns RSSI and a blank SSID this is the behavior we desire

Here is an example of the hidden SSID NOT being found.

Can anyone offer assistance with resolving this issue? We'd like to know whether or not we are using the API appropriately or if there is some other issue unrelated to our application code.

Thank you

Rodney T

Tool Versions:

Simplelink Version:

Compiler Version: TI v20.2.7.LTS

XDCtools Version:

  • The thread was forwarded to an expert. Please expect a reply by beginning of next week.

  • Hi,

    I assume that if you get hidden APs in your scan report that hidden APs scan is configured properly but just to make sure, please check with the following code snippet as reference.

    		int ScanInterval = 0;  //default value is 600 seconds
    		_u8 Policy = 0;       //default value is 0 (disabled)
    		int ret;
    		int length = sizeof(ScanInterval);
    		ret = sl_WlanPolicyGet(SL_WLAN_POLICY_SCAN, &Policy, (_u8*)&ScanInterval, (_u8*)&length);
    		if (Policy & SL_WLAN_SCAN_POLICY(0, 1))
    			UART_PRINT("Scan Policy is set to Scan visible ssid ");
    		if (Policy & SL_WLAN_SCAN_POLICY(1, 0))
    			UART_PRINT("Scan Policy is set to Scan hidden ssid ");
    		ScanInterval = 30;
    		RetVal = sl_WlanPolicySet(SL_WLAN_POLICY_SCAN, SL_WLAN_SCAN_POLICY(1, 1), (_u8 *)&ScanInterval, sizeof(ScanInterval));
    		UART_PRINT("sl_WlanPolicySet...%d\n\r", RetVal);

    If hidden network scan is set, then most likely it is missed since the only way to get the AP is by listening to the beacon and as minimum it is transmitted every ~100mSec (and some APs in multiples of 100mSec) so statistically it can be missed.