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.

CC3200MOD: How to invoke WlanConnect Error -109 with saved profile?

Part Number: CC3200MOD

Error -109 is returned in the GeneralEventHandler() when the given password is incorrect. I would like to know how to invoke this error using the auto connect connection policy or by passing the saved profile into WlanConnect. The reason for this is to provide feedback to the user when they add a profile via an HTML webpage, and notify them if the password was incorrect. At the moment, my options seem to be to take in the SSID and password from the HTML webpage using USER Tokens and call sl_wlanconnect() with them, but I would obviously like their SSID/password to be stored as a profile via the __SL_P_P.A and __SL_P_P.C tokens without first passing through my application. 

From my testing, it does not appear that a General Event Error -109 occurs when SimpleLink autoconnect attempts connecting to an SSID with an incorrect password pair. I have only seen General Event Error -109 invoked when I manually connect to an SSID with an incorrect passwork, like this:

sl_WlanConnect("SSID_Network","Incorrect_Password");

Thank you,

Tom

  • Hi Tom,

    Are you setting more than one profile when you are testing this?

    I was able to get a general event with error -109 to trigger when an incorrect password was used with auto connect policy. I only tested this with one profile however.

    Code used:

        //------- Auto Connect setupt code here -----//
    
        UART_PRINT("Setting auto connect policy...\n");
    
        lRetVal = sl_WlanPolicySet(SL_POLICY_CONNECTION,
                                    SL_CONNECTION_POLICY(1, 0, 0, 0, 0), NULL, 0);
    
        ASSERT_ON_ERROR(lRetVal);
    
        //------- Add profile code here -----//
    
        UART_PRINT("Adding Profile...\n");
    
        lRetVal = sl_WlanProfileAdd((signed char*)SSID_NAME, strlen(SSID_NAME), 0, &secParams, 0, 1, 0);
    
        ASSERT_ON_ERROR(lRetVal);

    Best,

    Kevin

  • Hi Kevin,

    Thank you for the quick and helpful response! The only immediately noticeable difference between our code is that my application will have a profile stored when it is powered up, although that hardly seems noteworthy... Now that I have verification that it works I'll take a closer inspection. Thank you Kevin.