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/CC3200-LAUNCHXL: CC3200-LAUNCHXL

Part Number: CC3200-LAUNCHXL
Other Parts Discussed in Thread: CC3200

Tool/software: Code Composer Studio

Hi,

Actually I'm facing some issues with OTA update in my code. It is showing OTA Run = -4. What should I do now?

Even I tried with new Key generation in the dropbox also... Is there any updates happened in key generation of dropbox ?

#define OTA_SERVER_NAME "api.dropbox.com"
#define OTA_SERVER_IP_ADDRESS 0x00000000
#define OTA_SERVER_SECURED 1
#define OTA_SERVER_REST_UPDATE_CHK "/1/metadata/auto/" // returns files/folder list
#define OTA_SERVER_REST_RSRC_METADATA "/1/media/auto" // returns A url that serves the media directly
#define OTA_SERVER_REST_HDR "Authorization: Bearer "
#define OTA_SERVER_REST_HDR_VAL "t3mmWZxNRgwAAAAAAAAOwVHD-LR7JFCkZTrZDMTLLP1Ins0ti5sNoyJdoPc0uDas"
#define LOG_SERVER_NAME "api-content.dropbox.com"
#define OTA_SERVER_REST_FILES_PUT "/1/files_put/auto/"
#define OTA_VENDOR_STRING "TI_CC3200_WTHR01"

static OtaOptServerInfo_t g_otaOptServerInfo;
static void *pvOtaApp;

  • Hello,

    Can you clarify if it worked for you before and stopped working or is it the first time you try to make it work?

    There are a few -4 errors but in your case i believe it is the RUN_STAT_ERROR_RESOURCE_LIST error, i.e. when you connect to the server and fetch the resource list. Can you double check and make sure this is the error? you can look at sl_extLib_OtaRun() under OTA_STATE_CONNECT_SERVER case.

    Also, what ServicePack are you using and what is the folder name you created on DropBox?

    Regards,

    Shlomi

  • case OTA_UPDATE_STATE_RUN:

    iRet = sl_extLib_OtaRun(pvOtaApp);

    if ( iRet < 0 )
    {

    if( RUN_STAT_ERROR_CONTINUOUS_ACCESS_FAILURES == iRet )
    {
    //
    // Schelude a restart.
    //
    sDisplayInfo.iOTAStatus = OTA_ERROR;
    g_ulSysState = SYS_STATE_REBOOT;

    }
    else
    {
    sDisplayInfo.iOTAStatus = OTA_ERROR_RETRY;
    }

    }

    This is the code I'm using for "ota_update_nonos"


    #define OTA_SERVER_NAME "api.dropbox.com"
    #define OTA_SERVER_IP_ADDRESS 0x00000000
    #define OTA_SERVER_SECURED 1
    #define OTA_SERVER_REST_UPDATE_CHK "/1/metadata/auto/" // returns files/folder list
    #define OTA_SERVER_REST_RSRC_METADATA "/1/media/auto" // returns A url that serves the media directly
    #define OTA_SERVER_REST_HDR "Authorization: Bearer "
    #define OTA_SERVER_REST_HDR_VAL "b4vS-hiSQlQAAAAAAAAAAUgmBsggHvDLzj-zCO8SUbrHVgaoc_68G59wCxg8PMcz"    /*dropbox access                                                                                                                                                                                                                                              token*/
    #define LOG_SERVER_NAME "api-content.dropbox.com"
    #define OTA_SERVER_REST_FILES_PUT "/1/files_put/auto/"
    #define OTA_VENDOR_STRING "Vid00_Pid00_Ver00"                 /* Folder Name*/ 

     

    This is the servicepack version I'm using : 

    2.11.0.1.31.1.5.0.2.1.0.3.37



    OTA update is not happening and this point continuously  repeating if i press SW3 in CC3200 launchPad

    sDisplayInfo.iOTAStatus = OTA_ERROR_RETRY;                   /*Line No 1188*/

     

     Can you send the link for updated dropbox app creation?

    Also in the first folder (TI_CC3200_WTHR01) I'm adding the .bin file and what are the files to be added in the 2nd folder (TI_CC3200_WTHR02 )?

    I tried using both legacy api and scope access.. 

     May I know what should I select among the above options

  • Hi,

    I am a little confused especially with the OTA_VENDOR_STRING which is different in your two wxamples.

    Please clarify:

    • what is OTA_VENDOR_STRING you are using?
    • what SDK version are you using?
    • can you also open the ota debug? i believe it is "DEBUG_PRINT" under extlibs_common.h header file. the define is commented out so please uncomment it, recompile the library and link to your project. It would give me much more insight to what is happening.

    Thanks,

    Shlomi

  •  Hi shlomi,

     Just to avoid confusion .. OTA_VENDOR_STRING is same as what is given in the ota_update_nonos application "Vid00_Pid00_Ver00". Please forget the other Vendor string mentioned above... The SDK version is 1.3.0.

    we ran ota_update_nonos by adding the acces token generated from dropbox with the legacy api option as shown in the figure below. 

    We have observed that the execution is toggling between  two states OTA_ERROR_RETRY and IN PROGRESS continuously..     Since we are observing  Scope acces (NEW)  in the options we have a suspicion that is there an update in the dropbox api?

      And one more doubt is what will happen if only one folder is there in the dropbox app with the name "Vid00_Pid00_Ver00" and no other folders in the app. (if we don't add other files like application bootloader,service pack etc... in the other folder will it create a problem?    other words... is it mandatory to have a second folder in the dropbox along with the one that contains bin file?).

  • Hello,

    It would really help if you can you can open the ota debug define ("DEBUG_PRINT" under extlibs_common.h header file).

    To my understanding,with v1.3.0 the folder you need to create on dropbox is according to the servicepack.

    if you are using 2.11.0.1.31.1.5.0.2.1.0.3.37, it should be Vid00_Pid00_Ver0001.

    The device would ask for the resource list from this folder as you can see on the source file:

     //
    	// Create vendor string from NWP version and Vendor Prefix
    	//
            strcpy((char *)ucVendorStr,OTA_VENDOR_STRING);
    
            ulVendorStrLen = strlen(OTA_VENDOR_STRING);
    
            sprintf((char *)&ucVendorStr[ulVendorStrLen],"%02lu",
            sDisplayInfo.sNwpVersion.NwpVersion[3]);

    And asking for the resource list:

    case OTA_STATE_CONNECT_SERVER:
                pOtaApp->state = OTA_STATE_RESOURCE_LIST;
                Report("sl_extLib_OtaRun: OtaClient_UpdateCheck, vendorStr=%s\r\n", pOtaApp->vendorStr);
                pOtaApp->numUpdates = OtaClient_UpdateCheck(pOtaClient, pOtaApp->vendorStr);

    Regards,

    Shlomi

  • Hi Shlomi,

    I did the above changes as you told in earlier message also I Enable the "DEBUG_PRINT"  and now also same error is printing("Error Retrying..."). Nothing is printed extra...

    Even I changed the Vendor string to Vid00_Pid00_Ver0001

    Is it possible to run ota update from your end and confirm me whether anything is changed in dropbox API or not? All I am doing is maintain the folder name as Vid00_Pid00_Ver0001 --> generate access token --> add accestoken in the project --> build .bin file -->name as f80_sys_mcuimgA.bin and upload in the folder in dropbox that  is named as Vid00_Pid00_Ver0001  and running. Couldn't findout the missing part.

  • Hi,

    It is less trivial for me to build the setup currently but from the printouts it seems that you didn't get into your original error (-4) and you don't have anything printed from within the library you recompiled.

    Are you sure you are using the new compiled library in the list of linker library?

    It doesn't even get to try and get the resource list?

    Shlomi

  • I build the OTA file and then it started printing the above message when I'm checking for the OTA update. Still OTA update is not happening...

    Can you suggest me what to do further?

  • Now at least I can see some additional debug printouts.

    It seems as you are failing to connect to the server (-111).

    I can see that you defined the connection as secured which is OK.

    can you step into and see why you are failing to connect (just go all the way down to http_connect_server() which calls sl_NetAppDnsGetHostByName() and then sl_Connect())?

    Are you behind a proxy/firewall? can you try connect through your mobile's hot spot?

  • I tried with mobile Hotspot still same error is coming

  • Hi,

    This time you don't even get the time over the NTP server but you did before.

    what happened? what is different?

    Hard to tell why you are not able to connect.

    In these cases, it is best if I can see an air sniffer (do you have this capability to capture the air over Wi-Fi)?

    In addition, you can also fetch logs from the NWP in the device. Then i can see what is going on internally. The procedure to do so is as below.

    Logging procedure:

    1. Identify the hardware pin for network logger on CC3200 chipset.
      1. For CC3200 QFN flavor, it is pin #62 (GPIO07)
      2. For CC3200 MOD flavor, it is pin #52 (GPIO07)
    2. Use a level shifter and connect ground and the 1-pin data line
    3. Add to pinmux.c the following lines:
      1. MAP_PRCMPeripheralClkEnable(PRCM_UARTA0, PRCM_RUN_MODE_CLK);
      2. MAP_PinTypeUART(PIN_62, PIN_MODE_1);
    4. Open a terminal emulation and configure the followings:
      1. baud rate: 921,600 bps
      2. 8 bits
      3. no parity
      4. 1 stop bit
      5. no flow control
    5. Configure the terminal emulation to work in Binary mode (and not textual/ASCII mode)
    6. Configure the terminal emulation to work in "Log" mode so any character that is received from CC3200 chipset device is written to the local Log file. In this phase, binary characters should appear on the terminal window.
    7. Close the log file when done and send it to TI for post capture analysis.

    Shlomi