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.
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.
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
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