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.

system crashes when sl_start is called

Other Parts Discussed in Thread: CC3200, CC3200SDK

Hello,

          I have been trying invoke wifi in my cc3200.But whenever I try to call sl_start, the system crashes.I have also applied breakpoints to see where it is getting fault but by each it is showing at different function places.

  • Hi,

    Please try use wlan_station or out_of_box example to determine if there is no problem with hardware. What hardware do you use (CC3200 LaunchPad?). What version of SDK do you use? Do you have latest service pack inside your CC3200 device?

    Jan
  • Hello sir,
    I have tried with the wlan station example,when I tried to connect with teraterm andit shows the message as below

    *************************************************
    CC3200 TCP Socket Application
    *************************************************



    Host Driver Version: 1.0.1.6
    Build Version 2.0.7.0.31.0.0.3.0.1.1.8.8
    Device is configured in default state
    Device started as STATION
    Connecting to AP: cc3200demo ...



    But after this I am not getting connected to the AP and I am using cc3200 with sdk version of CC3200SDK_1.2.0 and I also have the latest service pack installed.I am trying to connect to wifi with the TI-RTOS.
  • Hi,

    This log is from TCP Socket socket application not from wlan station example. But this is not important.

    Your application stuck during connection state. I think you not have properly set parameters of you AP (SECURITY_KEY, SECURITY_TYPE, SSID_NAME) in common.h.

    static long WlanConnect()
    {
        SlSecParams_t secParams = {0};
        long lRetVal = 0;
    
        secParams.Key = (signed char*)SECURITY_KEY;
        secParams.KeyLen = strlen(SECURITY_KEY);
        secParams.Type = SECURITY_TYPE;
    
        lRetVal = sl_WlanConnect((signed char*)SSID_NAME, strlen(SSID_NAME), 0, &secParams, 0);
        ASSERT_ON_ERROR(lRetVal);
    
        /* Wait */
        while((!IS_CONNECTED(g_ulStatus)) || (!IS_IP_ACQUIRED(g_ulStatus)))
        {
            // Wait for WLAN Event
    #ifndef SL_PLATFORM_MULTI_THREADED
            _SlNonOsMainLoopTask();
    #endif
        }
    
        return SUCCESS;
    
    }

    Jan

  • Hello sir,
    I have set the parameters correctly that I gave a SSID name,security type as open and no password.And now the system doesn't crash but in Wlan station example it is not going beyond the first step as I specified above.
    And one more doubt,In station mode, Is the wifi discoverable?
  • Hi,

    As you say CC3200 is not able to connect to your AP. I am not able determine why. Can you try it with another AP? It is signal to your AP sufficient? If your application stuck at first call of sl_Start() then reason can be this e2e.ti.com/.../1806610

    > And one more doubt,In station mode, Is the wifi discoverable?

    Sorry I don't understand. You are asking how to scan for available WiFI networks in STA mode? 

    Pseudo code how to use Scan policy:

    #define NET_MAX_SCAN                  10
    
    long retVal;
    long scanInterval;
    Sl_WlanNetworkEntry_t netList[NET_MAX_SCAN];
    
    scanInterval = 10;
    // enable scan
    retVal = sl_WlanPolicySet(SL_POLICY_SCAN, SL_SCAN_POLICY(1), (unsigned char*)&scanInterval, sizeof(scanInterval));
    if (retVal < 0) return retVal;
    
    // wait 900ms till first scan is done
    si_Sleep(900);
    
    // save list
    netFound = sl_WlanGetNetworkList(0, (unsigned char)NET_MAX_SCAN, netList);
    
    // disable scan
    retVal = sl_WlanPolicySet(SL_POLICY_SCAN, SL_SCAN_POLICY(0), 0, 0);
    if (retVal < 0) return retVal;

    Jan

    Jan

  • Hello sir,
    The problem got solved now.I have connected my devicewith wlanProfileAdd api and now it is getting connected.
    Thanks for the guidance.