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.

Problem in CC3220 scanning of a WEP network or AP



Hi,

I am using CC3220 and found that when i operate my device in station mode and scan the nearby networks using getNetworkList API and found that the networks or AP that is secured with the WEP security have shown as open security. When i try to debugged that then i found that SL_WLAN_SCAN_RESULT_SEC_TYPE_BITMAP(netEntries[APCount].SecurityInfo) parameter to be 0 which is for the OPEN network. 

Can you tell me where the problem is here to search the WEP secured network ?

  • Hi Mohit,

    I've just checked the scan results (using the NetworkTerminal example) and was able to find a WEP network (see below).
    [[ 22 | belkin.12a | 08:86:3b:15:b1:2a | -32 | 7 | NO | WEP | ]]

    Can you provide an air sniffer log of the scan ?
    It seems that your Access Point presents itself as OPEN or you have an issue with the parsing of the results.

    Br,
    Kobi
  • Hi Kobi,

    We are using background scan using function ScanApList.

    int32_t ScanAPList(void)
    {
    int32_t ret = -1;

    uint8_t policyOpt;

    cmdSetPolicyCallback();

    sleep(1);

    /* Call the command parser */
    memset(netEntries, '\0', 30*sizeof(SlWlanNetworkEntry_t));
    /* Get scan results from NWP - results would be placed inside the provided buffer */
    ret = sl_WlanGetNetworkList(0, 30, &netEntries[0]);

    /* If scan policy isn't set, invoking 'sl_WlanGetNetworkList()' for the first time triggers 'one shot' scan.
    * The scan parameters would be according to the system persistent settings on enabled channels.
    * For more information, see: <simplelink user guide, page: pr.>
    */
    if(SL_ERROR_WLAN_GET_NETWORK_LIST_EAGAIN == ret)
    {
    // while(triggeredScanTrials < MAX_SCAN_TRAILS)
    {
    /* We wait for one second for the NWP to complete the initiated scan and collect results */
    sleep(1);

    /* Collect results form one-shot scans.*/
    ret = sl_WlanGetNetworkList(0, 30, &netEntries[0]);
    if(ret >= 30)
    {
    nAPListfilled = true;
    UART_PRINT("Data Scanned Successfully \r\n");
    }
    }
    }

    sleep(1);

    sl_WlanPolicySet(SL_WLAN_POLICY_SCAN,0,(unsigned char*)1,sizeof(unsigned long));

    if(ret <= 0)
    {
    }
    else
    {
    network_count = ret;
    }

    policyOpt = SL_WLAN_CONNECTION_POLICY(1, 0, 0, 0);

    ret = sl_WlanPolicySet(SL_WLAN_POLICY_CONNECTION ,policyOpt , NULL, 0);
    ASSERT_ON_ERROR(ret);

    return 0;
    }

    In this what is happening if we have any router with WEP network available then when code is going into this function first time it is giving Security Type : WEP (256).When it is going second time in this function then it is giving Security TYpe : open & afterwards always giving open. Same in Network Terminal also..AS we are firing that command manually that why it is working.

  • Hi vidushi jain,

    I'm really trying to understand your concern and reproduce it with the network terminal , but couldn't currently.
    I'm triggering the GetNetowrkList 3 times per user request (i.e. in cmdScanCallback) but it works each time.

    I think you have an issue with your code as it prints "Data Scanned Successfully" only when results >= 30 (while any positive number means the list is updated and the result is the number of entries).

    Please provide more details on the failure or use the code of the Network Terminal example.

    Br,
    Kobi
  • Hi Kobi,

    In Network terminal we are hitting commands manually however in our case we are refreshing & scanning every second. Very First time when we are fetching NetworkList() we are getting security type as WEP on next time scan we are getting some error & code jumps into this check 

    if(SL_ERROR_WLAN_GET_NETWORK_LIST_EAGAIN == ret)

    and after that we are always getting Security type = OPEN.

  • Hi Kobi,

    Can you please help abt the same?

  • Hi Kobi,

    I am glad that now i am able to reproduce this issue in network terminal example as well. What you have to do is that you need to start your device in AP mode by firing the "wlan_ap_start" command and then try to hit the "scan" command, you will see the security type as OPEN for a WEP network.

    Basically our user application is just like same that we have to do the scanning while the device is operated in AP mode. So would you please help us out to get rid of this issue.
  • Hi Mohit,

    This issue has been reported internally and will require a service pack update to fix the issue. Service pack updates are included in the SDK on a quarterly basis, though a timeline to address this particular issue has not been established. Will post more details when they become available.