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.

Expected Error on CC3100 for STA connect with wrong passphrase

Other Parts Discussed in Thread: CC3100, CC3100BOOST

Hi;

I am trying to implement the correct error handling in my firmware for cases where the upstream application provides an incorrect passphrase for sl_WlanConnect. What I am seeing using both the CC3100Boost on Windows and on the target custom device is that the CC3100 returns SL_DEVICE_FATAL_ERROR_EVENT with sender SL_ERR_SENDER_WILINK and error code -109 (SL_ERROR_CON_MGMT_STATUS_DISCONNECT_DURING_CONNECT). I would have expected SL_ERROR_CON_MGMT_STATUS_AUTH_REJECT passed to SimpleLinkWlanEventHandler. Also, when I try to reset the device with an sl_Stop()/sl_Start() sequence using a 5s timeout for sl_Stop(), the call to sl_Stop() never returns. What is the correct procedure from recovering from SL_DEVICE_FATAL_ERROR_EVENT?

  • Hi David,

    As it states in its name, SL_DEVICE_FATAL_ERROR_EVENT is a fatal event, thus you can't relay on the CC3100 timers to work.
    In this case, you need to call to sl_Stop() without any timer setting.

    Can you please provide a bit more information on what is your exact use case and when do you see this event being triggered?
    Are you able to easily recreate this issue?

    Thanks,
    Alon
  • Hi David,

    I am closing the thread, if issue still exist please open a new thread and add a link to this one for reference.

    Thanks,
    Alon
  • Hi Alon;

    I cannot seem to successfully recover from the fatal error. In the getting started sample, I added the following code to the general event handler to handle the error:

    case SL_DEVICE_FATAL_ERROR_EVENT:
    printf("FATAL ERROR --- sender = %d, status = %d\r\n", pDevEvent->EventData.deviceEvent.sender,
    pDevEvent->EventData.deviceEvent.status);
    sl_Stop(0);
    sl_Start(0, NULL, 0);
    printf("Reset CC3100 successfully.\r\n");
    The event thread blocks in sl_Stop() and never returns. Please advise.
  • Alon, I am using the getting started with STA example application. Here is the welcome banner:

    Getting started with station application - Version 1.2.0

    All I have to do to trigger the event is provide the correct SSID name, the correct security type and ANY incorrect passphrase.