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.

Using sl_WlanProfileGet



Calling sl_WlanProfileGet is causing a hard fault (getting trapped in FaultISR) when I call with indexes that don't have a profile stored in them. That is, I have one profile stored and on the second iteration of the loop I get the HF. I feel like I might be doing something moronic here since this is seemingly so simple.

static void PrintSimplelinkConnectionProfiles(){
	_i16 i;
	_i8 ssid[32];
	_i16 ssidLen;
	_u8 macAddr[6];
	SlSecParams_t secParams;
	SlGetSecParamsExt_t secExtParams;
	_u32 priority;

	UART_PRINT("Saved Connection Profiles:\r\n");

    for(i = 0; i < 7; i++){
		if(sl_WlanProfileGet(i, ssid, &ssidLen, macAddr, &secParams, &secExtParams, &priority) >= 0){
			UART_PRINT("%i: %.*s\r\n", priority, ssidLen, ssid);
		}
    }
}

Is there something else I need to call to figure out if an index it valid or not? My end goal here is to 1. figure out of there are any profiles stored already and 2. list out what networks are trying to be connected to automatically.