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.

OTA update with SDK 1.3.0 not working

Other Parts Discussed in Thread: CC3200SDK, CC3200

Dear all,

I have troubles with the OTA update with recently released SDK 1.3.0.

I've been using the OTA with SDK1.2.0 for several months. I did integrate it into my application and everything was OK. Now I moved to SDK 1.3.0 and it stopped working at all.

So I tried to test it with the example application (ota_update_os). If I define the Dropbox API v2:

#define OTA_DROPBOX_V2

in  "C:\...\CC3200SDK_1.3.0\cc3200-sdk\simplelink_extlib\ota\OtaCommon.h", recompile and import the library, the OTA will not proceed.

The OTA update status I'm getting (UART output) is:

In Progress...

Error Retrying...

Completed

and then it get stuck. It does not reboot. The new image is not set.

If I do comment:

// #define OTA_DROPBOX_V2 

everything is OK. So it seems the problem is related to Dropbox API v2 only.

Also, when using Dropbox API v2, is the definition in the "otaconfig.h" correct?

#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 "<my token>"
#define LOG_SERVER_NAME "api-content.dropbox.com"
#define OTA_SERVER_REST_FILES_PUT "/1/files_put/auto/"
#define OTA_VENDOR_STRING "Vid01_Pid00_Ver00"

shouldn't it be something like:

#define OTA_SERVER_NAME "api.dropbox.com"
#define OTA_SERVER_IP_ADDRESS 0x00000000
#define OTA_SERVER_SECURED 1
#define OTA_SERVER_REST_UPDATE_CHK "/2/files/get_metadata" // returns files/folder list
#define OTA_SERVER_REST_RSRC_METADATA "/2/files/get_temporary_link" // returns A url that serves the media directly
#define OTA_SERVER_REST_HDR "Authorization: Bearer "
#define OTA_SERVER_REST_HDR_VAL "<my token>" 
#define LOG_SERVER_NAME "api-content.dropbox.com"
#define OTA_SERVER_REST_FILES_PUT "/2/files/upload"
#define OTA_VENDOR_STRING "Vid01_Pid00_Ver00"

Is anywhere updated documentation related to the OTA and Dropbox API v2? The document in "C:\...\CC3200SDK_1.3.0\cc3200-sdk\docs\examples\CC3200 Over-The-Air (OTA) Update Application Note.pdf" seems to be obsolete.

I will appreciate any advice.

Thanks

Daniel

  • Hi Daniel,

    We are checking the functionality of the OTA example. We will follow up with a response soon.

    Best regards,
    Sarah
  • Hi Daniel,

    The OTA_DROPBOX_V2 flag only impacts the "ota" library and currently I don't understand why it makes a difference when used in the application header ("otaconfig.h"). I'll double check this.

    As implied above, the V2 API support was embedded in the library code so no change is required to any of the OTA commands (OTA_SERVER_REST_UPDATE_CHK, OTA_SERVER_REST_RSRC_METADATA, OTA_SERVER_REST_FILES_PUT) within the otaconfig.h.
    By default the library uses V2 API and in order to move back to V1, you'll need to comment out "#define OTA_DROPBOX_V2" in the common library header: "otacommon.h" (this will require to recompile the library).

    In the next release we will remove the OTA commands from "otaconfig.h" as such internal implementation definitions are now supported within the library, but for now it is still needed if you choose to stick to the V1 API (as suggested above).

    Note that "OtaConfig.h" is still required for setting the user specific parameters e.g. token, vendor string, etc.

    br,
    Kobi
  • Hello Kobi,

    thanks for the quick response.

    I think you misunderstood me. I do use the OTA_DROPBOX_V2 flag in the "OtaCommon.h" not in "otaconfig.h". And I always rebuild the "ota" library after defining or commenting out the flag.

    The issue I have is if I use the API v1 (commenting out OTA_DROPBOX_V2 and recompiling the library) everything works OK, but when using API v2 (defining OTA_DROPBOX_V2 and recompiling the library), the OTA does not proceed as described in my first post. I do not change anything in the "ota_update_os" example. It stays as it is.

    So my question is, why does it work with API v1, but not with API v2? Why is the behaviour different? Do both work for you when you test it?

    Thank you

    Daniel

  • Hi Daniel,

    Try to increase the size of the cdn_url parameter.

    In "ota_api.h" look for "cdn_url" and update the array size to 512.

          /******************************************************************************

            * File metadata Structure

           ******************************************************************************/

           typedef struct

           {

                 /* files server name */

                 _u8 cdn_url[512];

     

    Recompile the library and application.

     

    If you still have issues - try to enable the debug logs and send me terminal output. 

    Follow the next steps to enable ota logs.

    1. in main.c::DisplayTask()

    comment out the clear screen message:

    //Message("\033[2J\033[H\033[?25l");

    2. in extlibs_common.h:

    uncomment the DEBUG_PRINT definition:

    #define DEBUG_PRINT

    3. rebuild library + application and send me the terminakl

     

    Thanks,

    Kobi

  • Hi Kobi,

    Extending the buffer size helped. It works fine now.

    Many thanks,

    Daniel

  • Will you release a fix for this in a supposed SDK 1.3.1 or should we start tracking changes made to the stack on our application repositories?
  • We will soon release the fix in a new SDK.

    br,
    Kobi