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.

Compiler/CC3220SF-LAUNCHXL: Cloud External Confirmation - ABORT_EXTERNAL_CONFIRMATION failed to put in provisioning mode

Part Number: CC3220SF-LAUNCHXL

Tool/software: TI C/C++ Compiler

Hi,

1. I am trying External Confirmation (Cloud ping) feature while provisioning instead of local ping. Able to connect AWS-IOT MQTT client to AWS-Cloud.

2. If any failure to cloud connect, I am trying to notify the networking subsystem about the failure by issuing the following command.               

retVal = sl_WlanProvisioning(SL_WLAN_PROVISIONING_CMD_ABORT_EXTERNAL_CONFIRMATION, 0, 0, NULL, 0);

3. From the doc reference (SWRU455k), upon issuing ABORT_EXTERNAL_CONFIRMATION command, networking subsystem should prepare for another  profile configuration attempt. Instead of this I am getting WLAN event as "SL_WLAN_PROVISIONING_ERROR_ABORT" and semaphore waiting timeout happening.

4. Host application need to trigger provisioning event after ABORT_EXTERNAL_CONFIRMATION command? or am i missing something ? please help me out.

5. Please find the code snippet below.

        if(ipaccuired == true)
        {
            if(ExternalCloudConfirmationConnect() == true)
            {
                retVal = sl_WlanProvisioning(SL_WLAN_PROVISIONING_CMD_STOP,ROLE_STA,0,NULL,
                                    SL_WLAN_PROVISIONING_CMD_FLAG_EXTERNAL_CONFIRMATION);
                if (retVal != 0)                    
                {
                    IotLogInfo("[External Cloud Confirmation] Provsioning stop failed. status [%d]", retVal);
                }
  
                SignalProvisioningEvent(PrvnEvent_ConfirmationSuccess);
  
                /* Set the simple link device.*/
                retVal = sl_WlanSetMode( ROLE_STA );
            }
            else
            {
                retVal = sl_WlanProvisioning(SL_WLAN_PROVISIONING_CMD_ABORT_EXTERNAL_CONFIRMATION, 0, 0, NULL, 0);
                IotLogInfo("[External Cloud Confirmation] Abort retVal=%d\r\n", retVal);

                //SignalProvisioningEvent(PrvnEvent_Triggered); //is this required?
            }
        }

6. Please find the log reference below.

[External Cloud Confirmation] Mqtt Connect Failed

[WLAN EVENT] Connection Success (feedback to Smartphone app failed)

[External Cloud Confirmation] Abort retVal=0

[WLAN EVENT] Provisioning Error status=6

[DEBUG] semaphores waiting passed!

[POWER MANAGER] SET TO BURST MODE.

Successfully initialized the demo. Network type for the demo: 1

  • Hi,

    I am still investigating the proper behavior of the sl_WlanProvisioning(SL_WLAN_PROVISIONING_CMD_ABORT_EXTERNAL_CONFIRMATION,...) command, but just to confirm are you using the aws_demos project from the AWS freeRTOS SDK or are you using a different demo?

    Regards,

    Michael

  • Hi Michael,

    Thanks for your response,

    I am using AWS freeRTOS SDK demo.

    Regards,

    Suresh

  • Hi Suresh,

    I am less familiar with the operation of the aws freertos SDK demos as it is a third-party example, but looking at out documentation it appears that the ABORT_EXTERNAL_CONFIRMATION is working as intended.

    When you issue that command, you will get the SL_WLAN_PROVISIONING_ERROR_ABORT code returned through the handler as an acknowledgement. From there, you will need to put your provisioning state machine back into the desired state. If you wish to be able to immediately send provisioning data again, you should use SignalProvisioningEvent() to put the provisioning state machine back into the start state, most likely the PrvnEvent_Triggered state much like you in your commented-out code. As the provisioning flow is largely controlled by the application, it is up to your code to put the CC3220 back into the desired provisioning state after an external confirmation abort.

    Let me know if you need more clarification or have further questions on using provisioning.

    Regards,

    Michael

  • Hi Michael,

    Thanks for your response,

    If i am using TI-App for provisioning along with the following command,

    sl_WlanProvisioning(provisioningMode, ROLE_STA, TIMEOUT, NULL, SL_WLAN_PROVISIONING_CMD_FLAG_EXTERNAL_CONFIRMATION).

    a. As i sent External Confirmation command to NWP,  Device should not respond for any local ping from App.

    b.TI-App shall timeout is my understanding is correct??

    If Yes, Instead of this i am experiencing the following scenarios

    c. Provisioning successful  from Ti-App side.

    d. Device is getting WLAN Events instead of waiting for my application logic to connect / timeout to the cloud.

    Is custom mobile app (without Local ping) must required to test this feature? please guide me in detail as high priority.

    Please find the following is trace for detailed information.

    [WLAN EVENT] Profile Added
    [WLAN EVENT] Connection to AP succeeded
    [NETAPP EVENT] IP Acquired: IP=192.168.225.32 , Gateway=192.168.225.1
    [Debug] Post connectionAsyncEvent
    [WLAN EVENT] IP address acquired
    Establishing new MQTT connection.
    (MQTT connection 200091d8, CONNECT operation 20007c88) Waiting for operation completion.
    [WLAN EVENT] Confirmation Success!
    [WLAN EVENT] Provisioning stopped
    [WLAN EVENT] - WLAN Connection Status:3
    [WLAN EVENT] - Connected to SSID:Suresh
    (MQTT connection 200091d8, CONNECT operation 20007c88) Wait complete with result TIMEOUT.
    Failed to establish new MQTT connection, error TIMEOUT.
    Network connection closed on error.
    (MQTT connection 200091d8) Network connection destroyed.
    MQTT CONNECT returned error TIMEOUT.
    [External Cloud Confirmation] Mqtt Connect Failed
    [External Cloud Confirmation] Abort retVal=-2177
    

    Regards,

    Suresh