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.

CC3220S-LAUNCHXL: what case will return the error: SL_ERROR_WLAN_GET_NETWORK_LIST_EAGAIN –2073 Scan was not enabled, one-shot scan is immediately triggered and the user should fetch the scan results again

Part Number: CC3220S-LAUNCHXL

i disable the scan by 

ucConfigOpt = SL_WLAN_SCAN_POLICY(0, 0);
RetVal = sl_WlanPolicySet(SL_WLAN_POLICY_SCAN , ucConfigOpt, NULL, 0);
ASSERT_ON_ERROR(RetVal, WLAN_ERROR);

and process  a one shot scan by

ret = sl_WlanGetNetworkList(0, 30, &netentry[0]);

and it will  always return me SL_ERROR_WLAN_GET_NETWORK_LIST_EAGAI. how can i avoid this error?

  • That is a normal message. You must wait approx 1 sec, then call it again to get the Scan List:

    usleep(850);

    if (lRetVal == SL_ERROR_WLAN_GET_NETWORK_LIST_EAGAIN) {

    lRetVal = sl_WlanGetNetworkList(ucIndex, (unsigned char)WLAN_SCAN_COUNT,
    &netEntries[ucIndex]);
    }


    Tom