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.

CC3100: Failed to enter the Station mode

Part Number: CC3100
Other Parts Discussed in Thread: UNIFLASH, , CC31XXEMUBOOST

Hi,

I am trying to use the CC3100 on the TM4C129 board. I used the simplelink API.

Here is the relevant code to set CC3100 to the default state:

int main(){
char *pConfig = NULL; INT32 ASize = 0; SlSockAddrIn_t Addr;
initClk(); // PLL 50 MHz
UART_Init(); // Send data to PC, 115200 bps

int32_t retVal = configureSimpleLinkToDefaultState(pConfig);
if(retVal < 0)
Crash("configureSimpleLinkToDefaultState failed\n");

The retVal is -100,.

The code of configureSimpleLinkToDefaultState is:

static int32_t configureSimpleLinkToDefaultState(char *pConfig){
SlVersionFull ver = {0};
UINT8 val = 1;
UINT8 configOpt = 0;
UINT8 configLen = 0;
UINT8 power = 0;

INT32 retVal = -1;
INT32 mode = -1;

mode = sl_Start(0, pConfig, 0);


/* If the device is not in station-mode, try putting it in station-mode */
if (ROLE_STA != mode){
if (ROLE_AP == mode){
/* If the device is in AP mode, we need to wait for this event before doing anything */
while(!IS_IP_AQUIRED(g_Status));
}

/* Switch to STA role and restart */
retVal = sl_WlanSetMode(ROLE_STA);

retVal = sl_Stop(0xFF);

retVal = sl_Start(0, pConfig, 0);

/* Check if the device is in station again */
if (ROLE_STA != retVal){
/* We don't want to proceed if the device is not coming up in station-mode */
return DEVICE_NOT_IN_STATION_MODE;
}
}

the retVal of sl_Start failed. It returns -100. 

Is there possible fix to this problem?

Thank you very much

  • Hi,

    Do you use own hardware or CC3100BOOST? What SDK version do you use? Do you have uploaded latest ServicePack into device? If you not have uploaded latest ServicePack please use Uniflash 3.4 software with CC31XXEMUBOOST hardware and update your ServicePack.

    Jan