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.

Need help in storing and retrieving the profile cc3200

Other Parts Discussed in Thread: CC3200

Hi,

I want to do provisioning in cc3200 and connect to internet when i press gpio switch. I have stored the wifi credentials on the profile like below during ap mode(while pressing the button).

lRetVal = sl_WlanProfileAdd(g_cWlanSSID, strlen((char*)g_cWlanSSID), 0, &g_SecParams,0,0,0);

once i added credential, i restarted cc3200 using below code

MAP_PRCMHibernateIntervalSet(330);
MAP_PRCMHibernateWakeupSourceEnable(PRCM_HIB_SLOW_CLK_CTR);
MAP_PRCMHibernateEnter();

then i try to read the profile like below in station mode. it returning -1

signed char ssid[33];
signed short ssidlen = 0;
unsigned char mac[12];
SlSecParams_t pSecParams;
SlGetSecParamsExt_t pSecExtParams;
unsigned long pPriority = 0;
lRetVal = sl_WlanProfileGet(0, ssid, &ssidlen, mac, &pSecParams, &pSecExtParams, &pPriority);

Please help me to resolve. I have attached the screenshot.

Regards

sundar