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.

CCS/CC3220S: cloud_ota : device not getting provisioned

Part Number: CC3220S
Other Parts Discussed in Thread: UNIFLASH

Tool/software: Code Composer Studio

Hi all,

- I have build the project cloud_ota for cc3220. after building I am starting debug session for the same. but if I see console logs provisioning is not getting started.

- logs are :

********************************************************************************
                  OTA APP Application - Version 0.10.00.03                      
********************************************************************************
                                                                                
SimpleLinkInitCallback: started in role 0                                       
Host Driver Version: 3.0.1.55                                                   
Build Version 3.13.0.3.31.2.0.0.0.2.2.0.6                                       
                                                                                
                                                                                
                                                                                
==================================                                              
 Provisioning Example Ver. 1.0.16                                               
==================================                                              
                                                                                
 CHIP 0x30000018                                                                
 MAC  31.2.0.0.0                                                                
 PHY  2.2.0.6                                                                   
 NWP3.13.0.3                                                                    
 ROM  0                                                                         
 HOST 3.0.1.55                                                                  
 MAC address: f0:c7:7f:19:1f:75                                                 
                                                                                
                                                                                
 Starting Provisioning! mode=2 (0-AP, 1-SC, 2-AP+SC, 3-AP+SC+WAC)               
                                                                                
 Provisioning Command Error, num:-2170                                          


- from error number I can assume that it is related to http server. but how to solve this ?

  • Hi Bhargav,

    Error -2170 is SL_ERROR_WLAN_PROVISIONING_ABORT_HTTP_SERVER_DISABLED (from errors.h). You can either add a sl_NetAppStart() command before you start provisioning to be sure the internal HTTP server is enabled, or you can use UniFlash ImageCreator to flash the device with an image that has HTTP server enabled.

    Best regards,

    Sarah

  • Hello Sarah,

    Thanks for your responce.

    As per your response, I have added  sl_NetAppStart() API before starting the provisioning, the code I modified is as below :

    In function 'ProvisioningExample()'  in file cloud_ota.c

        retVal = sl_NetAppStart(SL_NETAPP_HTTP_SERVER_ID | SL_NETAPP_DHCP_SERVER_ID);
        if(retVal < 0)
        {
            UART_PRINT(" Netapp start error, num:%d\r\n",retVal);
        }
        /* start provisioning */
        retVal =
            sl_WlanProvisioning(provisioningCmd, ROLE_STA,
            PROVISIONING_INACTIVITY_TIMEOUT,NULL,0);

        if(retVal < 0)
        {
            UART_PRINT(" Provisioning Command Error, num:%d\r\n",retVal);
        }

    Then starting the debug session, I am getting the following error :

    ********************************************************************************
                      OTA APP Application - Version 0.10.00.03        
    ********************************************************************************

    SimpleLinkInitCallback: started in role 0
    Host Driver Version: 3.0.1.55
    Build Version 3.13.0.3.31.2.0.0.0.2.2.0.6



    ==================================
     Provisioning Example Ver. 1.0.16
    ==================================

     CHIP 0x30000018
     MAC  31.2.0.0.0
     PHY  2.2.0.6
     NWP3.13.0.3
     ROM  0
     HOST 3.0.1.55
     MAC address: f0:c7:7f:19:1f:75
                                                                                    
                                                                                    
     Starting Provisioning! mode=2 (0-AP, 1-SC, 2-AP+SC, 3-AP+SC+WAC)               
                                                                                    
     Netapp start error, num:-4116                                                  
     Provisioning Command Error, num:-2170

    As per errors.h the error is : SL_ERROR_WRONG_ROLE

  • Hi Bhargav,

    Can you try setting only the HTTP server? DHCP is available in AP mode.

    Best regards,

    Sarah