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/LAUNCHXL-CC3235S: Not able to get firmware update (OTA update) using cloud_ota sample code

Part Number: LAUNCHXL-CC3235S
Other Parts Discussed in Thread: UNIFLASH, CC3235S, CC3120, CC3220SF

Tool/software: Code Composer Studio

Hi TI,

I am running cloud_ota sample code but code is not able to get update from Dropbox cloud

Sdk version: simplelink_cc32xx_sdk_4_10_00_07

Uniflash version : Version: 6.1.0.2829

Ccs version :  10.0.0.00010 

document used: 

i) file:///C:/ti/simplelink_cc32xx_sdk_4_10_00_07/docs/simplelink_mcu_sdk/Over_The_Air_Update_Guide.html

ii) http://dev.ti.com/tirex/explore/node?node=ACE5ggZRybEJNZUcnzc3ww__fc2e6sr__LATEST

iii) swra510a.pdf

I know these document are enough to perform this task, but i  have no idea where i am making mistake , please help me to get rid from this problem,

here is my logs:

OtaInit: statistics = 0, 0, 0

OtaInit: call Ota_init
OTA_init: sizeof CdnClient=576, sizeof OtaArchive=4956

OTA_init: sizeof OtaLib_t=7736, sizeof OTA_memBlock=7800

OTA_init: OTA lib version = OTA_LIB_2.0.0.7

OtaArchive_Init: OTA archive version = OTA_ARCHIVE_2.0.0.4

OtaConfig: call OTA_set EXTLIB_OTA_SET_OPT_SERVER_INFO,ServerName=api.dropboxapi .com

OtaConfig: call OTA_set EXTLIB_OTA_SET_OPT_VENDOR_ID, VendorDir=U7_MCU_FLASH

OTA_run: call CdnClient_ConnectServer OTA server=api.dropboxapi.com

CdnClient_ConnectServer: HttpClient_Connect api.dropboxapi.com

HttpClient_Connect: IP_ADDR=162.125.81.7

HttpClient_Connect: WARNING Socket Connect, status=-468, Ignored...

OTA_run: CdnClient_ReqOtaDir, VendorDir=U7_MCU_FLASH

CdnDropbox_SendReqDir: uri=/2/files/list_folder

RespLen is 821, ProcessedSize is: 816

the entire JSON pRespBuf is: (null)

OtaDir FileName=/U7_MCU_FLASH/20200820183753_CC3235S_cc3235s_out_of_box_free rtos.tar, FileSize=1525760

OTA_run: CdnClient_ReqOtaDir, NumDirFiles=1

OTA_run: CdnClient_GetNextDirFile

OTA_run: CdnClient_GetNextDirFile: file=/U7_MCU_FLASH/20200820183753_CC3235S_cc3 235s_out_of_box_freertos.tar, size=1525760

OtaArchive_Init: OTA archive version = OTA_ARCHIVE_2.0.0.4

OtaArchive_CheckVersion: current version str = 20200820133810

OtaArchive_CheckVersion: new version str = 20200820183753

OtaArchive_CheckVersion: newer version update - 20200820183753

OtaRunStep: status from Ota_run: OTA_RUN_STATUS_CHECK_NEWER_VERSION, accept and continue

OtaRunStep: CurrentVersion=20200820133810, NewVersion=20200820183753, Start down load ...

OTA_run: Call CdnClient_ReqFileUrl, filename = /U7_MCU_FLASH/20200820183753_CC32 35S_cc3235s_out_of_box_freertos.tar

CdnDropbox_SendReqFileUrl: uri=/2/files/get_temporary_link

HTTP request is:
POST /2/files/get_temporary_link} HTTP/1.1
host: api.dropboxapi.com
Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Content-Type: Application/Json
Content-Length: 80

{"path": "/U7_MCU_FLASH/20200820183753_CC3235S_cc3235s_out_of_box_freertos.tar"}


HttpClient_RecvSkipHdr: http error code HTTP/1.1 400

CdnDropbox_ParseRespDir: ERROR HttpClient_RecvSkipHdr, status=-20310

CdnClient_ReqFileUrl: Error CdnVendor_ParseRespFileUrl Status=-20310

OTA_run: ERROR CdnClient_ReqFileUrl, Status=-20310


_OtaCheckConsecutiveErrors: ConsecutiveOtaErrors=1/5, return only WARNNING

OtaRunStep: WARNING Ota_run, Status=20005, continue for next OTA retry

OTA_run: call CdnClient_ConnectServer OTA server=api.dropboxapi.com

CdnClient_ConnectServer: HttpClient_Connect api.dropboxapi.com

HttpClient_Connect: IP_ADDR=162.125.81.7

HttpClient_Connect: WARNING Socket Connect, status=-468, Ignored...

OTA_run: CdnClient_ReqOtaDir, VendorDir=U7_MCU_FLASH

CdnDropbox_SendReqDir: uri=/2/files/list_folder

RespLen is 821, ProcessedSize is: 816

the entire JSON pRespBuf is: (null)

OtaDir FileName=/U7_MCU_FLASH/20200820183753_CC3235S_cc3235s_out_of_box_free rtos.tar, FileSize=1525760

OTA_run: CdnClient_ReqOtaDir, NumDirFiles=1

OTA_run: CdnClient_GetNextDirFile

OTA_run: CdnClient_GetNextDirFile: file=/U7_MCU_FLASH/20200820183753_CC3235S_cc3 235s_out_of_box_freertos.tar, size=1525760

OtaArchive_Init: OTA archive version = OTA_ARCHIVE_2.0.0.4

OtaArchive_CheckVersion: current version str = 20200820133810

OtaArchive_CheckVersion: new version str = 20200820183753

OtaArchive_CheckVersion: newer version update - 20200820183753

OtaRunStep: status from Ota_run: OTA_RUN_STATUS_CHECK_NEWER_VERSION, accept and continue

OtaRunStep: CurrentVersion=20200820133810, NewVersion=20200820183753, Start down load ...

OTA_run: Call CdnClient_ReqFileUrl, filename = /U7_MCU_FLASH/20200820183753_CC32 35S_cc3235s_out_of_box_freertos.tar

CdnDropbox_SendReqFileUrl: uri=/2/files/get_temporary_link

HTTP request is:
POST /2/files/get_temporary_link} HTTP/1.1
host: api.dropboxapi.com
Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Content-Type: Application/Json
Content-Length: 80

{"path": "/U7_MCU_FLASH/20200820183753_CC3235S_cc3235s_out_of_box_freertos.tar"}


HttpClient_RecvSkipHdr: http error code HTTP/1.1 400

CdnDropbox_ParseRespDir: ERROR HttpClient_RecvSkipHdr, status=-20310

CdnClient_ReqFileUrl: Error CdnVendor_ParseRespFileUrl Status=-20310

OTA_run: ERROR CdnClient_ReqFileUrl, Status=-20310


_OtaCheckConsecutiveErrors: ConsecutiveOtaErrors=2/5, return only WARNNING

OtaRunStep: WARNING Ota_run, Status=20005, continue for next OTA retry

OTA_run: call CdnClient_ConnectServer OTA server=api.dropboxapi.com

CdnClient_ConnectServer: HttpClient_Connect api.dropboxapi.com

HttpClient_Connect: IP_ADDR=162.125.81.7

HttpClient_Connect: WARNING Socket Connect, status=-468, Ignored...

OTA_run: CdnClient_ReqOtaDir, VendorDir=U7_MCU_FLASH

CdnDropbox_SendReqDir: uri=/2/files/list_folder

RespLen is 821, ProcessedSize is: 816

the entire JSON pRespBuf is: (null)

OtaDir FileName=/U7_MCU_FLASH/20200820183753_CC3235S_cc3235s_out_of_box_free rtos.tar, FileSize=1525760


OTA_run: CdnClient_ReqOtaDir, NumDirFiles=1

OTA_run: CdnClient_GetNextDirFile

OTA_run: CdnClient_GetNextDirFile: file=/U7_MCU_FLASH/20200820183753_CC3235S_cc3235s_out_of_box_freertos.tar, size=1525760

OtaArchive_Init: OTA archive version = OTA_ARCHIVE_2.0.0.4

OtaArchive_CheckVersion: current version str = 20200820133810

OtaArchive_CheckVersion: new version str = 20200820183753

OtaArchive_CheckVersion: newer version update - 20200820183753

OtaRunStep: status from Ota_run: OTA_RUN_STATUS_CHECK_NEWER_VERSION, accept and continue

OtaRunStep: CurrentVersion=20200820133810, NewVersion=20200820183753, Start download ...

OTA_run: Call CdnClient_ReqFileUrl, filename = /U7_MCU_FLASH/20200820183753_CC3235S_cc3235s_out_of_box_freertos.tar

CdnDropbox_SendReqFileUrl: uri=/2/files/get_temporary_link

HTTP request is:
POST /2/files/get_temporary_link} HTTP/1.1
host: api.dropboxapi.com
Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Content-Type: Application/Json
Content-Length: 80

{"path": "/U7_MCU_FLASH/20200820183753_CC3235S_cc3235s_out_of_box_freertos.tar"}


HttpClient_RecvSkipHdr: http error code HTTP/1.1 400

CdnDropbox_ParseRespDir: ERROR HttpClient_RecvSkipHdr, status=-20310

CdnClient_ReqFileUrl: Error CdnVendor_ParseRespFileUrl Status=-20310

OTA_run: ERROR CdnClient_ReqFileUrl, Status=-20310


_OtaCheckConsecutiveErrors: ConsecutiveOtaErrors=3/5, return only WARNNING

OtaRunStep: WARNING Ota_run, Status=20005, continue for next OTA retry

OTA_run: call CdnClient_ConnectServer OTA server=api.dropboxapi.com

CdnClient_ConnectServer: HttpClient_Connect api.dropboxapi.com

HttpClient_Connect: IP_ADDR=162.125.81.7

HttpClient_Connect: WARNING Socket Connect, status=-468, Ignored...

OTA_run: CdnClient_ReqOtaDir, VendorDir=U7_MCU_FLASH

CdnDropbox_SendReqDir: uri=/2/files/list_folder

RespLen is 821, ProcessedSize is: 816

the entire JSON pRespBuf is: (null)

OtaDir FileName=/U7_MCU_FLASH/20200820183753_CC3235S_cc3235s_out_of_box_freertos.tar, FileSize=1525760

OTA_run: CdnClient_ReqOtaDir, NumDirFiles=1

OTA_run: CdnClient_GetNextDirFile

OTA_run: CdnClient_GetNextDirFile: file=/U7_MCU_FLASH/20200820183753_CC3235S_cc3235s_out_of_box_freertos.tar, size=1525760

OtaArchive_Init: OTA archive version = OTA_ARCHIVE_2.0.0.4

OtaArchive_CheckVersion: current version str = 20200820133810

OtaArchive_CheckVersion: new version str = 20200820183753

OtaArchive_CheckVersion: newer version update - 20200820183753

OtaRunStep: status from Ota_run: OTA_RUN_STATUS_CHECK_NEWER_VERSION, accept and continue

OtaRunStep: CurrentVersion=20200820133810, NewVersion=20200820183753, Start download ...

OTA_run: Call CdnClient_ReqFileUrl, filename = /U7_MCU_FLASH/20200820183753_CC3235S_cc3235s_out_of_box_freertos.tar

CdnDropbox_SendReqFileUrl: uri=/2/files/get_temporary_link

HTTP request is:
POST /2/files/get_temporary_link} HTTP/1.1
host: api.dropboxapi.com
Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Content-Type: Application/Json
Content-Length: 80

{"path": "/U7_MCU_FLASH/20200820183753_CC3235S_cc3235s_out_of_box_freertos.tar"}


HttpClient_RecvSkipHdr: http error code HTTP/1.1 400

CdnDropbox_ParseRespDir: ERROR HttpClient_RecvSkipHdr, status=-20310

CdnClient_ReqFileUrl: Error CdnVendor_ParseRespFileUrl Status=-20310

OTA_run: ERROR CdnClient_ReqFileUrl, Status=-20310


_OtaCheckConsecutiveErrors: ConsecutiveOtaErrors=4/5, return only WARNNING

OtaRunStep: WARNING Ota_run, Status=20005, continue for next OTA retry

OTA_run: call CdnClient_ConnectServer OTA server=api.dropboxapi.com

CdnClient_ConnectServer: HttpClient_Connect api.dropboxapi.com

HttpClient_Connect: IP_ADDR=162.125.81.7

HttpClient_Connect: WARNING Socket Connect, status=-468, Ignored...

OTA_run: CdnClient_ReqOtaDir, VendorDir=U7_MCU_FLASH

CdnDropbox_SendReqDir: uri=/2/files/list_folder

RespLen is 821, ProcessedSize is: 816

the entire JSON pRespBuf is: (null)

OtaDir FileName=/U7_MCU_FLASH/20200820183753_CC3235S_cc3235s_out_of_box_freertos.tar, FileSize=1525760

OTA_run: CdnClient_ReqOtaDir, NumDirFiles=1

OTA_run: CdnClient_GetNextDirFile

OTA_run: CdnClient_GetNextDirFile: file=/U7_MCU_FLASH/20200820183753_CC3235S_cc3235s_out_of_box_freertos.tar, size=1525760

OtaArchive_Init: OTA archive version = OTA_ARCHIVE_2.0.0.4

OtaArchive_CheckVersion: current version str = 20200820133810

OtaArchive_CheckVersion: new version str = 20200820183753

OtaArchive_CheckVersion: newer version update - 20200820183753

OtaRunStep: status from Ota_run: OTA_RUN_STATUS_CHECK_NEWER_VERSION, accept and continue

OtaRunStep: CurrentVersion=20200820133810, NewVersion=20200820183753, Start download ...

OTA_run: Call CdnClient_ReqFileUrl, filename = /U7_MCU_FLASH/20200820183753_CC3235S_cc3235s_out_of_box_freertos.tar

CdnDropbox_SendReqFileUrl: uri=/2/files/get_temporary_link

HTTP request is:
POST /2/files/get_temporary_link} HTTP/1.1
host: api.dropboxapi.com
Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Content-Type: Application/Json
Content-Length: 80

{"path": "/U7_MCU_FLASH/20200820183753_CC3235S_cc3235s_out_of_box_freertos.tar"}


HttpClient_RecvSkipHdr: http error code HTTP/1.1 400

CdnDropbox_ParseRespDir: ERROR HttpClient_RecvSkipHdr, status=-20310

CdnClient_ReqFileUrl: Error CdnVendor_ParseRespFileUrl Status=-20310

OTA_run: ERROR CdnClient_ReqFileUrl, Status=-20310


_OtaCheckConsecutiveErrors: ConsecutiveOtaErrors=5/5, MAX_CONSECUTIVE_OTA_ERRORS!!!

OtaRunStep: FATAL ERROR from Ota_run -21003 !!!!!!!!!!!!!!!!!!!!!!!!!!!

Test failed: State = 6, Event = 17

Event handler failed..!!

here is some screen shots FYI

certificates:

mcu img:

while generating .tar file

otauser.c file:
#ifndef __OTA_USER_H__
#define __OTA_USER_H__

#ifdef    __cplusplus
extern "C" {
#endif

#include <stdlib.h>
#include <ti/drivers/UART.h>
#include <ti/drivers/net/wifi/simplelink.h>
#include <ti/net/ota/ota.h>
#include <ti/display/Display.h>
#include <stdarg.h>

Display_Handle display;

#define SL_ENABLE_OTA_DEBUG_TRACES /* uncomment to enable internal OTA debug info */
#ifndef SL_ENABLE_OTA_DEBUG_TRACES
#define _SlOtaLibTrace(pargs) 
#else

#ifdef _WIN32

#define _SlOtaLibTrace(pargs)  printf pargs

#elif __MSP432P401R__

extern void LogMessage(const char *pcFormat, ...);
#define _SlOtaLibTrace(pargs)  LogMessage pargs

#else /*CC32xx*/

//extern int Report(const char *pcFormat, ...);
//#define _SlOtaLibTrace(pargs) Report pargs

extern void Display(const char *pcFmt,...);
#define _SlOtaLibTrace(pargs) Display pargs

#endif

#endif

#define OTA_SERVER_GITHUB      1
#define OTA_SERVER_DROPBOX_V2  2
#define OTA_SERVER_CUSTOM      99

/* The following configuration skips the CDN server handshake,
 * and simply downloads an OTA TAR file from provided URL
 * (of an HTTP server). 
 * Note: For ease of use, a macro definition is provided below for 
 * the file URL (see OTA_FILE_SERVER_URL) which is used by the application 
 * to initialize the OTA library. But, the actual URL is assumed to be dynamic
 * (and temporary). The value should be provided by the applications by 
 * calling OTA_set just before the OTA gets triggered (i.e. before calling OTA_run).
 */
#define OTA_FILE_DOWNLOAD      100

/* USER SHOULD DEFINE HERE WHICH CLOUD TO USE */
/* -------------------------------------------*/
//#define OTA_SERVER_TYPE    OTA_SERVER_GITHUB
#define OTA_SERVER_TYPE    OTA_SERVER_DROPBOX_V2
//#define OTA_SERVER_TYPE      OTA_FILE_DOWNLOAD

/* OTA server info */
/* --------------- */

#ifdef _WIN32
#define OTA_VENDOR_DIR  "OTA_CC3120"
#elif __MSP432P401R__
#define OTA_VENDOR_DIR  "OTA_CC3120"
#else
#define OTA_VENDOR_DIR  "U7_MCU_FLASH"  /*Your directory name in which .tar folder is ex. Dropbox>Apps>U7_MCU_FLASH*/
#endif

#if OTA_SERVER_TYPE == OTA_SERVER_GITHUB

/* Github server info */
#define OTA_SERVER_NAME                 "api.github.com"
#define OTA_SERVER_IP_ADDRESS           0x00000000
#define OTA_SERVER_SECURED              1

/* Github vendor info */
#define OTA_VENDOR_ROOT_DIR             "/repos/<user account>/<user directory>"
//#define OTA_VENDOR_TOKEN              "<User defined Github token>"
#ifndef OTA_VENDOR_TOKEN
#error "Please define your personal cloud account token in OTA_VENDOR_TOKEN above"
#endif

#define OTA_SERVER_ROOT_CA_CERT         "DigCert_High_Assurance_CA.der"
#define OTA_SERVER_AUTH_IGNORE_DATA_TIME_ERROR
#define OTA_SERVER_AUTH_DISABLE_CERT_STORE

#elif OTA_SERVER_TYPE == OTA_SERVER_DROPBOX_V2

/* Dropbox V2 server info */
#define OTA_SERVER_NAME                 "api.dropboxapi.com"
#define OTA_SERVER_IP_ADDRESS           0x00000000
#define OTA_SERVER_SECURED              1

/* Dropbox V2 vendor info */
#define OTA_VENDOR_TOKEN              "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" 
#ifndef OTA_VENDOR_TOKEN
#error "Please define your personal cloud account token in OTA_VENDOR_TOKEN above"
#endif

#define OTA_SERVER_ROOT_CA_CERT         "digcert_high_assurance_ev_root_ca.cer"
#define OTA_SERVER_AUTH_IGNORE_DATA_TIME_ERROR
#define OTA_SERVER_AUTH_DISABLE_CERT_STORE

#elif OTA_SERVER_TYPE == OTA_SERVER_CUSTOM

/* add your customer server header here */
#include ""

/* Github server info */
#define OTA_SERVER_NAME                 ""
#define OTA_SERVER_IP_ADDRESS           0x00000000
#define OTA_SERVER_SECURED              1

/* Vendor info */
#define OTA_VENDOR_TOKEN                "User defined token"

#define CdnVendor_SendReqDir           
#define CdnVendor_ParseRespDir          
#define CdnVendor_SendReqFileUrl        
#define CdnVendor_ParseRespFileUrl      

#elif OTA_SERVER_TYPE == OTA_FILE_DOWNLOAD
#define OTA_SERVER_SECURED              1
#define OTA_SERVER_ROOT_CA_CERT         "DigCert_High_Assurance_CA.der"
#endif

#ifdef  __cplusplus
}
#endif /* __cplusplus */

#endif /* __OTA_USER_H__ */

could you please help me to identify the issue.

i am troubling from last few days.

thanks in advance, 

waiting for your valuable response ...

BR,

sarju bhatnagar

  • sorry i forgot to add this image please consider this as well,

    thanks again,

    sarju bhatnagar

  • Hi Sarju,

    It seems that the connection to dropbox is ok, the tar file was found in the right folder. At the end of this "negotiation" phase, the device got a temporary url (to the file server) to load the file.

    The problem is that the download of the tar file from the temporary URL failed (file not found).

    In ota/OtaLib.c in line 378 you can find the call to "CdnClient_ConnectFileServer" which gets the "pOtaLib->FileUrlBuf".

    The size of the pOtaLib->FileUrlBuf is MAX_URL_SIZE (512 - defined in "ota.h"). Maybe this size needs to be extended.

    The "pOtaLib->FileUrlBuf" gets its value within CdnClient_ReqFileUrl(). You may want to step into this function with the debugger to check for failures.

    Br,

    Kobi 

     

  • Hi Kobi, 

    Thanks for  your reply, i did the same as you said...

    // in ota.h:

    /* !Not Configurable numbers */
    #define MAX_URL_SIZE            1024//512


    but what i got 
    
    
    as picture is showing otaLib_t size < OTA_memBlock size so i decided to increase the size of OTA_memBlock as well

    /* check in sl_OtaInit if this buffer is enough for OTA lib */ #define OTA_BLOCK_SIZE 10800//7800

    after that error is still remains...

    OtaInit: statistics = 0, 0, 0

    OtaInit: call Ota_init
    OTA_init: sizeof CdnClient=576, sizeof OtaArchive=4956

    OTA_init: sizeof OtaLib_t=8248, sizeof OTA_memBlock=10800

    OTA_init: OTA lib version = OTA_LIB_2.0.0.7

    OtaArchive_Init: OTA archive version = OTA_ARCHIVE_2.0.0.4

    OtaConfig: call OTA_set EXTLIB_OTA_SET_OPT_SERVER_INFO,ServerName=api.dropboxapi .com

    OtaConfig: call OTA_set EXTLIB_OTA_SET_OPT_VENDOR_ID, VendorDir=U7_MCU_FLASH

    OTA_run: call CdnClient_ConnectServer OTA server=api.dropboxapi.com

    CdnClient_ConnectServer: HttpClient_Connect api.dropboxapi.com

    HttpClient_Connect: IP_ADDR=162.125.81.7

    HttpClient_Connect: WARNING Socket Connect, status=-468, Ignored...

    OTA_run: CdnClient_ReqOtaDir, VendorDir=U7_MCU_FLASH

    CdnDropbox_SendReqDir: uri=/2/files/list_folder

    RespLen is 821, ProcessedSize is: 816

    the entire JSON pRespBuf is: (null)

    OtaDir FileName=/U7_MCU_FLASH/20200821105601_CC3235S_cc3235s_out_of_box_free rtos.tar, FileSize=1536000

    OTA_run: CdnClient_ReqOtaDir, NumDirFiles=1

    OTA_run: CdnClient_GetNextDirFile

    OTA_run: CdnClient_GetNextDirFile: file=/U7_MCU_FLASH/20200821105601_CC3235S_cc3 235s_out_of_box_freertos.tar, size=1536000

    OtaArchive_Init: OTA archive version = OTA_ARCHIVE_2.0.0.4

    OtaArchive_CheckVersion: current version str = 20200820133810

    OtaArchive_CheckVersion: new version str = 20200821105601

    OtaArchive_CheckVersion: newer version update - 20200821105601

    OtaRunStep: status from Ota_run: OTA_RUN_STATUS_CHECK_NEWER_VERSION, accept and continue

    OtaRunStep: CurrentVersion=20200820133810, NewVersion=20200821105601, Start down load ...

    OTA_run: Call CdnClient_ReqFileUrl, filename = /U7_MCU_FLASH/20200821105601_CC32 35S_cc3235s_out_of_box_freertos.tar

    CdnDropbox_SendReqFileUrl: uri=/2/files/get_temporary_link

    HTTP request is:
    POST /2/files/get_temporary_link} HTTP/1.1
    host: api.dropboxapi.com
    Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    Content-Type: Application/Json
    Content-Length: 80

    {"path": "/U7_MCU_FLASH/20200821105601_CC3235S_cc3235s_out_of_box_freertos.tar"}


    HttpClient_RecvSkipHdr: http error code HTTP/1.1 400

    CdnDropbox_ParseRespDir: ERROR HttpClient_RecvSkipHdr, status=-20310

    CdnClient_ReqFileUrl: Error CdnVendor_ParseRespFileUrl Status=-20310

    OTA_run: ERROR CdnClient_ReqFileUrl, Status=-20310


    _OtaCheckConsecutiveErrors: ConsecutiveOtaErrors=1/5, return only WARNNING

    OtaRunStep: WARNING Ota_run, Status=20005, continue for next OTA retry

    OTA_run: call CdnClient_ConnectServer OTA server=api.dropboxapi.com

    CdnClient_ConnectServer: HttpClient_Connect api.dropboxapi.com

    HttpClient_Connect: IP_ADDR=162.125.81.7

    HttpClient_Connect: WARNING Socket Connect, status=-468, Ignored...

    OTA_run: CdnClient_ReqOtaDir, VendorDir=U7_MCU_FLASH

    CdnDropbox_SendReqDir: uri=/2/files/list_folder

    RespLen is 821, ProcessedSize is: 816

    the entire JSON pRespBuf is: (null)

    OtaDir FileName=/U7_MCU_FLASH/20200821105601_CC3235S_cc3235s_out_of_box_free rtos.tar, FileSize=1536000

    OTA_run: CdnClient_ReqOtaDir, NumDirFiles=1

    OTA_run: CdnClient_GetNextDirFile

    OTA_run: CdnClient_GetNextDirFile: file=/U7_MCU_FLASH/20200821105601_CC3235S_cc3 235s_out_of_box_freertos.tar, size=1536000

    OtaArchive_Init: OTA archive version = OTA_ARCHIVE_2.0.0.4

    OtaArchive_CheckVersion: current version str = 20200820133810

    OtaArchive_CheckVersion: new version str = 20200821105601

    OtaArchive_CheckVersion: newer version update - 20200821105601

    OtaRunStep: status from Ota_run: OTA_RUN_STATUS_CHECK_NEWER_VERSION, accept and continue

    OtaRunStep: CurrentVersion=20200820133810, NewVersion=20200821105601, Start down load ...

    OTA_run: Call CdnClient_ReqFileUrl, filename = /U7_MCU_FLASH/20200821105601_CC32 35S_cc3235s_out_of_box_freertos.tar

    CdnDropbox_SendReqFileUrl: uri=/2/files/get_temporary_link

    HTTP request is:
    POST /2/files/get_temporary_link} HTTP/1.1
    host: api.dropboxapi.com
    Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    Content-Type: Application/Json
    Content-Length: 80

    {"path": "/U7_MCU_FLASH/20200821105601_CC3235S_cc3235s_out_of_box_freertos.tar"}


    HttpClient_RecvSkipHdr: http error code HTTP/1.1 400

    CdnDropbox_ParseRespDir: ERROR HttpClient_RecvSkipHdr, status=-20310

    CdnClient_ReqFileUrl: Error CdnVendor_ParseRespFileUrl Status=-20310

    OTA_run: ERROR CdnClient_ReqFileUrl, Status=-20310


    _OtaCheckConsecutiveErrors: ConsecutiveOtaErrors=2/5, return only WARNNING

    OtaRunStep: WARNING Ota_run, Status=20005, continue for next OTA retry

    OTA_run: call CdnClient_ConnectServer OTA server=api.dropboxapi.com

    CdnClient_ConnectServer: HttpClient_Connect api.dropboxapi.com

    HttpClient_Connect: IP_ADDR=162.125.81.7

    HttpClient_Connect: WARNING Socket Connect, status=-468, Ignored...

    OTA_run: CdnClient_ReqOtaDir, VendorDir=U7_MCU_FLASH

    CdnDropbox_SendReqDir: uri=/2/files/list_folder

    RespLen is 821, ProcessedSize is: 816

    the entire JSON pRespBuf is: (null)

    OtaDir FileName=/U7_MCU_FLASH/20200821105601_CC3235S_cc3235s_out_of_box_free rtos.tar, FileSize=1536000

    OTA_run: CdnClient_ReqOtaDir, NumDirFiles=1

    OTA_run: CdnClient_GetNextDirFile

    OTA_run: CdnClient_GetNextDirFile: file=/U7_MCU_FLASH/20200821105601_CC3235S_cc3 235s_out_of_box_freertos.tar, size=1536000

    OtaArchive_Init: OTA archive version = OTA_ARCHIVE_2.0.0.4

    OtaArchive_CheckVersion: current version str = 20200820133810

    OtaArchive_CheckVersion: new version str = 20200821105601

    OtaArchive_CheckVersion: newer version update - 20200821105601

    OtaRunStep: status from Ota_run: OTA_RUN_STATUS_CHECK_NEWER_VERSION, accept and continue

    OtaRunStep: CurrentVersion=20200820133810, NewVersion=20200821105601, Start down load ...

    OTA_run: Call CdnClient_ReqFileUrl, filename = /U7_MCU_FLASH/20200821105601_CC32 35S_cc3235s_out_of_box_freertos.tar

    CdnDropbox_SendReqFileUrl: uri=/2/files/get_temporary_link

    HTTP request is:
    POST /2/files/get_temporary_link} HTTP/1.1
    host: api.dropboxapi.com
    Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    Content-Type: Application/Json
    Content-Length: 80

    {"path": "/U7_MCU_FLASH/20200821105601_CC3235S_cc3235s_out_of_box_freertos.tar"}


    HttpClient_RecvSkipHdr: http error code HTTP/1.1 400

    CdnDropbox_ParseRespDir: ERROR HttpClient_RecvSkipHdr, status=-20310

    CdnClient_ReqFileUrl: Error CdnVendor_ParseRespFileUrl Status=-20310

    OTA_run: ERROR CdnClient_ReqFileUrl, Status=-20310


    _OtaCheckConsecutiveErrors: ConsecutiveOtaErrors=3/5, return only WARNNING

    OtaRunStep: WARNING Ota_run, Status=20005, continue for next OTA retry

    OTA_run: call CdnClient_ConnectServer OTA server=api.dropboxapi.com

    CdnClient_ConnectServer: HttpClient_Connect api.dropboxapi.com

    HttpClient_Connect: IP_ADDR=162.125.81.7

    HttpClient_Connect: WARNING Socket Connect, status=-468, Ignored...

    OTA_run: CdnClient_ReqOtaDir, VendorDir=U7_MCU_FLASH

    CdnDropbox_SendReqDir: uri=/2/files/list_folder

    RespLen is 821, ProcessedSize is: 816

    the entire JSON pRespBuf is: (null)

    OtaDir FileName=/U7_MCU_FLASH/20200821105601_CC3235S_cc3235s_out_of_box_free rtos.tar, FileSize=1536000

    OTA_run: CdnClient_ReqOtaDir, NumDirFiles=1

    OTA_run: CdnClient_GetNextDirFile

    OTA_run: CdnClient_GetNextDirFile: file=/U7_MCU_FLASH/20200821105601_CC3235S_cc3 235s_out_of_box_freertos.tar, size=1536000

    OtaArchive_Init: OTA archive version = OTA_ARCHIVE_2.0.0.4

    OtaArchive_CheckVersion: current version str = 20200820133810

    OtaArchive_CheckVersion: new version str = 20200821105601

    OtaArchive_CheckVersion: newer version update - 20200821105601

    OtaRunStep: status from Ota_run: OTA_RUN_STATUS_CHECK_NEWER_VERSION, accept and continue

    OtaRunStep: CurrentVersion=20200820133810, NewVersion=20200821105601, Start down load ...

    OTA_run: Call CdnClient_ReqFileUrl, filename = /U7_MCU_FLASH/20200821105601_CC32 35S_cc3235s_out_of_box_freertos.tar

    CdnDropbox_SendReqFileUrl: uri=/2/files/get_temporary_link

    HTTP request is:
    POST /2/files/get_temporary_link} HTTP/1.1
    host: api.dropboxapi.com
    Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    Content-Type: Application/Json
    Content-Length: 80

    {"path": "/U7_MCU_FLASH/20200821105601_CC3235S_cc3235s_out_of_box_freertos.tar"}


    HttpClient_RecvSkipHdr: http error code HTTP/1.1 400

    CdnDropbox_ParseRespDir: ERROR HttpClient_RecvSkipHdr, status=-20310

    CdnClient_ReqFileUrl: Error CdnVendor_ParseRespFileUrl Status=-20310

    OTA_run: ERROR CdnClient_ReqFileUrl, Status=-20310


    _OtaCheckConsecutiveErrors: ConsecutiveOtaErrors=4/5, return only WARNNING

    OtaRunStep: WARNING Ota_run, Status=20005, continue for next OTA retry

    OTA_run: call CdnClient_ConnectServer OTA server=api.dropboxapi.com

    CdnClient_ConnectServer: HttpClient_Connect api.dropboxapi.com

    HttpClient_Connect: IP_ADDR=162.125.81.7

    HttpClient_Connect: WARNING Socket Connect, status=-468, Ignored...

    OTA_run: CdnClient_ReqOtaDir, VendorDir=U7_MCU_FLASH

    CdnDropbox_SendReqDir: uri=/2/files/list_folder

    RespLen is 821, ProcessedSize is: 816

    the entire JSON pRespBuf is: (null)

    OtaDir FileName=/U7_MCU_FLASH/20200821105601_CC3235S_cc3235s_out_of_box_free rtos.tar, FileSize=1536000

    OTA_run: CdnClient_ReqOtaDir, NumDirFiles=1

    OTA_run: CdnClient_GetNextDirFile

    OTA_run: CdnClient_GetNextDirFile: file=/U7_MCU_FLASH/20200821105601_CC3235S_cc3 235s_out_of_box_freertos.tar, size=1536000

    OtaArchive_Init: OTA archive version = OTA_ARCHIVE_2.0.0.4

    OtaArchive_CheckVersion: current version str = 20200820133810

    OtaArchive_CheckVersion: new version str = 20200821105601

    OtaArchive_CheckVersion: newer version update - 20200821105601

    OtaRunStep: status from Ota_run: OTA_RUN_STATUS_CHECK_NEWER_VERSION, accept and continue

    OtaRunStep: CurrentVersion=20200820133810, NewVersion=20200821105601, Start down load ...

    OTA_run: Call CdnClient_ReqFileUrl, filename = /U7_MCU_FLASH/20200821105601_CC32 35S_cc3235s_out_of_box_freertos.tar

    CdnDropbox_SendReqFileUrl: uri=/2/files/get_temporary_link

    HTTP request is:
    POST /2/files/get_temporary_link} HTTP/1.1
    host: api.dropboxapi.com
    Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    Content-Type: Application/Json
    Content-Length: 80

    {"path": "/U7_MCU_FLASH/20200821105601_CC3235S_cc3235s_out_of_box_freertos.tar"}


    HttpClient_RecvSkipHdr: http error code HTTP/1.1 400

    CdnDropbox_ParseRespDir: ERROR HttpClient_RecvSkipHdr, status=-20310

    CdnClient_ReqFileUrl: Error CdnVendor_ParseRespFileUrl Status=-20310

    OTA_run: ERROR CdnClient_ReqFileUrl, Status=-20310


    _OtaCheckConsecutiveErrors: ConsecutiveOtaErrors=5/5, MAX_CONSECUTIVE_OTA_ERRORS !!!

    OtaRunStep: FATAL ERROR from Ota_run -21003 !!!!!!!!!!!!!!!!!!!!!!!!!!!

    Test failed: State = 6, Event = 17

    Event handler failed..!!

    Br, 

    sarju bhatnagar

  • another doubt is that why

    the entire JSON pRespBuf is: (null) 

    this is null?

     

    thanks, 

    sarju

  • The log is similar to the one before. I didn't understand what have you changed (can't see the images you added - please try to attach them as jpg).

    Where did you get the pRespBuf as NULL? this my be the root cause that we should look for.

    Br,

    Kobi

  • Hi Kobi,

    Thanks for your reply, here i am again adding screen shot for your information,

    this is what i did as you said.

    this is what i got 

    because picture is showing 

    otaLib_t size < OTA_memBlock size

    so i decided to change the size of OTA_memBlock as well .

    but no luck as you can see in the logs above.

    please do let me know what should i try to get rid from this issue.

    thank you so much again for your reply.

    waiting for response further...

    Br,

    sarju bhatnagar

  • what did you mean by "the entire JSON pRespBuf is: (null) "?

    where exactly did you see this?

  • check the attachment

    Br, 

    sarju

  • Hi again,

    I see something wrong in the HTTP request you are sending:

    HTTP request is:
    POST /2/files/get_temporary_link} HTTP/1.1
    host: api.dropboxapi.com
    Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    Content-Type: Application/Json
    Content-Length: 80

    The "}" shouldn't be there.

    Please check the definition of OTA_SERVER_REST_REQ_FILE_URL (in CdnDropboxV2.c) and debug the code of "HttpClient_SendReq()" (in "OtaHttpClient.c").

    I'm not familiar with such issue, so either you added this by mistake or you found a new and interesting issue.

    Br,

    Kobi

  • Hi Kobi,

    Thanks for your reply, I don't think "}" is the issue , because i run fresh cloud_ota program to check whether it is by default in code or i did something wrong.

    but it is there even in fresh program as well, this is not because of my mistake,

    but again , i find out from where it is coming.

    i just commented out and it's gone, but output is same it's not able to download the file from cloud.

    here is logs:

    OtaInit: statistics = 0, 0, 0

    OtaInit: call Ota_init
    OTA_init: sizeof CdnClient=576, sizeof OtaArchive=4956

    OTA_init: sizeof OtaLib_t=8248, sizeof OTA_memBlock=10800

    OTA_init: OTA lib version = OTA_LIB_2.0.0.7

    OtaArchive_Init: OTA archive version = OTA_ARCHIVE_2.0.0.4

    OtaConfig: call OTA_set EXTLIB_OTA_SET_OPT_SERVER_INFO,ServerName=api.dropboxapi .com

    OtaConfig: call OTA_set EXTLIB_OTA_SET_OPT_VENDOR_ID, VendorDir=U7_MCU_FLASH

    OTA_run: call CdnClient_ConnectServer OTA server=api.dropboxapi.com

    CdnClient_ConnectServer: HttpClient_Connect api.dropboxapi.com

    HttpClient_Connect: IP_ADDR=162.125.81.7

    HttpClient_Connect: WARNING Socket Connect, status=-468, Ignored...

    OTA_run: CdnClient_ReqOtaDir, VendorDir=U7_MCU_FLASH

    CdnDropbox_SendReqDir: uri=/2/files/list_folder

    RespLen is 821, ProcessedSize is: 816

    the entire JSON pRespBuf is: (null)

    OtaDir FileName=/U7_MCU_FLASH/20200824121905_CC3235S_cc3235s_out_of_box_free rtos.tar, FileSize=1536000

    OTA_run: CdnClient_ReqOtaDir, NumDirFiles=1

    OTA_run: CdnClient_GetNextDirFile

    OTA_run: CdnClient_GetNextDirFile: file=/U7_MCU_FLASH/20200824121905_CC3235S_cc3 235s_out_of_box_freertos.tar, size=1536000

    OtaArchive_Init: OTA archive version = OTA_ARCHIVE_2.0.0.4

    OtaArchive_CheckVersion: current version str = 20200820133810

    OtaArchive_CheckVersion: new version str = 20200824121905

    OtaArchive_CheckVersion: newer version update - 20200824121905

    OtaRunStep: status from Ota_run: OTA_RUN_STATUS_CHECK_NEWER_VERSION, accept and continue

    OtaRunStep: CurrentVersion=20200820133810, NewVersion=20200824121905, Start down load ...

    OTA_run: Call CdnClient_ReqFileUrl, filename = /U7_MCU_FLASH/20200824121905_CC32 35S_cc3235s_out_of_box_freertos.tar

    CdnDropbox_SendReqFileUrl: uri=/2/files/get_temporary_link

    HTTP request is:
    POST /2/files/get_temporary_link HTTP/1.1
    host: api.dropboxapi.com
    Authorization: Bearer lGU5qzA0AmoAAAAAAAAAAZG8XvDxcryxjQhVS3Zr1Cyy2x2tGy4ftXnvg0 CF77pU
    Content-Type: Application/Json
    Content-Length: 80

    {"path": "/U7_MCU_FLASH/20200824121905_CC3235S_cc3235s_out_of_box_freertos.tar


    HttpClient_RecvSkipHdr: http error code HTTP/1.1 400

    CdnDropbox_ParseRespDir: ERROR HttpClient_RecvSkipHdr, status=-20310

    CdnClient_ReqFileUrl: Error CdnVendor_ParseRespFileUrl Status=-20310

    OTA_run: ERROR CdnClient_ReqFileUrl, Status=-20310


    _OtaCheckConsecutiveErrors: ConsecutiveOtaErrors=1/5, return only WARNNING

    OtaRunStep: WARNING Ota_run, Status=20005, continue for next OTA retry

    ...

    ...

    OtaCheckConsecutiveErrors: ConsecutiveOtaErrors=5/5, MAX_CONSECUTIVE_OTA_ERRORS!!!

    OtaRunStep: FATAL ERROR from Ota_run -21003 !!!!!!!!!!!!!!!!!!!!!!!!!!!

    Test failed: State = 6, Event = 17

    Event handler failed..!!

    Br,

    sarju

  • It is still strange.

    The "}" you've removed is in the wrong place.

    It is supposed to remove just the "}" in the json content: {"path": "/OTA_CC3120"} - which is needed. In you log you can see that the this closing bracket was really removed.

    If commenting out the line you mentioned, removed the other "}" (near the URI in the POST line), you should investigate the cause (it may be due to some stack/memory corruption).

    I've ran the example from the latest SDK and it seems to work (without any issue).

    The HTTP request should be:

    POST /2/files/get_temporary_link HTTP/1.1
    host: api.dropboxapi.com
    Authorization: Bearer <OTA_VENDOR_TOKEN (your dropbox app token)>
    Content-Type: Application/Json
    Content-Length: 64

    {"path": "<OTA_VENDOR_DIR>/<tar file name>"}

     

    Here is my full log:


    HandlePingComplete: PingCounter=1
    Pinging GW...!
    Ping done. Success rate: 100%

    HandlePingComplete: PingCounter=2
    Pinging GW...!
    Ping done. Success rate: 100%

    HandlePingComplete: PingCounter=3
    Pinging GW...!
    Ping done. Success rate: 100%

    HandlePingComplete: PingCounter=4
    Pinging GW...!
    Ping done. Success rate: 66%

    HandlePingComplete: OTA Command arrived
    OtaInit: statistics = 0, 0, 0
    OtaInit: call Ota_init
    OTA_init: sizeof CdnClient=576, sizeof OtaArchive=4956
    OTA_init: sizeof OtaLib_t=7736, sizeof OTA_memBlock=7800
    OTA_init: OTA lib version = OTA_LIB_2.0.0.7
    OtaArchive_Init: OTA archive version = OTA_ARCHIVE_2.0.0.4
    OtaConfig: call OTA_set EXTLIB_OTA_SET_OPT_SERVER_INFO,ServerName=api.dropboxapi.com
    OtaConfig: call OTA_set EXTLIB_OTA_SET_OPT_VENDOR_ID, VendorDir=SEC_OTA_CC3220SF
    OTA_run: call CdnClient_ConnectServer OTA server=api.dropboxapi.com
    CdnClient_ConnectServer: HttpClient_Connect api.dropboxapi.com
    HttpClient_Connect: IP_ADDR=162.125.2.7
    HttpClient_Connect: WARNING Socket Connect, status=-468, Ignored...
    OTA_run: CdnClient_ReqOtaDir, VendorDir=SEC_OTA_CC3220SF
    CdnDropbox_SendReqDir: uri=/2/files/list_folder
    RespLen is 758, ProcessedSize is: 753
    the entire JSON pRespBuf is: OtaDir FileName=/SEC_OTA_CC3220SF/2016091417_CC3220SF_OTA-Sampl e.tar, FileSize=204800
    OTA_run: CdnClient_ReqOtaDir, NumDirFiles=1
    OTA_run: CdnClient_GetNextDirFile
    OTA_run: CdnClient_GetNextDirFile: file=/SEC_OTA_CC3220SF/2016091417_CC3220SF_OTA-Sample.tar, si ze=204800
    OtaArchive_Init: OTA archive version = OTA_ARCHIVE_2.0.0.4
    _ReadOtaVersionFile: file ota.dat, status=SL_ERROR_FS_FILE_NOT_EXISTS
    OtaArchive_CheckVersion: can't open version file, sign it as old version
    OtaArchive_CheckVersion: accept the new version = 2016091417_CC3220SF_OTA-Sample.tar
    OtaRunStep: status from Ota_run: OTA_RUN_STATUS_CHECK_NEWER_VERSION, accept and continue
    _ReadOtaVersionFile: file ota.dat, status=SL_ERROR_FS_FILE_NOT_EXISTS
    OtaRunStep: CurrentVersion=00000000000000, NewVersion=2016091417_CC3, Start download ...
    OTA_run: Call CdnClient_ReqFileUrl, filename = /SEC_OTA_CC3220SF/2016091417_CC3220SF_OTA-Sample. tar
    CdnDropbox_SendReqFileUrl: uri=/2/files/get_temporary_link
    HTTP request is:
    POST /2/files/get_temporary_link HTTP/1.1
    host: api.dropboxapi.com
    Authorization: Bearer s-K_0O9ddXsAAAAAAAAAAdTdcYTbMj2eSvUOY1zCud67_8IptJv
    Content-Type: Application/Json
    Content-Length: 64

    {"path": "/SEC_OTA_CC3220SF/2016091417_CC3220SF_OTA-Sample.tar"}

    OTA_run: Call CdnClient_ConnectFileServer, url = content.dropboxapi.com/.../AgPKSH02 EQyfUDSBUikxLo8yGs2DAMjcl4mlsZuRSX-tIvcRYK0wU0hjGsUlBArst_ds0-j_6RMw25MYlOsL7AwGPuBF-cieanMa_CuW ihGAP3zcBXRL7fEEnY3U4iInylNQynUjvex8j74S0rE5P5lWCEW2jVGNRsytnhghgKsOa846NKOmcdjrIJ3Pnfydhyz0q_Gy kAkvpMREu2-M8NSMZLiBOqI8_NWLDr-Cow0klXhsqYv-9hj43Yfa-i21NwDLgNgdAs5tsJe-127DifXYM0ToDJgeFo7oJR9w mkaYj7Vn1cOwv9OG_CWqtjQuQDP4mtpM2UlKF88TBSgIYc5kfu24nkzQFacb6Up5PRMMNIkcAMx2bCpk-L8XjdQypTs
    HttpClient_Connect: IP_ADDR=162.125.2.14
    HttpClient_Connect: WARNING Socket Connect, status=-468, Ignored...
    OTA_run: Call CdnClient_ReqFileContent, url = content.dropboxapi.com/.../AgPKSH02EQy fUDSBUikxLo8yGs2DAMjcl4mlsZuRSX-tIvcRYK0wU0hjGsUlBArst_ds0-j_6RMw25MYlOsL7AwGPuBF-cieanMa_CuWihG AP3zcBXRL7fEEnY3U4iInylNQynUjvex8j74S0rE5P5lWCEW2jVGNRsytnhghgKsOa846NKOmcdjrIJ3Pnfydhyz0q_GykAk vpMREu2-M8NSMZLiBOqI8_NWLDr-Cow0klXhsqYv-9hj43Yfa-i21NwDLgNgdAs5tsJe-127DifXYM0ToDJgeFo7oJR9wmka Yj7Vn1cOwv9OG_CWqtjQuQDP4mtpM2UlKF88TBSgIYc5kfu24nkzQFacb6Up5PRMMNIkcAMx2bCpk-L8XjdQypTs
    OtaArchive_RunParse: set state=ARCHIVE_STATE_PARSE_HDR
    OtaArchive_RunParseTar: parsing archive file header
    OtaArchive_RunParseTar: filetype=5, directory=20200821100420_CC3220SF_OTA-minimal/
    OtaArchive_RunParseTar: parsing archive file header
    OtaArchive_RunParseTar: filetype=5, directory=20200821100420_CC3220SF_OTA-minimal/0/
    OtaArchive_RunParseTar: parsing archive file header
    OtaArchive_RunParseTar: filetype=5, directory=20200821100420_CC3220SF_OTA-minimal/1/
    OtaArchive_RunParseTar: parsing archive file header
    OtaArchive_RunParseTar: filetype=5, directory=20200821100420_CC3220SF_OTA-minimal/2/
    OtaArchive_RunParseTar: parsing archive file header
    OtaArchive_RunParseTar: FileType=0, FileName=ota.cmd, FileSize=2142
    [_BundleCmdFile_Parse] bundle cmd file=/sys/mcuflashimg.bin, sig_len=256, SHA_256_Digets=f14e 052088cf28e68ee4d522e1ab2d99e7a1433b2ddcdeface59caa8031e13d8, cert=dummy-root-ca-cert, secured= 1, bundle=1
    [_BundleCmdFile_Parse] bundle cmd file=digcert_high_assurance_ca.der, sig_len=0, SHA_256_Dige ts=7431e5f4c3c1ce4690774f0b61e05440883ba9a01ed00ba6abd7806ed3b118cf, cert=, secured=0, bundle=0
    [_BundleCmdFile_Parse] bundle cmd file=dummy-root-ca-cert, sig_len=0, SHA_256_Digets=34941765 501d16a4ab776c3a74d89945f1a2575c5893069f62ffbe803f344549, cert=, secured=0, bundle=0
    [_BundleCmdFile_Parse] bundle cmd file=dummy-trusted-ca-cert, sig_len=0, SHA_256_Digets=07ad6 ba74b3921009edf184cb382c05a32baacf9c767f74427c094b2c56aa135, cert=, secured=0, bundle=0
    [_BundleCmdFile_Parse] bundle cmd file=dummy-trusted-cert, sig_len=0, SHA_256_Digets=19bef7bc a12e10815591cee2771f4208abb2a78d18f74402253c05c4ea020626, cert=, secured=0, bundle=0
    [_BundleCmdFile_Parse] bundle cmd file=/sys/servicepack.ucf, sig_len=256, SHA_256_Digets=eb08 0861df77cf064abab1de75c76970bfc2d19766f15bece400de036ba05962, cert=, secured=1, bundle=1
    OtaArchive_RunParseTar: parsing archive file header
    OtaArchive_RunParseTar: skip block align RecvBufLen=627, SkipAlignSize=419
    OtaArchive_RunParseTar: parsing archive file header
    OtaArchive_RunParseTar: FileType=0, FileName=ota.sign, FileSize=72
    OtaArchive_RunParseTar: parsing archive file header
    OtaArchive_RunParseTar: skip block align RecvBufLen=856, SkipAlignSize=440
    OtaArchive_RunParseTar: parsing archive file header
    OtaArchive_RunParseTar: FileType=0, FileName=dummy-root-ca-cert, FileSize=975
    Create/Open for write file dummy-root-ca-cert
    OtaArchive_RunParseTar: Write size 928 to file dummy-root-ca-cert total 928.
    OtaArchive_RunParseTar: Write size 47 to file dummy-root-ca-cert total 975.

    Hash verification succeeded.
    Total archive file bytes 7631.
    OtaArchive_RunParseTar: 1 files that are mentioned in the ota.cmd were saved
    OtaArchive_RunParseTar: Downloading File Completed - Size=975
    OtaArchive_RunParseTar: parsing archive file header
    OtaArchive_RunParseTar: skip block align RecvBufLen=1393, SkipAlignSize=49
    OtaArchive_RunParseTar: FileType=0, FileName=/sys/mcuflashimg.bin, FileSize=112692
    Create/Open for write file /sys/mcuflashimg.bin
    OtaArchive_RunParseTar: Write size 832 to file /sys/mcuflashimg.bin total 832.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 2272.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 3712.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 5152.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 6592.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 8032.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 9472.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 10912.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 12352.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 13792.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 15232.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 16672.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 18112.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 19552.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 20992.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 22432.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 23872.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 25312.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 26752.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 28192.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 29632.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 31072.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 32512.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 33952.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 35392.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 36832.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 38272.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 39712.
    OtaArchive_RunParseTar: Write size 572 to file /sys/mcuflashimg.bin total 40284.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 41724.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 43164.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 44604.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 46044.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 47484.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 48924.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 50364.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 51804.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 53244.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 54684.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 56124.
    OtaArchive_RunParseTar: Write size 544 to file /sys/mcuflashimg.bin total 56668.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 58108.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 59548.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 60988.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 62428.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 63868.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 65308.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 66748.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 68188.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 69628.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 71068.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 72508.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 73948.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 75388.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 76828.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 78268.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 79708.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 81148.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 82588.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 84028.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 85468.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 86908.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 88348.
    OtaArchive_RunParseTar: Write size 1088 to file /sys/mcuflashimg.bin total 89436.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 90876.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 92316.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 93756.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 95196.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 96636.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 98076.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 99516.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 100956.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 102396.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 103836.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 105276.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 106716.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 108156.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 109596.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 111036.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 112476.
    OtaArchive_RunParseTar: Write size 216 to file /sys/mcuflashimg.bin total 112692.

    Hash verification succeeded.
    Total archive file bytes 120884.
    OtaArchive_RunParseTar: 2 files that are mentioned in the ota.cmd were saved
    OtaArchive_RunParseTar: Downloading File Completed - Size=112692
    OtaArchive_RunParseTar: parsing archive file header
    OtaArchive_RunParseTar: skip block align RecvBufLen=1224, SkipAlignSize=460
    OtaArchive_RunParseTar: FileType=0, FileName=digcert_high_assurance_ca.der, FileSize=969
    Create/Open for write file digcert_high_assurance_ca.der
    OtaArchive_RunParseTar: Write size 969 to file digcert_high_assurance_ca.der total 969.

    Hash verification succeeded.
    Total archive file bytes 122825.
    OtaArchive_RunParseTar: 3 files that are mentioned in the ota.cmd were saved
    OtaArchive_RunParseTar: Downloading File Completed - Size=969
    OtaArchive_RunParseTar: parsing archive file header
    OtaArchive_RunParseTar: skip block align RecvBufLen=1440, SkipAlignSize=55
    OtaArchive_RunParseTar: FileType=0, FileName=dummy-trusted-ca-cert, FileSize=970
    Create/Open for write file dummy-trusted-ca-cert
    OtaArchive_RunParseTar: Write size 873 to file dummy-trusted-ca-cert total 873.
    OtaArchive_RunParseTar: Write size 97 to file dummy-trusted-ca-cert total 970.

    Hash verification succeeded.
    Total archive file bytes 124362.
    OtaArchive_RunParseTar: 4 files that are mentioned in the ota.cmd were saved
    OtaArchive_RunParseTar: Downloading File Completed - Size=970
    OtaArchive_RunParseTar: parsing archive file header
    OtaArchive_RunParseTar: skip block align RecvBufLen=1343, SkipAlignSize=54
    OtaArchive_RunParseTar: FileType=0, FileName=dummy-trusted-cert, FileSize=1013
    Create/Open for write file dummy-trusted-cert
    OtaArchive_RunParseTar: Write size 777 to file dummy-trusted-cert total 777.
    OtaArchive_RunParseTar: Write size 236 to file dummy-trusted-cert total 1013.

    Hash verification succeeded.
    Total archive file bytes 125941.
    OtaArchive_RunParseTar: 5 files that are mentioned in the ota.cmd were saved
    OtaArchive_RunParseTar: Downloading File Completed - Size=1013
    OtaArchive_RunParseTar: parsing archive file header
    OtaArchive_RunParseTar: skip block align RecvBufLen=1204, SkipAlignSize=11
    OtaArchive_RunParseTar: FileType=0, FileName=/sys/servicepack.ucf, FileSize=73232
    Create/Open for write file /sys/servicepack.ucf
    OtaArchive_RunParseTar: Write size 681 to file /sys/servicepack.ucf total 681.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 2121.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 3561.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 5001.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 6441.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 7881.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 9321.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 10761.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 12201.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 13641.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 15081.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 16521.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 17961.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 19401.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 20841.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 22281.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 23721.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 25161.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 26601.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 28041.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 29481.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 30921.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 32361.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 33801.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 35241.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 36681.
    OtaArchive_RunParseTar: Write size 19 to file /sys/servicepack.ucf total 36700.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 38140.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 39580.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 41020.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 42460.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 43900.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 45340.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 46780.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 48220.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 49660.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 51100.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 52540.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 53980.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 55420.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 56860.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 58300.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 59740.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 61180.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 62620.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 64060.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 65500.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 66940.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 68380.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 69820.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 71260.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 72700.
    OtaArchive_RunParseTar: Write size 532 to file /sys/servicepack.ucf total 73232.

    Hash verification succeeded.
    Total archive file bytes 199696.
    OtaArchive_RunParseTar: 6 files that are mentioned in the ota.cmd were saved
    OtaArchive_RunParseTar: Downloading File Completed - Size=73232
    OtaArchive_RunParseTar: parsing archive file header
    OtaArchive_RunParseTar: skip block align RecvBufLen=908, SkipAlignSize=496
    OtaArchive_RunParseTar: parsing archive file header
    OtaArchive_RunParseTar: End of archive...
    _SaveOtaVersionFile: save version file also in the bundle, version=2016091417_CC3
    OTA_run: ---- Download file completed /SEC_OTA_CC3220SF/2016091417_CC3220SF_OTA-Sample.tar
    OtaRunStep: status from Ota_run: Download done, status = 104


    OtaImageTestingAndReset: download done
    OtaImageTestingAndReset: call sl_Stop to move the bundle totesting state
    OtaImageTestingAndReset: reset the platform to test the newimage...


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

    SimpleLinkInitCallback: started in role 0
    Host Driver Version: 3.0.1.67
    Build Version 3.17.0.4.31.2.0.0.0.2.2.0.7

     

     

  • I am shocked, 

    I am also using latest sdk,

    and took fresh example but still i am getting that in my case


    even this time pc is also different. but still i am here.

    thanks,

    sarju

  • In another run i got this 

    Br,

    sarju

  • Hi,

    It is very strange and I can't help without being able to reproduce this.

    You will need to put a break point in "CdnDropboxV2_SendReqFileUrl" which creates the http request and check how these symbols are added.

    Br,

    Kobi

  • Hi kobi,

    I tried with different sdk , with different system and certificate like,

    1) simplelink_cc32xx_sdk_4_20_00_07 (Latest one)

    2) simplelink_cc32xx_sdk_4_10_00_07 

    but, no one worked for me, except 

    3) simplelink_cc32xx_sdk_3_30_01_02 

    this one works with every system(PC) and every time for me with the same certificates which i was using for others as well,

    this time my code is able to download the tar file from sever and updates previous code  with latest one, that's good, as i was expecting, but this time i have different issue, the current code is able to work with 8 files only

    #define MAX_BUNDLE_CMD_FILES    8

    but i have 12 files because this code is integrated with AWS code as well and that's also needs more additional certificates.

    simply i tried to increase this number, but causing other issues and not getting connect with server.

    here is my log:

    OtaInit: statistics = 0, 0, 0

    OtaInit: call Ota_init

    OTA_init: sizeof CdnClient=576, sizeof OtaArchive=4956

    OTA_init: sizeof OtaLib_t=7736, sizeof OTA_memBlock=7800

    OTA_init: OTA lib version = OTA_LIB_2.0.0.7

    OtaArchive_Init: OTA archive version = OTA_ARCHIVE_2.0.0.4

    OtaConfig: call OTA_set EXTLIB_OTA_SET_OPT_SERVER_INFO,ServerName=api.dropboxapi.com

    OtaConfig: call OTA_set EXTLIB_OTA_SET_OPT_VENDOR_ID, VendorDir=OTA_R2_MCU_FLASH

    OTA_run: call CdnClient_ConnectServer OTA server=api.dropboxapi.com

    CdnClient_ConnectServer: HttpClient_Connect api.dropboxapi.com

    HttpClient_Connect: IP_ADDR=162.125.81.7

    HttpClient_Connect: WARNING Socket Connect, status=-468, Ignored...

    OTA_run: CdnClient_ReqOtaDir, VendorDir=OTA_R2_MCU_FLASH

    CdnDropbox_SendReqDir: uri=/2/files/list_folder

    RespLen is 850, ProcessedSize is: 845

    the entire JSON pRespBuf is: (null)

    OtaDir FileName=/OTA_R2_MCU_FLASH/20200831173338_CC3235S_cc3235s_out_of_box_freertos.tar, FileSize=327680

    OTA_run: CdnClient_ReqOtaDir, NumDirFiles=1

    OTA_run: CdnClient_GetNextDirFile

    OTA_run: CdnClient_GetNextDirFile: file=/OTA_R2_MCU_FLASH/20200831173338_CC3235S_cc3235s_out_of_box_freertos.tar, size=327680

    OtaArchive_Init: OTA archive version = OTA_ARCHIVE_2.0.0.4

    OtaArchive_CheckVersion: current version str = 20200831111705, decimal = 1599918617

    OtaArchive_CheckVersion: new version str = 20200831173338, decimal = 1599980250

    OtaArchive_CheckVersion: newer version update - 20200831173338

    OtaRunStep: status from Ota_run: OTA_RUN_STATUS_CHECK_NEWER_VERSION, accept and continue

    OtaRunStep: CurrentVersion=20200831111705, NewVersion=20200831173338, Start download ...

    OTA_run: Call CdnClient_ReqFileUrl, filename = /OTA_R2_MCU_FLASH/20200831173338_CC3235S_cc3235s_out_of_box_freertos.tar

    CdnDropbox_SendReqFileUrl: uri=/2/files/get_temporary_link

    HTTP request is:
    POST /2/files/get_temporary_link HTTP/1.1
    host: api.dropboxapi.com
    Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    Content-Type: Application/Json
    Content-Length: 84

    {"path": "/OTA_R2_MCU_FLASH/20200831173338_CC3235S_cc3235s_out_of_box_freertos.tar"}


    OTA_run: Call CdnClient_ConnectFileServer, url = content.dropboxapi.com/.../AgqU4ceXX2AGEOyN-GRUlzRhLndZHl-5wDr33eUQfOb6Hg5moKumFl_RMDLTPZ_kX_ISSnnfZHHedaKBUET2BY8E8ErnKT7QZG2pf2ZOJaNOhf_RGN-zOXicQGhrkv-WZEaT7bkepiRBj5vmKhSHIV_EoI59L-AiLb8LjR2kb71Yt7uHr7oFcBMKotRz6nP2Z6jNg-FsTJ2Lmq0fWR5wzFal2JT5dYyhhjHxwozdx8tE43OzUHMTbdUTLitdFkTbFvjkAlKKjkhv7fLt9O7SaouE6-UJ6Wz3eIAxAZW-v1dbnpNXQuBGI6DwHtscasjEptj7Wm99SLvn-a5Uvquh1vaSwlhmXy8ekCaKJ9ReFoPIdtjuU7Ni098FDi12FO5QYpA8bXj3qycSwTKhPqyxLqy0mI61LKldUNSyOg

    HttpClient_Connect: IP_ADDR=162.125.81.14

    HttpClient_Connect: WARNING Socket Connect, status=-468, Ignored...

    OtaArchive_RunParse: set state=ARCHIVE_STATE_PARSE_HDR

    OtaArchive_RunParseTar: parsing archive file header

    OtaArchive_RunParseTar: filetype=5, directory=20200831173338_CC3235S_cc3235s_out_of_box_freertos/

    OtaArchive_RunParseTar: parsing archive file header

    OtaArchive_RunParseTar: filetype=5, directory=20200831173338_CC3235S_cc3235s_out_of_box_freertos/0/

    OtaArchive_RunParseTar: parsing archive file header

    OtaArchive_RunParseTar: filetype=5, directory=20200831173338_CC3235S_cc3235s_out_of_box_freertos/1/

    OtaArchive_RunParseTar: parsing archive file header

    OtaArchive_RunParseTar: filetype=5, directory=20200831173338_CC3235S_cc3235s_out_of_box_freertos/2/

    OtaArchive_RunParseTar: parsing archive file header

    OtaArchive_RunParseTar: FileType=0, FileName=ota.cmd, FileSize=3087

    [_BundleCmdFile_Parse] bundle cmd file=/sys/mcubootinfo.bin, sig_len=0, SHA_256_Digets=ca07d9c0c8cf718e227cc62a5198025728005c056ab53b5c8242af364fa437ed, cert=, secured=1, bundle=1

    [_BundleCmdFile_Parse] bundle cmd file=/sys/mcuimg.bin, sig_len=256, SHA_256_Digets=93f6d60f178487c57833d719908fa6a917b2e082fe45ea993398ee880d5057d8, cert=dummy-root-ca-cert, secured=1, bundle=1

    [_BundleCmdFile_Parse] bundle cmd file=/www/index.html, sig_len=0, SHA_256_Digets=a6848d065b0f9e5cbf58d40c386471d527ea5b38bb3aaf7f3089e5207ac457d3, cert=, secured=0, bundle=1

    [_BundleCmdFile_Parse] bundle cmd file=certificate.pem, sig_len=0, SHA_256_Digets=f19878afd9b715d17bee665a5e56538e1ca3d739370d888f74e1f4c62523704e, cert=, secured=0, bundle=1

    [_BundleCmdFile_Parse] bundle cmd file=digcert_high_assurance_ev_root_ca_cert.cer, sig_len=0, SHA_256_Digets=7431e5f4c3c1ce4690774f0b61e05440883ba9a01ed00ba6abd7806ed3b118cf, cert=, secured=0, bundle=1

    [_BundleCmdFile_Parse] bundle cmd file=dummy-root-ca-cert, sig_len=0, SHA_256_Digets=34941765501d16a4ab776c3a74d89945f1a2575c5893069f62ffbe803f344549, cert=, secured=0, bundle=0

    [_BundleCmdFile_Parse] bundle cmd file=dummy_ota_vendor_cert.der, sig_len=0, SHA_256_Digets=a160b855d7a00a6002922181377249a80ecd6a738d23e1dd8976c8bb7fad1bcb, cert=, secured=0, bundle=1

    [_BundleCmdFile_Parse] bundle cmd file=private.pem, sig_len=0, SHA_256_Digets=b9304e6c5a07421998a29b855cfc4a8dd0fb349cf101b8d42e33aa40c8d73869, cert=, secured=0, bundle=1

    [_BundleCmdFile_Parse] ERROR bundle cmd file=sf-class2-root.pem, place for only 8 JSON objects

    user can use more files by increasing MAX_BUNDLE_CMD_FILES=8

    please do let me know what is the correct way to increase file size of ota bundle in uniflash.?

    thank you so much for being connected.

    Br,

    sarju bhatnagar

  • The log shows that the problem is still with the MAX_BUNDLE_CMD_FILES.

    Have you recompiled the ota library after it was updated?

    br,

    Kobi

  • if i am increasing size 

    then i have to increase OTA_BLOCK_SIZE as well 

    then i got parsing issue with mcuimg.bin file

    Br,

    sarju

  • Have you recompiled the ota library after it was updated?

    Yes, i have done so, i have created dependency to ota library, so whenever i am compiling my cloud_ota , ota library is getting compiled first.

    not only this i have recompiled both individually as well.

    but no luck.

    br,

    sarju

  • Hi Sarju,

    This is very strange.

    Please return the MAX_URL_SIZE and OTA_BLOCK_SIZE to their original values (since this didn't do any difference).

    If you create a bundle with less than 8 files, does it works? (i.e. at least passes the current point of failure?)

    Since this is not reproducible, I will need your help debugging the issues.

    In this latest case, the failure (JSON parse error == -102)  is within OtaJson_init(). Please print the "template" and "*text" parameters (both should be strings) within OtaJson_init().

    e.g.: "_SlOtaLibTrace(("OtaJson_init: template=%s , text=%s\r\n",template, *text));"

    In the latest SDK, we still didn't find the "}". 

    Please put a break point in "CdnDropboxV2_SendReqFileUrl" which creates the http request and check how the symbol is added.

    We may have some kind of memory issue that causes the 2 different failures.

    There is one known issue that i want you to check (although typically this result with different behavior).

    n OtaLib.c, line 411, please update:

    if (0 >= pOtaLib->RecvChunkSize)

    to 

    if (0 > pOtaLib->RecvChunkSize)

    Br,

    Kobi

  • Hi Kobi,

    I didn't change MAX_URL_SIZE at all, i just changed 

    #define MAX_BUNDLE_CMD_FILES    11//8  because i am using more than 8 files. and secondly i changed  

    #define OTA_BLOCK_SIZE         11272 //7800   that i had to do because increasing only  MAX_BUNDLE_CMD_FILES    and not increasing the size of  OTA_BLOCK_SIZE , blocking the code. see this image.

    you: "If you create a bundle with less than 8 files, does it works? (i.e. at least passes the current point of failure?)"

    I can not do that because i need at least 11 files, minimum files for ota to be work is 8(including service pack,mcuimg,ota.cmd and ota.sign) and minimum files to work with AWS is 3(certificates).

    you: Please print the "template" and "*text" parameters (both should be strings) within OtaJson_init().

    here is the log file after putting 

    _SlOtaLibTrace(("OtaJson_init: template=%s , text=%s\r\n\n\n",template, *text)); inside OtaJson_init()

    have a look 

     

    OtaInit: statistics = 0, 0, 0

    OtaInit: call Ota_init

    OTA_init: sizeof CdnClient=576, sizeof OtaArchive=6744

    OTA_init: sizeof OtaLib_t=9524, sizeof OTA_memBlock=9524

    OTA_init: OTA lib version = OTA_LIB_2.0.0.7

    OtaArchive_Init: OTA archive version = OTA_ARCHIVE_2.0.0.4

    OtaConfig: call OTA_set EXTLIB_OTA_SET_OPT_SERVER_INFO,ServerName=api.dropboxapi.com

    OtaConfig: call OTA_set EXTLIB_OTA_SET_OPT_VENDOR_ID, VendorDir=OTA_R2_MCU_FLASH

    OTA_run: call CdnClient_ConnectServer OTA server=api.dropboxapi.com

    CdnClient_ConnectServer: HttpClient_Connect api.dropboxapi.com

    HttpClient_Connect: IP_ADDR=162.125.81.7

    HttpClient_Connect: WARNING Socket Connect, status=-468, Ignored...

    OTA_run: CdnClient_ReqOtaDir, VendorDir=OTA_R2_MCU_FLASH

    CdnDropbox_SendReqDir: uri=/2/files/list_folder

    RespLen is 850, ProcessedSize is: 845

    the entire JSON pRespBuf is: (null)

    OtaJson_init: template={"entries":[{"path_display": string,"size": int32}]} , text={"entries": [{".tag": "file", "name": "20200902112443_CC3235S_cc3235s_out_of_box_freertos.tar", "path_lower": "/ota_r2_mcu_flash/20200902112443_cc3235s_cc3235s_out_of_box_freertos.tar", "path_display": "/OTA_R2_MCU_FLASH/20200902112443_CC3235S_cc3235s_out_of_box_freertos.tar", "id": "id:_-wNSoxI0WAAAAAAAAAA0A", "client_modified": "2020-09-02T05:55:13Z", "server_modified": "2020-09-02T05:55:13Z", "rev": "015ae4e477f090600000001ea4704e0", "size": 327680, "is_downloadable": true, "content_hash": "0a29cbada77e8ffb82evfsdfsfsffsfshhfhj5kjkjj47a99a6b83b00f33erth4678"}], "cursor": "AAGn8ZXQMf5t7FpL_8Fh1ZNgTePuMh9nB346hghdsty55jeVh413vSkj0EQBMEsEBNnhtwMnhwNPzcdo-7IhoQ4gzK8so7sojloFx0UELcmDTxXgmwl91S1wD4f7HBurYsnPXzDmoHECv5jjA2336gfjffhNKA1vVwJeimjRrc-dpDSR60-cwMZYqz-IgZtdBNE5fDOqIieG_D0hQBCIItHbF38fCoN1Yey4cjJH9gSoq6ZB35v9HDcI37TzvzDDBA", "has_more": false}

    OtaDir FileName=/OTA_R2_MCU_FLASH/20200902112443_CC3235S_cc3235s_out_of_box_freertos.tar, FileSize=327680

    OTA_run: CdnClient_ReqOtaDir, NumDirFiles=1

    OTA_run: CdnClient_GetNextDirFile

    OTA_run: CdnClient_GetNextDirFile: file=/OTA_R2_MCU_FLASH/20200902112443_CC3235S_cc3235s_out_of_box_freertos.tar, size=327680

    OtaArchive_Init: OTA archive version = OTA_ARCHIVE_2.0.0.4

    OtaArchive_CheckVersion: current version str = 20200831111705, decimal = 1599918617

    OtaArchive_CheckVersion: new version str = 20200902112443, decimal = 1670919355

    OtaArchive_CheckVersion: newer version update - 20200902112443

    OtaRunStep: status from Ota_run: OTA_RUN_STATUS_CHECK_NEWER_VERSION, accept and continue

    OtaRunStep: CurrentVersion=20200831111705, NewVersion=20200902112443, Start download ...

    OTA_run: Call CdnClient_ReqFileUrl, filename = /OTA_R2_MCU_FLASH/20200902112443_CC3235S_cc3235s_out_of_box_freertos.tar

    CdnDropbox_SendReqFileUrl: uri=/2/files/get_temporary_link

    HTTP request is:
    POST /2/files/get_temporary_link HTTP/1.1
    host: api.dropboxapi.com
    Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    Content-Type: Application/Json
    Content-Length: 84

    {"path": "/OTA_R2_MCU_FLASH/20200902112443_CC3235S_cc3235s_out_of_box_freertos.tar"}


    OtaJson_init: template={"metadata":raw,"link": string} , text={"metadata": {"name": "20200902112443_CC3235S_cc3235s_out_of_box_freertos.tar", "path_lower": "/ota_r2_mcu_flash/20200902112443_cc3235s_cc3235s_out_of_box_freertos.tar", "path_display": "/OTA_R2_MCU_FLASH/20200902112443_CC3235S_cc3235s_out_of_box_freertos.tar", "id": "id:_-wNSoxI0WAAAAAAAAAA0A", "client_modified": "2020-09-02T05:55:13Z", "server_modified": "2020-09-02T05:55:13Z", "rev": "015ae4e477f090600000001ea4704e0", "size": 327680, "is_downloadable": true, "content_hash": "0a29cbada77e8ffb82evfsdfsfsffsfshhfhj5kjkjj47a99a6b83b00f33erth4678"}, "link": "content.dropboxapi.com/.../Agy5d7E9AZ3hly5yevlxrxIkBKEZKaXy_qnmsfEwjt7d2cxu-8iEq_SkeY7af_HzWvQcitnR2xWOw4dqIDxzJkdsfagdhhtmuuyhfdddslb7aqBTFACBAHz5lw5PyIJwrio8Z-vVqRzb67bNN3su6v2jt3148PHlVegxb7WWY2qzOYjmSyzBICj1uBno22PTYT2DjvHNs_D8srrNymqfiOaEfYxsW2eL7WFq2rgXJmXBoThCQqMFAtgIDpK1-3ej-Xu46Rit2QmM9VjYOaLxkMIUh6TZbtvDEJ_ORyLO8dpMZwOjTXsvvgM9p7oQV2je0f6zFljAGNoeeY
    Error: -200 , Couldn't parse the received Json file

    CdnDropbox_ParseRespDir: ERROR OtaJson_init, retVal=-200

    CdnClient_ReqFileUrl: Error CdnVendor_ParseRespFileUrl Status=-200

    OTA_run: ERROR CdnClient_ReqFileUrl, Status=-200


    _OtaCheckConsecutiveErrors: ConsecutiveOtaErrors=49/5, MAX_CONSECUTIVE_OTA_ERRORS!!!

    OtaRunStep: FATAL ERROR from Ota_run -21003 !!!!!!!!!!!!!!!!!!!!!!!!!!!

    you : In the latest SDK, we still didn't find the "}". 

    yes, still i didn't understand "}" problem coming particularly in latest sdk only. but in old one (simplelink_cc32xx_sdk_3_30_01_02) i never got this issue so i decided to go with this one. this time i am not facing this issue with this sdk ,so let it be for now. 

    according to me this time 

    Error: -200 , Couldn't parse the received Json file

    or 

    Error: -200 , Couldn't parse the received Json file

    is the issue.

    please do  let me know how to get rid form this issue?

    you : We may have some kind of memory issue that causes the 2 different failures

    even i also think so, but how to increase the size, my controller cc3235s has 256kb of RAM, i think that is far enough for this.

    you : 

    There is one known issue that i want you to check (although typically this result with different behavior).

    n OtaLib.c, line 411, please update:

    if (0 >= pOtaLib->RecvChunkSize)

    to 

    if (0 > pOtaLib->RecvChunkSize)

    sure i will, and i will let you know the result soon.

    thanks for your reply....

    waiting for your further response

    sarju bhatnagar

  • I tried this

    if (0 >= pOtaLib->RecvChunkSize)

    to 

    if (0 > pOtaLib->RecvChunkSize)

    nothing changed


    Br,

    sarju

  • now i am one step ahead, see the log file

    logfile.txt
    OtaInit: statistics = 0, 0, 0
    
    OtaInit: call Ota_init
    
    OTA_init: sizeof CdnClient=576, sizeof OtaArchive=4956
    
    OTA_init: sizeof OtaLib_t=7736, sizeof OTA_memBlock=10536
    
    OTA_init: OTA lib version = OTA_LIB_2.0.0.7
    
    OtaArchive_Init: OTA archive version = OTA_ARCHIVE_2.0.0.4
    
    OtaConfig: call OTA_set EXTLIB_OTA_SET_OPT_SERVER_INFO,ServerName=api.dropboxapi.com
    
    OtaConfig: call OTA_set EXTLIB_OTA_SET_OPT_VENDOR_ID, VendorDir=OTA_R2_MCU_FLASH
    
    OTA_run: call CdnClient_ConnectServer OTA server=api.dropboxapi.com
    
    CdnClient_ConnectServer: HttpClient_Connect api.dropboxapi.com
    
    HttpClient_Connect: IP_ADDR=162.125.81.7
    
    HttpClient_Connect: WARNING Socket Connect, status=-468, Ignored...
    
    OTA_run: CdnClient_ReqOtaDir, VendorDir=OTA_R2_MCU_FLASH
    
    CdnDropbox_SendReqDir: uri=/2/files/list_folder
    
    RespLen is 850, ProcessedSize is: 845
    
    the entire JSON pRespBuf is: (null)
    
    OtaJson_init: template={"entries":[{"path_display": string,"size": int32}]} , text={"entries": [{".tag": "file", "name": "20200902192610_CC3235S_cc3235s_out_of_box_freertos.tar", "path_lower": "/ota_r2_mcu_flash/20200902192610_cc3235s_cc3235s_out_of_box_freertos.tar", "path_display": "/OTA_R2_MCU_FLASH/20200902192610_CC3235S_cc3235s_out_of_box_freertos.tar", "id": "id:_-wNSoxI0WAAAAAAAAAA4g", "client_modified": "2020-09-02T13:56:48Z", "server_modified": "2020-09-02T13:56:48Z", "rev": "015ae5501c7258900000001ea4704e0", "size": 276480, "is_downloadable": true, "content_hash": "08a01187ad2922c0d6ffbb8f5f3bc84baa68f233545ce52439e1470496d7e279"}], "cursor": "AAGF03uXlyEdKOb54WdQPDbw1pTmxS1xBh58zg4PxMS8gFZIng2pFAe0kvaSQjYUpwQi5mt1qajIeVmyPIuyXCXgskCremo9TmylcWTR5vS09dsU09EmuTZ3DerNniQhWIglUrQ4eWj4FiayXJ2wiHNK3ufDHqYSGNLcAsfZrQpu6WegQtInhk_FabGD7e2Mb1mn26MhSfeMgoJClqFyy0GeI6Awb9mDOfZhTTMmauWYiQ", "has_more": false}
    
        OtaDir FileName=/OTA_R2_MCU_FLASH/20200902192610_CC3235S_cc3235s_out_of_box_freertos.tar, FileSize=276480
    
    OTA_run: CdnClient_ReqOtaDir, NumDirFiles=1
    
    OTA_run: CdnClient_GetNextDirFile
    
    OTA_run: CdnClient_GetNextDirFile: file=/OTA_R2_MCU_FLASH/20200902192610_CC3235S_cc3235s_out_of_box_freertos.tar, size=276480
    
    OtaArchive_Init: OTA archive version = OTA_ARCHIVE_2.0.0.4
    
        OtaArchive_CheckVersion: current version str = 20200831111705, decimal = 1599918617
    
        OtaArchive_CheckVersion: new     version str = 20200902192610, decimal = 1670999522
    
        OtaArchive_CheckVersion: newer version update - 20200902192610
    
    OtaRunStep: status from Ota_run: OTA_RUN_STATUS_CHECK_NEWER_VERSION, accept and continue
    
    OtaRunStep: CurrentVersion=20200831111705, NewVersion=20200902192610, Start download ...
    
    OTA_run: Call CdnClient_ReqFileUrl, filename = /OTA_R2_MCU_FLASH/20200902192610_CC3235S_cc3235s_out_of_box_freertos.tar
    
    CdnDropbox_SendReqFileUrl: uri=/2/files/get_temporary_link
    
    HTTP request is:
    POST /2/files/get_temporary_link HTTP/1.1
    host: api.dropboxapi.com
    Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    Content-Type: Application/Json
    Content-Length:  84
    
    {"path": "/OTA_R2_MCU_FLASH/20200902192610_CC3235S_cc3235s_out_of_box_freertos.tar"}
    
    
    
    
    OtaJson_init: template={"metadata":raw,"link": string} , text={"metadata": {"name": "20200902192610_CC3235S_cc3235s_out_of_box_freertos.tar", "path_lower": "/ota_r2_mcu_flash/20200902192610_cc3235s_cc3235s_out_of_box_freertos.tar", "path_display": "/OTA_R2_MCU_FLASH/20200902192610_CC3235S_cc3235s_out_of_box_freertos.tar", "id": "id:_-wNSoxI0WAAAAAAAAAA4g", "client_modified": "2020-09-02T13:56:48Z", "server_modified": "2020-09-02T13:56:48Z", "rev": "015ae5501c7258900000001ea4704e0", "size": 276480, "is_downloadable": true, "content_hash": "08a01187ad2922c0d6ffbb8f5f3bc84baa68f233545ce52439e1470496d7e279"}, "link": "https://content.dropboxapi.com/apitl/1/AgwdgMtfNN32Mf_U4AsvINt2zgblufy_vAeRTky4lQHf46NUF2vMJqX5qhqw7gwAsn4a6t9gm0uTg-BrMan6mId0Lj0UHd_ySZOZ0ToJomfji_3FZHqkx1dx_iKbAMQ9hcev7vaytdZbSiIhMCNiBCkU2n1MV4GrPpeEZmKOdz4kSLnZVpftArj4c7Hv2NSqYk7nVvwUVqyFM-q-SAEnUY0mLrblXQV2gXirA6Mxw3O9A_imGXezMqBrQ3On6cashXNHo_lrAiSuO48_QVJDztXDkWm_rNcO89mPn0rY7uX9vSs3wHrC06kOYtyOnL-VnKGuJD9Qk_JTkajA61ACc_kih8UKTsWwcTR_Ekf4
    OTA_run: Call CdnClient_ConnectFileServer, url = https://content.dropboxapi.com/apitl/1/AgwdgMtfNN32Mf_U4AsvINt2zgblufX5qhqw7gwAsn4a6t9gm0uTg-BrMan6mId0Lj0UHd_ySZOZ0ToJomfji_3FZHqkx1dx_iKbAMQ9hcev7vaytdZbSiIhMCNiBCkU2n1MV4GrPpeEZmKOdz4kSLnZVpftArj4c7Hv2NSqYk7nVvwUVqyFM-q-SAEnUY0mLrblXQV2gXirA6Mxw3O9A_imGXezMqBrQ3On6cashXNHo_lrAiSuO48_QVJDztXDkWm_rNcO89mPn0rY7uX9vSs3wHrC06kOYtyOnL-VnKGuJD9Qk_JTkajA61ACc_kih8UKTsWwcTR_Ekf41q0VjqmglpLEx5Y3NNbvChtnS6yrw-YCkNas9vFFM8sp5n0WnYVz36BPKngAcxPHSpp8Iw
    
    HttpClient_Connect: IP_ADDR=162.125.81.14
    
    HttpClient_Connect: WARNING Socket Connect, status=-468, Ignored...
    
    OTA_run: Call CdnClient_ReqFileContent, url = https://content.dropboxapi.com/apitl/1/AgwdgMtfNN32Mf_U4AsvINt2zgblufy_vAeRTky4lQHfgwAsn4a6t9gm0uTg-BrMan6mId0Lj0UHd_ySZOZ0ToJomfji_3FZHqkx1dx_iKbAMQ9hcev7vaytdZbSiIhMCNiBCkU2n1MV4GrPpeEZmKOdz4kSLnZVpftArj4c7Hv2NSqYk7nVvwUVqyFM-q-SAEnUY0mLrblXQV2gXirA6Mxw3O9A_imGXezMqBrQ3On6cashXNHo_lrAiSuO48_QVJDztXDkWm_rNcO89mPn0rY7uX9vSs3wHrC06kOYtyOnL-VnKGuJD9Qk_JTkajA61ACc_kih8UKTsWwcTR_Ekf41q0VjqmglpLEx5Y3NNbvChtnS6yrw-YCkNas9vFFM8sp5n0WnYVz36BPKngAcxPHSpp8Iw
    
    OtaArchive_RunParse: set state=ARCHIVE_STATE_PARSE_HDR
    
    OtaArchive_RunParseTar: parsing archive file header
    
    OtaArchive_RunParseTar: filetype=5, directory=20200902192610_CC3235S_cc3235s_out_of_box_freertos/
    
    OtaArchive_RunParseTar: parsing archive file header
    
    OtaArchive_RunParseTar: filetype=5, directory=20200902192610_CC3235S_cc3235s_out_of_box_freertos/0/
    
    OtaArchive_RunParseTar: parsing archive file header
    
    OtaArchive_RunParseTar: filetype=5, directory=20200902192610_CC3235S_cc3235s_out_of_box_freertos/1/
    
    OtaArchive_RunParseTar: parsing archive file header
    
    OtaArchive_RunParseTar: filetype=5, directory=20200902192610_CC3235S_cc3235s_out_of_box_freertos/2/
    
    OtaArchive_RunParseTar: parsing archive file header
    
    OtaArchive_RunParseTar: FileType=0, FileName=ota.cmd, FileSize=2611
    
    OtaJson_init: template={"bundle": int32,"certificate": string,"filename": string,"secured": int32,"signature_base64": string,"digest": string} , text={
            "digest":"ca07d9c0c8cf718e227cc62a5198025728005c056ab53b5c8242af364fa437ed",
            "certificate":"",
            "signature_base64":"",
            "secured":1,
            "bundle":1,
            "filename":"/sys/mcubootinfo.bin"
        },
        {
            "digest":"934d383149aa0d21840d19e22c93324cabbbe824e90a59f068d80a2cf5c2a208",
            "certificate":"dummy-root-ca-cert",
            "signature_base64":"tgdPOzJBZ+eefSMl4K2Sc5HgmKtgKrcAJkQsRsuu4/Z+K7ZQspTUefJ7Ro3ilCVW9St1ocS1wQ1gKVb4M4HFoKOoZc1EsiQi9aQIqNz+eb1jtPtpbXRhVBuTENp6XYU5JrdWD5U2Spr8hd5juyLCLxatAFdXHsz1vn33sNS4bMmqy3x0uh8w/hssrNhzq2yu5LyQ3azXp2btoVSWYQkoFBFxOwVg5BO4HaPdIlctmkCObDsC6WF/U6dB+zn4N0RkzbbNr2TGnlujbtLqxC5VU8r8W09ODsC03pvVR36Csj6hDOYwNADh2wdO1hu1zBvrB/HT6/Yg==",
            "secured":1,
            "bundle":1,
            "filename":"/sys/mcuimg.bin"
        },
        {
            "digest":"f19878afd9b715d17b
    [_BundleCmdFile_Parse]    bundle cmd file=/sys/mcubootinfo.bin, sig_len=0, SHA_256_Digets=ca07d9c0c8cf718e227cc62a5198025728005c056ab53b5c8242af364fa437ed,  cert=, secured=1, bundle=1
    
    OtaJson_init: template={"bundle": int32,"certificate": string,"filename": string,"secured": int32,"signature_base64": string,"digest": string} , text={
            "digest":"934d383149aa0d21840d19e22c93324cabbbe824e90a59f068d80a2cf5c2a208",
            "certificate":"dummy-root-ca-cert",
            "signature_base64":"tgdPOzJBZ+eefSMl4K2Sc5HgmKtgKrcAJkQsRsuu4/Z+K7dHNNg2vSqJ7Ro3ilCVW9St1ocS1wQ1gKVb4M4HFoKOoZc1EsiQi9aQIqNz+eb1jtPtpbXRhVBuTENp6XYU5JrdWD5U2Spr8hd5juyLCLxatAFdXHsz1vn33sNS4bMmqy3x0uh8w/hssrNhzq2yu5LyQ3azXp2btoVSWYQkoFBFxOwVg5BO4HaPdIlctmkCObDsC6WF/U6dB+zn4N0RkzbbNr2TGnlujbtLqxC5VU8r8W09ODsC03pvVR36Csj6hDOYwNADh2wdO1hu1zBvrB/HT6/Yg==",
            "secured":1,
            "bundle":1,
            "filename":"/sys/mcuimg.bin"
        },
        {
            "digest":"f19878afd9b715d17bee665a5e56538e1ca3d739370d888f74e1f4c62523704e",
            "certificate":"",
            "signature_base64":"",
            "secured":0,
            "bundle":1,
            "filename":"certificate.pem"
        },
        {
            "digest":"7431e5f4c3c1ce4690774f0
    [_BundleCmdFile_Parse]    bundle cmd file=/sys/mcuimg.bin, sig_len=256, SHA_256_Digets=934d383149aa0d21840d19e22c324cabbbe824e90a59f068d80a2cf5c2a208,  cert=dummy-root-ca-cert, secured=1, bundle=1
    
    OtaJson_init: template={"bundle": int32,"certificate": string,"filename": string,"secured": int32,"signature_base64": string,"digest": string} , text={
            "digest":"f19878afd9b715d17bee665a5e56538e1ca3d739370d888f74e1c62523704e",
            "certificate":"",
            "signature_base64":"",
            "secured":0,
            "bundle":1,
            "filename":"certificate.pem"
        },
        {
            "digest":"7431e5f4c3c1ce4690774f0b61e05440883ba9a01edba6abd7806ed3b118cf",
            "certificate":"",
            "signature_base64":"",
            "secured":0,
            "bundle":1,
            "filename":"digcert_high_assurance_ev_root_ca_cert.cer"
        },
        {
            "digest":"34941765501d16a4ab776c3a74d89945f1a2575c58069f62ffbe803f344549",
            "certificate"
    
    [_BundleCmdFile_Parse]    bundle cmd file=certificate.pem, sig_len=0, SHA_256_Digets=f19878afd9b715d17be65a5e56538e1ca3d739370d888f74e1f4c62523704e,  cert=, secured=0, bundle=1
    
    OtaJson_init: template={"bundle": int32,"certificate": string,"filename": string,"secured": int32,"signature_base64": string,"digest": string} , text={
            "digest":"7431e5f4c3c1ce4690774f0b61e05440883ba9a01ed0a6abd7806ed3b118cf",
            "certificate":"",
            "signature_base64":"",
            "secured":0,
            "bundle":1,
            "filename":"digcert_high_assurance_ev_root_ca_cert.cer"
        },
        {
            "digest":"34941765501d16a4ab776c3a74d845f1a2575c5893069f62ffbe803f344549",
            "certificate"
    
    [_BundleCmdFile_Parse]    bundle cmd file=digcert_high_assurance_ev_root_ca_cert.cer, sig_len=0, SHA_256_Digets=7431e5f4c3c1c690774f0b61e05440883ba9a01ed00ba6abd7806ed3b118cf,  cert=, secured=0, bundle=1
    
    OtaJson_init: template={"bundle": int32,"certificate": string,"filename": string,"secured": int32,"signature_base64": string,"digest": string} , text={
            "digest":"34941765501d16a4ab776c3a74d89945f1a2575c93069f62ffbe803f344549",
            "certificate":"",
            "signature_base64":"",
            "secured":0,
            "bundle":0,
            "filename":"dummy-root-ca-cert"
        },
        {
            "digest":"b9304e6c5a07421998a29b855cfc4a8dd0fb349cf101b8d42e3340c8d73869",
            "certificate":"",
            "signature_base64":"",
            "secured":0,
            "bundle":1,
            "filename":"private.pem"
        },
        {
            "digest":"1ad8373ec50073168cb6862a0e119adf2c1065c896adf9695779739b4bb2e",
            "certificate":"",
            "signature_base64":"",
            "secured":0,
            "bundle":1,
            "filename":"sf-class2-root.pem"
        },
        {
            "digest":"dcd7e97f8c099fa5650359186dca4a547f2fc1d9d0574e4054900a64ce3160",
            "certificate":"",
            "signature_base64":"ifNqLM0xuzwjuUEkkgMOaaU49ypHn
    [_BundleCmdFile_Parse]    bundle cmd file=dummy-root-ca-cert, sig_len=0, SHA_256_Digets=349417655d16a4ab776c3a74d89945f1a2575c5893069f62ffbe803f344549,  cert=, secured=0, bundle=0
    
    OtaJson_init: template={"bundle": int32,"certificate": string,"filename": string,"secured": int32,"signature_base64": string,"digest": string} , text={
            "digest":"b9304e6c5a07421998a29b855cfc4dd0fb349cf101b8d42e33aa40c8d73869",
            "certificate":"",
            "signature_base64":"",
            "secured":0,
            "bundle":1,
            "filename":"private.pem"
        },
        {
            "digest":"1ad8373ec50073168cb6862a0e119adf2c106596adf7eb9695779739b4bb2e",
            "certificate":"",
            "signature_base64":"",
            "secured":0,
            "bundle":1,
            "filename":"sf-class2-root.pem"
        },
        {
            "digest":"dcd7e97f8c099fa5650359186dca4a547fc1d9d057ed4e4054900a64ce3160",
            "certificate":"",
            "signature_base64":"ifNqLM0xuzwjuUEkkgMOaaU49ypHnupAtWeLWZnMaJDBfVN9tgirn1cCtq6EukkuNq9x7Iidm1Ii1x84IzTOHj23aAXvGiYNT7qWBb8d2GcSJCeTwOKx9+p4EAVrjed+Og5kqy/S5p/qYcBOpmQUR4bQRNmTfNnbQaRWy3LPBkGXMA6dQUsrApAXdJ1TI1V2ijjiCKCumsmBe1s9JPkJfIyZNyefCBLwxq3luaAnpayZQ++dz+40j2eCrQMPDGBzQexG
    [_BundleCmdFile_Parse]    bundle cmd file=private.pem, sig_len=0, SHA_256_Digets=b9304e6c5a07421998a29b855cfc4a8dd0fb349cf101b8d42e33aa40c8d73869,  cert=, secured=0, bundle=1
    
    OtaJson_init: template={"bundle": int32,"certificate": string,"filename": string,"secured": int32,"signature_base64": string,"digest": string} , text={
            "digest":"1ad8373ec50073168cb6862a0e119adf2c1065c896a7eb9695779739b4bb2e",
            "certificate":"",
            "signature_base64":"",
            "secured":0,
            "bundle":1,
            "filename":"sf-class2-root.pem"
        },
        {
            "digest":"dcd7e97f8c099fa5650359186dca4a547f2fc1d957ed4e4054900a64ce3160",
            "certificate":"",
            "signature_base64":"ifNqLM0xuzwjuUEkkgMOaaU49ypHnupAtWeLWZnMaJDVN9tgirn1cCNEn/Ntq6EukkuNq9x7Iidm1Ii1x84IzTOHj23aAXvGiYNT7qWBb8d2GcSJCeTwOKx9+p4EAVrjed+Og5kqy/S5p/qYcBOpmQUR4bQRNmTfNnbQaRWy3LPBkGXMA6dQUsrApAXdJ1TI1V2ijjiCKCumsmBe1s9JPkJfIyZNyefCBLwxq3luaAnpayZQ++dz+40j2eCrQMPDGBzQexGMD5IOG43nsyhrbOAZbhvyrrULC5amjgg4zmEA/2WbiXt9iwa1OVvN7/ZlDZB2EBApN2NESJA17Rrw==",
            "secured":1,
            "bundle":1,
            "filename":"/sys/servicepack.ucf"
        }
    ]
    
    [_BundleCmdFile_Parse]    bundle cmd file=sf-class2-root.pem, sig_len=0, SHA_256_Digets=1ad8373ec50073168cb6862e119adf2c1065c896adf7eb9695779739b4bb2e,  cert=, secured=0, bundle=1
    
    OtaJson_init: template={"bundle": int32,"certificate": string,"filename": string,"secured": int32,"signature_base64": string,"digest": string} , text={
            "digest":"dcd7e97f8c099fa5650359186dca4a547f2fd9d057ed4e4054900a64ce3160",
            "certificate":"",
            "signature_base64":"ifNqLM0xuzwjuUEkkgMOaaU49ypHpAtWeLWZnMaJDBfVN9tgirn1cCNEn/Ntq6EukkuNq9x7Iidm1Ii1x84IzTOHj23aAXvGiYNT7qWBb8d2GcSJCeTwOKx9+p4EAVrjed+Og5kqy/S5p/qYcBOpmQUR4bQRNmTfNnbQaRWy3LPBkGXMA6dQUsrApAXdJ1TI1V2ijjiCKCumsmBe1s9JPkJfIyZNyefCBLwxq3luaAnpayZQ++dz+40j2eCrQMPDGBzQexGMD5IOG43nsyhrbOAZbhvyrrULC5amjgg4zmEA/2WbiXt9iwa1OVvN7/ZlDZB2EBApN2NESJA17Rrw==",
            "secured":1,
            "bundle":1,
            "filename":"/sys/servicepack.ucf"
        }
    ]
    
    [_BundleCmdFile_Parse]    bundle cmd file=/sys/servicepack.ucf, sig_len=256, SHA_256_Digets=dcd7e97f8c9fa5650359186dca4a547f2fc1d9d057ed4e4054900a64ce3160,  cert=, secured=1, bundle=1
    
    OtaArchive_RunParseTar: parsing archive file header
    
    OtaArchive_RunParseTar: skip block align  RecvBufLen=1440, SkipAlignSize=462
    
    OtaArchive_RunParseTar: FileType=0, FileName=ota.sign, FileSize=71
    
    [_BundleCmdSignatureFile_Parse] signature verification failed!
    
    OtaArchive_RunParseTar: ERROR in _BundleCmdSignatureFile_Parse, Status=-12291
    
    OTA_run: ERROR OtaArchive_RunParse, Status=-12291
    
    
    _OtaCheckConsecutiveErrors: ConsecutiveOtaErrors=1/5, return only WARNNING
    
    OtaRunStep: WARNING Ota_run, Status=20009, continue fornext OTA retry
    

    this time issue is 

    [_BundleCmdSignatureFile_Parse] signature verification failed!



    now at this stage how to get rid from this issue.?

    Br,

    sarju

     

  • The link size is very long.

    In "Ota_archive.c", try to increase the value of BUNDLE_CMD_MAX_OBJECT_SIZE.

    Make it 1536, recompile both the lib and the app and try again.

    br,

    Kobi

  • Thanks for reply,

    but it's not working , i changed BUNDLE_CMD_MAX_OBJECT_SIZE in Ota_archive.

    #define BUNDLE_CMD_MAX_OBJECT_SIZE                        1536//(1000)

    or even 

    #define BUNDLE_CMD_MAX_OBJECT_SIZE                        2536//(1000)

    but result is same, no luck.

    here is log file, have a look

    8662.logfile.txt
    OtaInit: statistics = 0, 4, 1
    
    OtaInit: call Ota_init
    
    OTA_init: sizeof CdnClient=576, sizeof OtaArchive=4956
    
    OTA_init: sizeof OtaLib_t=7736, sizeof OTA_memBlock=10536
    
    OTA_init: OTA lib version = OTA_LIB_2.0.0.7
    
    OtaArchive_Init: OTA archive version = OTA_ARCHIVE_2.0.0.4
    
    OtaConfig: call OTA_set EXTLIB_OTA_SET_OPT_SERVER_INFO,ServerName=api.dropboxapi.com
    
    OtaConfig: call OTA_set EXTLIB_OTA_SET_OPT_VENDOR_ID, VendorDir=OTA_R2_MCU_FLASH
    
    OTA_run: call CdnClient_ConnectServer OTA server=api.dropboxapi.com
    
    CdnClient_ConnectServer: HttpClient_Connect api.dropboxapi.com
    
    HttpClient_Connect: IP_ADDR=162.125.81.7
    
    HttpClient_Connect: WARNING Socket Connect, status=-468, Ignored...
    
    OTA_run: CdnClient_ReqOtaDir, VendorDir=OTA_R2_MCU_FLASH
    
    CdnDropbox_SendReqDir: uri=/2/files/list_folder
    
    RespLen is 850, ProcessedSize is: 845
    
    the entire JSON pRespBuf is: (null)
    
    OtaJson_init: template={"entries":[{"path_display": string,"size": int32}]} , text={"entries": [{".tag": "file", "name": "20200903102953_CC3235S_cc3235s_out_of_box_freertos.tar", "path_lower": "/ota_r2_mcu_flash/20200903102953_cc3235s_cc3235s_out_of_box_freertos.tar", "path_display": "/OTA_R2_MCU_FLASH/20200903102953_CC3235S_cc3235s_out_of_box_freertos.tar", "id": "id:_-wNSoxI0WAAAAAAAAAA5A", "client_modified": "2020-09-03T05:00:27Z", "server_modified": "2020-09-03T05:00:27Z", "rev": "015ae61a175f91c00000001ea4704e0", "size": 286720, "is_downloadable": true, "content_hash": "3dfa8bcc96d82be4d93c8a72bc2a2db72bc8b2d3a7d582876afc8a9fd291116b"}], "cursor": "AAEF9Q93MTfhFz4rOH7n8wrlfjmN6uPooaSqSMpgU4WlCM4A7wYhtdHMXW67jIqOO9Xe1LgZecE3w8CjUJdZoDDhXSzAKTcqyE0AUHreZMXNGcJU1TOkGJJ7nAfjFj-wdVQe7VH-JEpgmxatg0DERQ5FNo2N2h0KmKNoyDL9RPlh1K-UeHW4D-yujl1R9VAuMHV2H92ilPcYfMkOg54ZpudrJFdr9-DBFeKakLSXs0Wq6g", "has_more": false}
    
        OtaDir FileName=/OTA_R2_MCU_FLASH/20200903102953_CC3235S_cc3235s_out_of_box_freertos.tar, FileSize=286720
    
    OTA_run: CdnClient_ReqOtaDir, NumDirFiles=1
    
    OTA_run: CdnClient_GetNextDirFile
    
    OTA_run: CdnClient_GetNextDirFile: file=/OTA_R2_MCU_FLASH/20200903102953_CC3235S_cc3235s_out_of_box_freertos.tar, size=286720
    
    OtaArchive_Init: OTA archive version = OTA_ARCHIVE_2.0.0.4
    
        OtaArchive_CheckVersion: current version str = 20200831111705, decimal = 1599918617
    
        OtaArchive_CheckVersion: new     version str = 20200903102953, decimal = 1671909865
    
        OtaArchive_CheckVersion: newer version update - 20200903102953
    
    OtaRunStep: status from Ota_run: OTA_RUN_STATUS_CHECK_NEWER_VERSION, accept and continue
    
    OtaRunStep: CurrentVersion=20200831111705, NewVersion=20200903102953, Start download ...
    
    OTA_run: Call CdnClient_ReqFileUrl, filename = /OTA_R2_MCU_FLASH/20200903102953_CC3235S_cc3235s_out_of_box_freertos.tar
    
    CdnDropbox_SendReqFileUrl: uri=/2/files/get_temporary_link
    
    HTTP request is:
    POST /2/files/get_temporary_link HTTP/1.1
    host: api.dropboxapi.com
    Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    Content-Type: Application/Json
    Content-Length:  84
    
    {"path": "/OTA_R2_MCU_FLASH/20200903102953_CC3235S_cc3235s_out_of_box_freertos.tar"}
    
    
    
    
    OtaJson_init: template={"metadata":raw,"link": string} , text={"metadata": {"name": "20200903102953_CC3235S_cc3235s_out_of_box_freertos.tar", "path_lower": "/ota_r2_mcu_flash/20200903102953_cc3235s_cc3235s_out_of_box_freertos.tar", "path_display": "/OTA_R2_MCU_FLASH/20200903102953_CC3235S_cc3235s_out_of_box_freertos.tar", "id": "id:_-wNSoxI0WAAAAAAAAAA5A", "client_modified": "2020-09-03T05:00:27Z", "server_modified": "2020-09-03T05:00:27Z", "rev": "015ae61a175f91c00000001ea4704e0", "size": 286720, "is_downloadable": true, "content_hash": "3dfa8bcc96d82be4d93c8a72bc2a2db72bc8b2d3a7d582876afc8a9fd291116b"}, "link": "https://content.dropboxapi.com/apitl/1/Agw-bg6-TpiEGfO4t6FKXsTZeX9im-75GGTkaw5r9O988jeR7WP9aTfrXqgQPco3H9AfOvkSZgCRWIfEmocjU_zOcMJ84vmR_iT0THDnhyqSZuZh0GEhjxZlRtQO6i15GaoFUbQqHVWfkKpB_IJXhRpENBi7oyhQPTJzhqwyxKeFlXGvu3g1oh90-_5YhRUVTugX4MELuQ9RhJx23rKxRFhUaw2XdUWbc-8g43xnGlpXwU6dXkpQPEQW6JMDyTF_CLd95RMJR8TP7tJhVXtTRWOCsKGToG3Cz9CG84-J-a-hMe7jqglev_rAAaJk5v0frdv4Q_0yMJAYfBWRHzn_EObG_Kg4RvoP1tg9at8t
    OTA_run: Call CdnClient_ConnectFileServer, url = https://content.dropboxapi.com/apitl/1/Agw-bg6-TpiEGfO4t6FKXsTZeX9im-75GGTkaw5r9O988jeR7WP9aTfrXqgQPco3H9AfOvkSZgCRWIfEmocjU_zOcMJ84vmR_iT0THDnhyqSZuZh0GEhjxZlRtQO6i15GaoFUbQqHVWfkKpB_IJXhRpENBi7oyhQPTJzhqwyxKeFlXGvu3g1oh90-_5YhRUVTugX4MELuQ9RhJx23rKxRFhUaw2XdUWbc-8g43xnGlpXwU6dXkpQPEQW6JMDyTF_CLd95RMJR8TP7tJhVXtTRWOCsKGToG3Cz9CG84-J-a-hMe7jqglev_rAAaJk5v0frdv4Q_0yMJAYfBWRHzn_EObG_Kg4RvoP1tg9at8t2wBYjQnW8Doxc8NxyYXz7NWE1xPO-UkWAhDEaT-4f8dfMgVEYJcYi1K6KG8EXUe5cp9JVA
    
    HttpClient_Connect: IP_ADDR=162.125.81.14
    
    HttpClient_Connect: WARNING Socket Connect, status=-468, Ignored...
    
    OTA_run: Call CdnClient_ReqFileContent, url = https://content.dropboxapi.com/apitl/1/Agw-bg6-TpiEGfO4t6FKXsTZeX9im-75GGTkaw5r9O988jeR7WP9aTfrXqgQPco3H9AfOvkSZgCRWIfEmocjU_zOcMJ84vmR_iT0THDnhyqSZuZh0GEhjxZlRtQO6i15GaoFUbQqHVWfkKpB_IJXhRpENBi7oyhQPTJzhqwyxKeFlXGvu3g1oh90-_5YhRUVTugX4MELuQ9RhJx23rKxRFhUaw2XdUWbc-8g43xnGlpXwU6dXkpQPEQW6JMDyTF_CLd95RMJR8TP7tJhVXtTRWOCsKGToG3Cz9CG84-J-a-hMe7jqglev_rAAaJk5v0frdv4Q_0yMJAYfBWRHzn_EObG_Kg4RvoP1tg9at8t2wBYjQnW8Doxc8NxyYXz7NWE1xPO-UkWAhDEaT-4f8dfMgVEYJcYi1K6KG8EXUe5cp9JVA
    
    OtaArchive_RunParse: set state=ARCHIVE_STATE_PARSE_HDR
    
    OtaArchive_RunParseTar: parsing archive file header
    
    OtaArchive_RunParseTar: filetype=5, directory=20200903102953_CC3235S_cc3235s_out_of_box_freertos/
    
    OtaArchive_RunParseTar: parsing archive file header
    
    OtaArchive_RunParseTar: filetype=5, directory=20200903102953_CC3235S_cc3235s_out_of_box_freertos/0/
    
    OtaArchive_RunParseTar: parsing archive file header
    
    OtaArchive_RunParseTar: filetype=5, directory=20200903102953_CC3235S_cc3235s_out_of_box_freertos/1/
    
    OtaArchive_RunParseTar: parsing archive file header
    
    OtaArchive_RunParseTar: filetype=5, directory=20200903102953_CC3235S_cc3235s_out_of_box_freertos/2/
    
    OtaArchive_RunParseTar: parsing archive file header
    
    OtaArchive_RunParseTar: FileType=0, FileName=ota.cmd, FileSize=2611
    
    OtaJson_init: template={"bundle": int32,"certificate": string,"filename": string,"secured": int32,"signature_base64": string,"digest": string} , text={
            "digest":"ca07d9c0c8cf718e227cc62a5198025728005c056ab53b5c8242af364fa437ed",
            "certificate":"",
            "signature_base64":"",
            "secured":1,
            "bundle":1,
            "filename":"/sys/mcubootinfo.bin"
        },
        {
            "digest":"b72632e0b8f7989d1373566c5441227068f9c60fdf81a7831fd1fd9d70536413",
            "certificate":"dummy-root-ca-cert",
            "signature_base64":"B7hHaGXsHOW9H4ROBED5gMBlv0hfTXmMNN1+70yXpeC2NORpm6/AElUYsY88I7Fb7MBWdpYYhO1XHanZ8j9m1vfRyyIA+9LObipz4IrxpRSpcm5XH9OVCU+8uIqs5xjzuH0LmYFaDfdGrCIDA3FspiYq+qc15JQTopTurEnKFZy0vkYPIh2rv04QCNg4ZfBG8D/vNWp6lZWUPTzwfXxPU2y16w829TMqsYPdQOW/eLNDwJV6B9nXo1kxI218NqthSKL46LGlyZ/ZPBYkLVxNBu1bSb/txOON78A6FeSJGjsn+K2NpOYNmqUEjM8E73hqrO15QUd9D67vaCiEm6Yg4g==",
            "secured":1,
            "bundle":1,
            "filename":"/sys/mcuimg.bin"
        },
        {
            "digest":"f19878afd9b715d17b
    [_BundleCmdFile_Parse]    bundle cmd file=/sys/mcubootinfo.bin, sig_len=0, SHA_256_Digets=ca07d9c0c8cf718e227cc62a5198025728005c056ab53b5c8242af364fa437ed,  cert=, secured=1, bundle=1
    
    OtaJson_init: template={"bundle": int32,"certificate": string,"filename": string,"secured": int32,"signature_base64": string,"digest": string} , text={
            "digest":"b72632e0b8f7989d1373566c5441227068f9c60fdf81a7831fd1fd9d70536413",
            "certificate":"dummy-root-ca-cert",
            "signature_base64":"B7hHaGXsHOW9H4ROBED5gMBlv0hfTXmMNN1+70yXpeC2NORpm6/AElUYsY88I7Fb7MBWdpYYhO1XHanZ8j9m1vfRyyIA+9LObipz4IrxpRSpcm5XH9OVCU+8uIqs5xjzuH0LmYFaDfdGrCIDA3FspiYq+qc15JQTopTurEnKFZy0vkYPIh2rv04QCNg4ZfBG8D/vNWp6lZWUPTzwfXxPU2y16w829TMqsYPdQOW/eLNDwJV6B9nXo1kxI218NqthSKL46LGlyZ/ZPBYkLVxNBu1bSb/txOON78A6FeSJGjsn+K2NpOYNmqUEjM8E73hqrO15QUd9D67vaCiEm6Yg4g==",
            "secured":1,
            "bundle":1,
            "filename":"/sys/mcuimg.bin"
        },
        {
            "digest":"f19878afd9b715d17bee665a5e56538e1ca3d739370d888f74e1f4c62523704e",
            "certificate":"",
            "signature_base64":"",
            "secured":0,
            "bundle":1,
            "filename":"certificate.pem"
        },
        {
            "digest":"7431e5f4c3c1ce4690774f0
    [_BundleCmdFile_Parse]    bundle cmd file=/sys/mcuimg.bin, sig_len=256, SHA_256_Digets=b72632e0b8f7989d1373566c5441227068f9c60fdf81a7831fd1fd9d70536413,  cert=dummy-root-ca-cert, secured=1, bundle=1
    
    OtaJson_init: template={"bundle": int32,"certificate": string,"filename": string,"secured": int32,"signature_base64": string,"digest": string} , text={
            "digest":"f19878afd9b715d17bee665a5e56538e1ca3d739370d888f74e1f4c62523704e",
            "certificate":"",
            "signature_base64":"",
            "secured":0,
            "bundle":1,
            "filename":"certificate.pem"
        },
        {
            "digest":"7431e5f4c3c1ce4690774f0b61e05440883ba9a01ed00ba6abd7806ed3b118cf",
            "certificate":"",
            "signature_base64":"",
            "secured":0,
            "bundle":1,
            "filename":"digcert_high_assurance_ev_root_ca_cert.cer"
        },
        {
            "digest":"34941765501d16a4ab776c3a74d89945f1a2575c5893069f62ffbe803f344549",
            "certificate"
    
    [_BundleCmdFile_Parse]    bundle cmd file=certificate.pem, sig_len=0, SHA_256_Digets=f19878afd9b715d17bee665a5e56538e1ca3d739370d888f74e1f4c62523704e,  cert=, secured=0, bundle=1
    
    OtaJson_init: template={"bundle": int32,"certificate": string,"filename": string,"secured": int32,"signature_base64": string,"digest": string} , text={
            "digest":"7431e5f4c3c1ce4690774f0b61e05440883ba9a01ed00ba6abd7806ed3b118cf",
            "certificate":"",
            "signature_base64":"",
            "secured":0,
            "bundle":1,
            "filename":"digcert_high_assurance_ev_root_ca_cert.cer"
        },
        {
            "digest":"34941765501d16a4ab776c3a74d89945f1a2575c5893069f62ffbe803f344549",
            "certificate"
    
    [_BundleCmdFile_Parse]    bundle cmd file=digcert_high_assurance_ev_root_ca_cert.cer, sig_len=0, SHA_256_Digets=7431e5f4c3c1ce4690774f0b61e05440883ba9a01ed00ba6abd7806ed3b118cf,  cert=, secured=0, bundle=1
    
    OtaJson_init: template={"bundle": int32,"certificate": string,"filename": string,"secured": int32,"signature_base64": string,"digest": string} , text={
            "digest":"34941765501d16a4ab776c3a74d89945f1a2575c5893069f62ffbe803f344549",
            "certificate":"",
            "signature_base64":"",
            "secured":0,
            "bundle":0,
            "filename":"dummy-root-ca-cert"
        },
        {
            "digest":"b9304e6c5a07421998a29b855cfc4a8dd0fb349cf101b8d42e33aa40c8d73869",
            "certificate":"",
            "signature_base64":"",
            "secured":0,
            "bundle":1,
            "filename":"private.pem"
        },
        {
            "digest":"1ad8373ec50073168cb6862a0e119adf2c1065c896adf7eb9695779739b4bb2e",
            "certificate":"",
            "signature_base64":"",
            "secured":0,
            "bundle":1,
            "filename":"sf-class2-root.pem"
        },
        {
            "digest":"dcd7e97f8c099fa5650359186dca4a547f2fc1d9d057ed4e4054900a64ce3160",
            "certificate":"",
            "signature_base64":"ifNqLM0xuzwjuUEkkgMOaaU49ypHn
    [_BundleCmdFile_Parse]    bundle cmd file=dummy-root-ca-cert, sig_len=0, SHA_256_Digets=34941765501d16a4ab776c3a74d89945f1a2575c5893069f62ffbe803f344549,  cert=, secured=0, bundle=0
    
    OtaJson_init: template={"bundle": int32,"certificate": string,"filename": string,"secured": int32,"signature_base64": string,"digest": string} , text={
            "digest":"b9304e6c5a07421998a29b855cfc4a8dd0fb349cf101b8d42e33aa40c8d73869",
            "certificate":"",
            "signature_base64":"",
            "secured":0,
            "bundle":1,
            "filename":"private.pem"
        },
        {
            "digest":"1ad8373ec50073168cb6862a0e119adf2c1065c896adf7eb9695779739b4bb2e",
            "certificate":"",
            "signature_base64":"",
            "secured":0,
            "bundle":1,
            "filename":"sf-class2-root.pem"
        },
        {
            "digest":"dcd7e97f8c099fa5650359186dca4a547f2fc1d9d057ed4e4054900a64ce3160",
            "certificate":"",
            "signature_base64":"ifNqLM0xuzwjuUEkkgMOaaU49ypHnupAtWeLWZnMaJDBfVN9tgirn1cCNEn/Ntq6EukkuNq9x7Iidm1Ii1x84IzTOHj23aAXvGiYNT7qWBb8d2GcSJCeTwOKx9+p4EAVrjed+Og5kqy/S5p/qYcBOpmQUR4bQRNmTfNnbQaRWy3LPBkGXMA6dQUsrApAXdJ1TI1V2ijjiCKCumsmBe1s9JPkJfIyZNyefCBLwxq3luaAnpayZQ++dz+40j2eCrQMPDGBzQexG
    [_BundleCmdFile_Parse]    bundle cmd file=private.pem, sig_len=0, SHA_256_Digets=b9304e6c5a07421998a29b855cfc4a8dd0fb349cf101b8d42e33aa40c8d73869,  cert=, secured=0, bundle=1
    
    OtaJson_init: template={"bundle": int32,"certificate": string,"filename": string,"secured": int32,"signature_base64": string,"digest": string} , text={
            "digest":"1ad8373ec50073168cb6862a0e119adf2c1065c896adf7eb9695779739b4bb2e",
            "certificate":"",
            "signature_base64":"",
            "secured":0,
            "bundle":1,
            "filename":"sf-class2-root.pem"
        },
        {
            "digest":"dcd7e97f8c099fa5650359186dca4a547f2fc1d9d057ed4e4054900a64ce3160",
            "certificate":"",
            "signature_base64":"ifNqLM0xuzwjuUEkkgMOaaU49ypHnupAtWeLWZnMaJDBfVN9tgirn1cCNEn/Ntq6EukkuNq9x7Iidm1Ii1x84IzTOHj23aAXvGiYNT7qWBb8d2GcSJCeTwOKx9+p4EAVrjed+Og5kqy/S5p/qYcBOpmQUR4bQRNmTfNnbQaRWy3LPBkGXMA6dQUsrApAXdJ1TI1V2ijjiCKCumsmBe1s9JPkJfIyZNyefCBLwxq3luaAnpayZQ++dz+40j2eCrQMPDGBzQexGMD5IOG43nsyhrbOAZbhvyrrULC5amjgg4zmEA/2WbiXt9iwa1OVvN7/ZlDZB2EBApN2NESJA17Rrw==",
            "secured":1,
            "bundle":1,
            "filename":"/sys/servicepack.ucf"
        }
    ]
    
    [_BundleCmdFile_Parse]    bundle cmd file=sf-class2-root.pem, sig_len=0, SHA_256_Digets=1ad8373ec50073168cb6862a0e119adf2c1065c896adf7eb9695779739b4bb2e,  cert=, secured=0, bundle=1
    
    OtaJson_init: template={"bundle": int32,"certificate": string,"filename": string,"secured": int32,"signature_base64": string,"digest": string} , text={
            "digest":"dcd7e97f8c099fa5650359186dca4a547f2fc1d9d057ed4e4054900a64ce3160",
            "certificate":"",
            "signature_base64":"ifNqLM0xuzwjuUEkkgMOaaU49ypHnupAtWeLWZnMaJDBfVN9tgirn1cCNEn/Ntq6EukkuNq9x7Iidm1Ii1x84IzTOHj23aAXvGiYNT7qWBb8d2GcSJCeTwOKx9+p4EAVrjed+Og5kqy/S5p/qYcBOpmQUR4bQRNmTfNnbQaRWy3LPBkGXMA6dQUsrApAXdJ1TI1V2ijjiCKCumsmBe1s9JPkJfIyZNyefCBLwxq3luaAnpayZQ++dz+40j2eCrQMPDGBzQexGMD5IOG43nsyhrbOAZbhvyrrULC5amjgg4zmEA/2WbiXt9iwa1OVvN7/ZlDZB2EBApN2NESJA17Rrw==",
            "secured":1,
            "bundle":1,
            "filename":"/sys/servicepack.ucf"
        }
    ]
    
    [_BundleCmdFile_Parse]    bundle cmd file=/sys/servicepack.ucf, sig_len=256, SHA_256_Digets=dcd7e97f8c099fa5650359186dca4a547f2fc1d9d057ed4e4054900a64ce3160,  cert=, secured=1, bundle=1
    
    OtaArchive_RunParseTar: parsing archive file header
    
    OtaArchive_RunParseTar: skip block align  RecvBufLen=1440, SkipAlignSize=462
    
    OtaArchive_RunParseTar: FileType=0, FileName=ota.sign, FileSize=70
    
    [_BundleCmdSignatureFile_Parse] signature verification failed!
    
    OtaArchive_RunParseTar: ERROR in _BundleCmdSignatureFile_Parse, Status=-12291
    
    OTA_run: ERROR OtaArchive_RunParse, Status=-12291
    
    
    _OtaCheckConsecutiveErrors: ConsecutiveOtaErrors=1/5, return only WARNNING
    
    OtaRunStep: WARNING Ota_run, Status=20009, continue fornext OTA retry
    
    ....
    
    _OtaCheckConsecutiveErrors: ConsecutiveOtaErrors=2/5, return only WARNNING
    
    OtaRunStep: WARNING Ota_run, Status=20009, continue fornext OTA retry
    
    ....
    
    [_BundleCmdFile_Parse]    bundle cmd file=/sys/servicepack.ucf, sig_len=256, SHA_256_Digets=dcd7e97f8c099fa5650359186dca4a547f2fc1d9d057ed4e4054900a64ce3160,  cert=, secured=1, bundle=1
    
    OtaArchive_RunParseTar: parsing archive file header
    
    OtaArchive_RunParseTar: skip block align  RecvBufLen=1440, SkipAlignSize=462
    
    OtaArchive_RunParseTar: FileType=0, FileName=ota.sign, FileSize=70
    
    [_BundleCmdSignatureFile_Parse] signature verification failed!
    
    OtaArchive_RunParseTar: ERROR in _BundleCmdSignatureFile_Parse, Status=-12291
    
    OTA_run: ERROR OtaArchive_RunParse, Status=-12291
    
    
    _OtaCheckConsecutiveErrors: ConsecutiveOtaErrors=5/5, MAX_CONSECUTIVE_OTA_ERRORS!!!
    
    
    
    OtaRunStep: FATAL ERROR from Ota_run -21003 !!!!!!!!!!!!!!!!!!!!!!!!!!!
    
    
    
    Test failed: State = 6, Event = 17
    
    Event handler failed..!!
    
    

    and please do let me know else could be the issue.

    and , what is this

    [_BundleCmdSignatureFile_Parse] signature verification failed!

    error why it is coming?

    Waiting for your reply...

    Br,

    sarju

  • This is a progress (if the same error appears when using "#define BUNDLE_CMD_MAX_OBJECT_SIZE 1536" - please use the lower value).

    Now the issue is related to the image signature.

    Are you using the "dummy_ota_vendor_cert.der" (and signed the ota image using "dummy_ota_vendor_key.der")?

    Is the "dummy_ota_vendor_cert.der" installed as a user file?

    Br,

    Kobi

  • Hi Kobi,

    Thanks you so much for your suggestion "dummy_ota_vendor_cert.der" was the issue, i was using "dummy_ota_vendor_key.der" at the time of ota creation but, "dummy_ota_vendor_cert" wasn't inside the uniflash. 

    now .tar file seems downloaded  successfully. here is log file 

    0245.logfile.txt
    OtaInit: statistics = 0, 0, 0
    
    OtaInit: call Ota_init
    
    OTA_init: sizeof CdnClient=576, sizeof OtaArchive=5552
    
    OTA_init: sizeof OtaLib_t=8332, sizeof OTA_memBlock=10536
    
    OTA_init: OTA lib version = OTA_LIB_2.0.0.7
    
    OtaArchive_Init: OTA archive version = OTA_ARCHIVE_2.0.0.4
    
    OtaConfig: call OTA_set EXTLIB_OTA_SET_OPT_SERVER_INFO,ServerName=api.dropboxapi.com
    
    OtaConfig: call OTA_set EXTLIB_OTA_SET_OPT_VENDOR_ID, VendorDir=OTA_R2_MCU_FLASH
    
    OTA_run: call CdnClient_ConnectServer OTA server=api.dropboxapi.com
    
    CdnClient_ConnectServer: HttpClient_Connect api.dropboxapi.com
    
    HttpClient_Connect: IP_ADDR=162.125.81.7
    
    HttpClient_Connect: WARNING Socket Connect, status=-468, Ignored...
    
    OTA_run: CdnClient_ReqOtaDir, VendorDir=OTA_R2_MCU_FLASH
    
    CdnDropbox_SendReqDir: uri=/2/files/list_folder
    
    RespLen is 850, ProcessedSize is: 845
    
    the entire JSON pRespBuf is: (null)
    
    OtaJson_init: template={"entries":[{"path_display": string,"size": int32}]} , text={"entries": [{".tag": "file", "name": "20200904115054_CC3235S_cc3235s_out_of_box_freertos.tar", "path_lower": "/ota_r2_mcu_flash/20200904115054_cc3235s_cc3235s_out_of_box_freertos.tar", "path_display": "/OTA_R2_MCU_FLASH/20200904115054_CC3235S_cc3235s_out_of_box_freertos.tar", "id": "id:_-wNSoxI0WAAAAAAAAAA6w", "client_modified": "2020-09-04T06:21:56Z", "server_modified": "2020-09-04T06:21:56Z", "rev": "015ae76e2bb740800000001ea4704e0", "size": 286720, "is_downloadable": true, "content_hash": "7b1cbc5395fd00b881e6d1e92ef72e2e0c278bcd8fd893c584b9b556613acd33"}], "cursor": "AAHosLUXuMrgDgzPZJVpQUWQqfvy5WN6dzlc_kR5R4bIgyYtKQwq2d303EHdtWQQjGfxgeQTZAzMiHsedLDP0jzAt3-bWdHRi7LmjjEvdDVL3YUe6VC-eiiTlxMjx0iKTZqdNjlC8zX2O_pMqLv9CV3X7ncaUpOd7rfU4EasXnMo71_GmNsVVkjWAK6mPflKN8aUeoK1B85Z_XKmxCGD1xXxNcr0yHge8D9lqf0Kw43v_Q", "has_more": false}
    
        OtaDir FileName=/OTA_R2_MCU_FLASH/20200904115054_CC3235S_cc3235s_out_of_box_freertos.tar, FileSize=286720
    
    OTA_run: CdnClient_ReqOtaDir, NumDirFiles=1
    
    OTA_run: CdnClient_GetNextDirFile
    
    OTA_run: CdnClient_GetNextDirFile: file=/OTA_R2_MCU_FLASH/20200904115054_CC3235S_cc3235s_out_of_box_freertos.tar, size=286720
    
    OtaArchive_Init: OTA archive version = OTA_ARCHIVE_2.0.0.4
    
        OtaArchive_CheckVersion: current version str = 20200831111705, decimal = 1599918617
    
        OtaArchive_CheckVersion: new     version str = 20200904115054, decimal = 1672921966
    
        OtaArchive_CheckVersion: newer version update - 20200904115054
    
    OtaRunStep: status from Ota_run: OTA_RUN_STATUS_CHECK_NEWER_VERSION, accept and continue
    
    OtaRunStep: CurrentVersion=20200831111705, NewVersion=20200904115054, Start download ...
    
    OTA_run: Call CdnClient_ReqFileUrl, filename = /OTA_R2_MCU_FLASH/20200904115054_CC3235S_cc3235s_out_of_box_freertos.tar
    
    CdnDropbox_SendReqFileUrl: uri=/2/files/get_temporary_link
    
    HTTP request is:
    POST /2/files/get_temporary_link HTTP/1.1
    host: api.dropboxapi.com
    Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    Content-Type: Application/Json
    Content-Length:  84
    
    {"path": "/OTA_R2_MCU_FLASH/20200904115054_CC3235S_cc3235s_out_of_box_freertos.tar"}
    
    
    
    
    OtaJson_init: template={"metadata":raw,"link": string} , text={"metadata": {"name": "20200904115054_CC3235S_cc3235s_out_of_box_freertos.tar", "path_lower": "/ota_r2_mcu_flash/20200904115054_cc3235s_cc3235s_out_of_box_freertos.tar", "path_display": "/OTA_R2_MCU_FLASH/20200904115054_CC3235S_cc3235s_out_of_box_freertos.tar", "id": "id:_-wNSoxI0WAAAAAAAAAA6w", "client_modified": "2020-09-04T06:21:56Z", "server_modified": "2020-09-04T06:21:56Z", "rev": "015ae76e2bb740800000001ea4704e0", "size": 286720, "is_downloadable": true, "content_hash": "7b1cbc5395fd00b881e6d1e92ef72e2e0c278bcd8fd893c584b9b556613acd33"}, "link": "https://content.dropboxapi.com/apitl/1/Ag4HoOPZJRdCPN6V8Fl2LRNbdpmJlOzBcKlqYD5axTSTsR7mmBRY5yrL04gM_VuJ1zpiKGnG6gyJxZgh1S8FCo9uqW-yfhFWm5zplwdWf4ltS4Yjzpa2K3KUycr2AcZo1OYfc4Uf2PYo-uVpcJs_CmonR35JJhgtASkKpgQ_3us5kl2Ya3MtiK7xTad6DmkdvP_3PXFSBVCUFaQcY8A8dSuO2ouGU6q0BlhWvArbB4TcF68gcRHKwcsHzV7SNylp29aKUBYogRfD59CCjx8Y2C0O1GZFkuESkMHgHAUXvndz2iXhVp3-NOvjWO4t8O1PDJ-2czV-XHFSCr5h78L9Srdk4RRaljley7sBbafK
    OTA_run: Call CdnClient_ConnectFileServer, url = https://content.dropboxapi.com/apitl/1/Ag4HoOPZJRdCPN6V8Fl2LRNbdpmJlOzBcKlqYD5axTSTsR7mmBRY5yrL04gM_VuJ1zpiKGnG6gyJxZgh1S8FCo9uqW-yfhFWm5zplwdWf4ltS4Yjzpa2K3KUycr2AcZo1OYfc4Uf2PYo-uVpcJs_CmonR35JJhgtASkKpgQ_3us5kl2Ya3MtiK7xTad6DmkdvP_3PXFSBVCUFaQcY8A8dSuO2ouGU6q0BlhWvArbB4TcF68gcRHKwcsHzV7SNylp29aKUBYogRfD59CCjx8Y2C0O1GZFkuESkMHgHAUXvndz2iXhVp3-NOvjWO4t8O1PDJ-2czV-XHFSCr5h78L9Srdk4RRaljley7sBbafKW3swDWOnlEwxQa1DwbHcRIl8xWttDYqgaBzMjOiyGISGE1TRCO2GUsBi0o29LEZ7aXO1yg
    
    HttpClient_Connect: IP_ADDR=162.125.81.14
    
    HttpClient_Connect: WARNING Socket Connect, status=-468, Ignored...
    
    OTA_run: Call CdnClient_ReqFileContent, url = https://content.dropboxapi.com/apitl/1/Ag4HoOPZJRdCPN6V8Fl2LRNbdpmJlOzBcKlqYD5axTSTsR7mmBRY5yrL04gM_VuJ1zpiKGnG6gyJxZgh1S8FCo9uqW-yfhFWm5zplwdWf4ltS4Yjzpa2K3KUycr2AcZo1OYfc4Uf2PYo-uVpcJs_CmonR35JJhgtASkKpgQ_3us5kl2Ya3MtiK7xTad6DmkdvP_3PXFSBVCUFaQcY8A8dSuO2ouGU6q0BlhWvArbB4TcF68gcRHKwcsHzV7SNylp29aKUBYogRfD59CCjx8Y2C0O1GZFkuESkMHgHAUXvndz2iXhVp3-NOvjWO4t8O1PDJ-2czV-XHFSCr5h78L9Srdk4RRaljley7sBbafKW3swDWOnlEwxQa1DwbHcRIl8xWttDYqgaBzMjOiyGISGE1TRCO2GUsBi0o29LEZ7aXO1yg
    
    OtaArchive_RunParse: set state=ARCHIVE_STATE_PARSE_HDR
    
    OtaArchive_RunParseTar: parsing archive file header
    
    OtaArchive_RunParseTar: filetype=5, directory=20200904115054_CC3235S_cc3235s_out_of_box_freertos/
    
    OtaArchive_RunParseTar: parsing archive file header
    
    OtaArchive_RunParseTar: filetype=5, directory=20200904115054_CC3235S_cc3235s_out_of_box_freertos/0/
    
    OtaArchive_RunParseTar: parsing archive file header
    
    OtaArchive_RunParseTar: filetype=5, directory=20200904115054_CC3235S_cc3235s_out_of_box_freertos/1/
    
    OtaArchive_RunParseTar: parsing archive file header
    
    OtaArchive_RunParseTar: filetype=5, directory=20200904115054_CC3235S_cc3235s_out_of_box_freertos/2/
    
    OtaArchive_RunParseTar: parsing archive file header
    
    OtaArchive_RunParseTar: FileType=0, FileName=ota.cmd, FileSize=2854
    
    OtaJson_init: template={"bundle": int32,"certificate": string,"filename": string,"secured": int32,"signature_base64": string,"digest": string} , text={
            "digest":"ca07d9c0c8cf718e227cc62a5198025728005c056ab53b5c8242af364fa437ed",
            "certificate":"",
            "signature_base64":"",
            "secured":1,
            "bundle":1,
            "filename":"/sys/mcubootinfo.bin"
        },
        {
            "digest":"2b9104f9289183993cd3412e6e3b3bb2e1416badd8d5cdd14c698aced41d9027",
            "certificate":"dummy-root-ca-cert",
            "signature_base64":"UX7riqoiquoJymTY8QX+XD+Xb45Y3hJsyTh5Gcpvy6LiKgNTiYuFuh29xXexiFbUubrhrT9yH6wFHsE39aRnQb98HpRrUsXG5xRA6Z55wpguhuC+vWyHsCaHU2CIkVkhjnO9c5f8S7yiQE991pXNjB6sbDKWY9YKNy9PyBnEzNx/bX76pz/uBCdnOBOA5nxksZvpU9GtNsleOj/aroJubao1rcyXeo+CTlsqfaijKNFL2mKHWw0ncHTlnqpbk2TBqpzFH9xOwey/HCychCOHjRaV0bQja/NV0dqESxNtJeQCKlXhtgomeBj38DEzCuV6J3IP+yzWeFVp0Q4gQpviAA==",
            "secured":1,
            "bundle":1,
            "filename":"/sys/mcuimg.bin"
        },
        {
            "digest":"f19878afd9b715d17b
    [_BundleCmdFile_Parse]    bundle cmd file=/sys/mcubootinfo.bin, sig_len=0, SHA_256_Digets=ca07d9c0c8cf718e227cc62a5198025728005c056ab53b5c8242af364fa437ed,  cert=, secured=1, bundle=1
    
    OtaJson_init: template={"bundle": int32,"certificate": string,"filename": string,"secured": int32,"signature_base64": string,"digest": string} , text={
            "digest":"2b9104f9289183993cd3412e6e3b3bb2e1416badd8d5cdd14c698aced41d9027",
            "certificate":"dummy-root-ca-cert",
            "signature_base64":"UX7riqoiquoJymTY8QX+XD+Xb45Y3hJsyTh5Gcpvy6LiKgNTiYuFuh29xXexiFbUubrhrT9yH6wFHsE39aRnQb98HpRrUsXG5xRA6Z55wpguhuC+vWyHsCaHU2CIkVkhjnO9c5f8S7yiQE991pXNjB6sbDKWY9YKNy9PyBnEzNx/bX76pz/uBCdnOBOA5nxksZvpU9GtNsleOj/aroJubao1rcyXeo+CTlsqfaijKNFL2mKHWw0ncHTlnqpbk2TBqpzFH9xOwey/HCychCOHjRaV0bQja/NV0dqESxNtJeQCKlXhtgomeBj38DEzCuV6J3IP+yzWeFVp0Q4gQpviAA==",
            "secured":1,
            "bundle":1,
            "filename":"/sys/mcuimg.bin"
        },
        {
            "digest":"f19878afd9b715d17bee665a5e56538e1ca3d739370d888f74e1f4c62523704e",
            "certificate":"",
            "signature_base64":"",
            "secured":0,
            "bundle":1,
            "filename":"certificate.pem"
        },
        {
            "digest":"7431e5f4c3c1ce4690774f0
    [_BundleCmdFile_Parse]    bundle cmd file=/sys/mcuimg.bin, sig_len=256, SHA_256_Digets=2b9104f9289183993cd3412e6e3b3bb2e1416badd8d5cdd14c698aced41d9027,  cert=dummy-root-ca-cert, secured=1, bundle=1
    
    OtaJson_init: template={"bundle": int32,"certificate": string,"filename": string,"secured": int32,"signature_base64": string,"digest": string} , text={
            "digest":"f19878afd9b715d17bee665a5e56538e1ca3d739370d888f74e1f4c62523704e",
            "certificate":"",
            "signature_base64":"",
            "secured":0,
            "bundle":1,
            "filename":"certificate.pem"
        },
        {
            "digest":"7431e5f4c3c1ce4690774f0b61e05440883ba9a01ed00ba6abd7806ed3b118cf",
            "certificate":"",
            "signature_base64":"",
            "secured":0,
            "bundle":1,
            "filename":"digcert_high_assurance_ev_root_ca_cert.cer"
        },
        {
            "digest":"34941765501d16a4ab776c3a74d89945f1a2575c5893069f62ffbe803f344549",
            "certificate"
    
    [_BundleCmdFile_Parse]    bundle cmd file=certificate.pem, sig_len=0, SHA_256_Digets=f19878afd9b715d17bee665a5e56538e1ca3d739370d888f74e1f4c62523704e,  cert=, secured=0, bundle=1
    
    OtaJson_init: template={"bundle": int32,"certificate": string,"filename": string,"secured": int32,"signature_base64": string,"digest": string} , text={
            "digest":"7431e5f4c3c1ce4690774f0b61e05440883ba9a01ed00ba6abd7806ed3b118cf",
            "certificate":"",
            "signature_base64":"",
            "secured":0,
            "bundle":1,
            "filename":"digcert_high_assurance_ev_root_ca_cert.cer"
        },
        {
            "digest":"34941765501d16a4ab776c3a74d89945f1a2575c5893069f62ffbe803f344549",
            "certificate"
    
    [_BundleCmdFile_Parse]    bundle cmd file=digcert_high_assurance_ev_root_ca_cert.cer, sig_len=0, SHA_256_Digets=7431e5f4c3c1ce4690774f0b61e05440883ba9a01ed00ba6abd7806ed3b118cf,  cert=, secured=0, bundle=1
    
    OtaJson_init: template={"bundle": int32,"certificate": string,"filename": string,"secured": int32,"signature_base64": string,"digest": string} , text={
            "digest":"34941765501d16a4ab776c3a74d89945f1a2575c5893069f62ffbe803f344549",
            "certificate":"",
            "signature_base64":"",
            "secured":0,
            "bundle":0,
            "filename":"dummy-root-ca-cert"
        },
        {
            "digest":"a160b855d7a00a6002922181377249a80ecd6a738d23e1dd8976c8bb7fad1bcb",
            "certificate":"",
            "signature_base64":"",
            "secured":0,
            "bundle":1,
            "filename":"dummy_ota_vendor_cert.der"
        },
        {
            "digest":"b9304e6c5a07421998a29b855cfc4a8dd0fb349cf101b8d42e33aa40c8d73869",
            "certificate":"",
            "signature_base64":"",
            "secured":0,
            "bundle":1,
            "filename":"private.pem"
        },
        {
            "digest":"1ad8373ec50073168cb6862a0e119adf2c1065c896adf7eb9695779739b4bb2e",
            "certificate":"",
            "signature_base64":"",
            "secured":0
    [_BundleCmdFile_Parse]    bundle cmd file=dummy-root-ca-cert, sig_len=0, SHA_256_Digets=34941765501d16a4ab776c3a74d89945f1a2575c5893069f62ffbe803f344549,  cert=, secured=0, bundle=0
    
    OtaJson_init: template={"bundle": int32,"certificate": string,"filename": string,"secured": int32,"signature_base64": string,"digest": string} , text={
            "digest":"a160b855d7a00a6002922181377249a80ecd6a738d23e1dd8976c8bb7fad1bcb",
            "certificate":"",
            "signature_base64":"",
            "secured":0,
            "bundle":1,
            "filename":"dummy_ota_vendor_cert.der"
        },
        {
            "digest":"b9304e6c5a07421998a29b855cfc4a8dd0fb349cf101b8d42e33aa40c8d73869",
            "certificate":"",
            "signature_base64":"",
            "secured":0,
            "bundle":1,
            "filename":"private.pem"
        },
        {
            "digest":"1ad8373ec50073168cb6862a0e119adf2c1065c896adf7eb9695779739b4bb2e",
            "certificate":"",
            "signature_base64":"",
            "secured":0,
            "bundle":1,
            "filename":"sf-class2-root.pem"
        },
        {
            "digest":"dcd7e97f8c099fa5650359186dca4a547f2fc1d9d057ed4e4054900a64ce3160",
            "certificate":"",
            "signature_base64":"ifNqLM0xuzwjuUEkkgMOaa
    [_BundleCmdFile_Parse]    bundle cmd file=dummy_ota_vendor_cert.der, sig_len=0, SHA_256_Digets=a160b855d7a00a6002922181377249a80ecd6a738d23e1dd8976c8bb7fad1bcb,  cert=, secured=0, bundle=1
    
    OtaJson_init: template={"bundle": int32,"certificate": string,"filename": string,"secured": int32,"signature_base64": string,"digest": string} , text={
            "digest":"b9304e6c5a07421998a29b855cfc4a8dd0fb349cf101b8d42e33aa40c8d73869",
            "certificate":"",
            "signature_base64":"",
            "secured":0,
            "bundle":1,
            "filename":"private.pem"
        },
        {
            "digest":"1ad8373ec50073168cb6862a0e119adf2c1065c896adf7eb9695779739b4bb2e",
            "certificate":"",
            "signature_base64":"",
            "secured":0,
            "bundle":1,
            "filename":"sf-class2-root.pem"
        },
        {
            "digest":"dcd7e97f8c099fa5650359186dca4a547f2fc1d9d057ed4e4054900a64ce3160",
            "certificate":"",
            "signature_base64":"ifNqLM0xuzwjuUEkkgMOaaU49ypHnupAtWeLWZnMaJDBfVN9tgirn1cCNEn/Ntq6EukkuNq9x7Iidm1Ii1x84IzTOHj23aAXvGiYNT7qWBb8d2GcSJCeTwOKx9+p4EAVrjed+Og5kqy/S5p/qYcBOpmQUR4bQRNmTfNnbQaRWy3LPBkGXMA6dQUsrApAXdJ1TI1V2ijjiCKCumsmBe1s9JPkJfIyZNyefCBLwxq3luaAnpayZQ++dz+40j2eCrQMPDGBzQexG
    [_BundleCmdFile_Parse]    bundle cmd file=private.pem, sig_len=0, SHA_256_Digets=b9304e6c5a07421998a29b855cfc4a8dd0fb349cf101b8d42e33aa40c8d73869,  cert=, secured=0, bundle=1
    
    OtaJson_init: template={"bundle": int32,"certificate": string,"filename": string,"secured": int32,"signature_base64": string,"digest": string} , text={
            "digest":"1ad8373ec50073168cb6862a0e119adf2c1065c896adf7eb9695779739b4bb2e",
            "certificate":"",
            "signature_base64":"",
            "secured":0,
            "bundle":1,
            "filename":"sf-class2-root.pem"
        },
        {
            "digest":"dcd7e97f8c099fa5650359186dca4a547f2fc1d9d057ed4e4054900a64ce3160",
            "certificate":"",
            "signature_base64":"ifNqLM0xuzwjuUEkkgMOaaU49ypHnupAtWeLWZnMaJDBfVN9tgirn1cCNEn/Ntq6EukkuNq9x7Iidm1Ii1x84IzTOHj23aAXvGiYNT7qWBb8d2GcSJCeTwOKx9+p4EAVrjed+Og5kqy/S5p/qYcBOpmQUR4bQRNmTfNnbQaRWy3LPBkGXMA6dQUsrApAXdJ1TI1V2ijjiCKCumsmBe1s9JPkJfIyZNyefCBLwxq3luaAnpayZQ++dz+40j2eCrQMPDGBzQexGMD5IOG43nsyhrbOAZbhvyrrULC5amjgg4zmEA/2WbiXt9iwa1OVvN7/ZlDZB2EBApN2NESJA17Rrw==",
    
    
    [_BundleCmdFile_Parse]    bundle cmd file=sf-class2-root.pem, sig_len=0, SHA_256_Digets=1ad8373ec50073168cb6862a0e119adf2c1065c896adf7eb9695779739b4bb2e,  cert=, secured=0, bundle=1
    
    OtaJson_init: template={"bundle": int32,"certificate": string,"filename": string,"secured": int32,"signature_base64": string,"digest": string} , text={
            "digest":"dcd7e97f8c099fa5650359186dca4a547f2fc1d9d057ed4e4054900a64ce3160",
            "certificate":"",
            "signature_base64":"ifNqLM0xuzwjuUEkkgMOaaU49ypHnupAtWeLWZnMaJDBfVN9tgirn1cCNEn/Ntq6EukkuNq9x7Iidm1Ii1x84IzTOHj23aAXvGiYNT7qWBb8d2GcSJCeTwOKx9+p4EAVrjed+Og5kqy/S5p/qYcBOpmQUR4bQRNmTfNnbQaRWy3LPBkGXMA6dQUsrApAXdJ1TI1V2ijjiCKCumsmBe1s9JPkJfIyZNyefCBLwxq3luaAnpayZQ++dz+40j2eCrQMPDGBzQexGMD5IOG43nsyhrbOAZbhvyrrULC5amjgg4zmEA/2WbiXt9iwa1OVvN7/ZlDZB2EBApN2NESJA17Rrw==",
            "secured":1,
            "bundle":1,
            "filename":"/sys/servicepack.ucf"
        }
    ]
    
    [_BundleCmdFile_Parse]    bundle cmd file=/sys/servicepack.ucf, sig_len=256, SHA_256_Digets=dcd7e97f8c099fa5650359186dca4a547f2fc1d9d057ed4e4054900a64ce3160,  cert=, secured=1, bundle=1
    
    OtaArchive_RunParseTar: parsing archive file header
    
    OtaArchive_RunParseTar: skip block align  RecvBufLen=863, SkipAlignSize=219
    
    OtaArchive_RunParseTar: FileType=0, FileName=ota.sign, FileSize=72
    
    OtaArchive_RunParseTar: parsing archive file header
    
    OtaArchive_RunParseTar: skip block align  RecvBufLen=1368, SkipAlignSize=440
    
    OtaArchive_RunParseTar: FileType=0, FileName=dummy-root-ca-cert, FileSize=975
    
       Create/Open for write file dummy-root-ca-cert
    
    OtaArchive_RunParseTar: Write size 975
    to file dummy-root-ca-cert
    total 975.
    
    
     Hash verification succeeded.
    
        Total archive file bytes 8143.
    
    OtaArchive_RunParseTar: 1 files that are mentioned in the ota.cmd were saved
    
    OtaArchive_RunParseTar: Downloading File Completed - Size=975
    
    OtaArchive_RunParseTar: parsing archive file header
    
    OtaArchive_RunParseTar: skip block align  RecvBufLen=1440, SkipAlignSize=49
    
    OtaArchive_RunParseTar: FileType=0, FileName=/sys/mcubootinfo.bin, FileSize=16
    
       Create/Open for write file /sys/mcubootinfo.bin
    
    OtaArchive_RunParseTar: Write size 16
    to file /sys/mcubootinfo.bin
    total 16.
    
    
     Hash verification succeeded.
    
        Total archive file bytes 8720.
    
    OtaArchive_RunParseTar: 2 files that are mentioned in the ota.cmd were saved
    
    OtaArchive_RunParseTar: Downloading File Completed - Size=16
    
    OtaArchive_RunParseTar: parsing archive file header
    
    OtaArchive_RunParseTar: skip block align  RecvBufLen=863, SkipAlignSize=496
    
    OtaArchive_RunParseTar: parsing archive file header
    
    OtaArchive_RunParseTar: FileType=0, FileName=/sys/mcuimg.bin, FileSize=208670
    
       Create/Open for write file /sys/mcuimg.bin
    
    OtaArchive_RunParseTar: Write size 928
    to file /sys/mcuimg.bin
    total 928.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 2368.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 3808.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 5248.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 6688.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 8128.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 9568.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 11008.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 12448.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 13888.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 15328.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 16768.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 18208.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 19648.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 21088.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 22528.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 23968.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 25408.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 26848.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 28288.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 29728.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 31168.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 32608.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 34048.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 35488.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 36928.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 38368.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 39808.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 41248.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 42688.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 44128.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 45568.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 47008.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 48448.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 49888.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 51328.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 52768.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 54208.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 55648.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 57088.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 58528.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 59968.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 61408.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 62848.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 64288.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 65728.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 67168.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 68608.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 70048.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 71488.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 72928.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 74368.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 75808.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 77248.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 78688.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 80128.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 81568.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 83008.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 84448.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 85888.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 87328.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 88768.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 90208.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 91648.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 93088.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 94528.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 95968.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 97408.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 98848.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 100288.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 101728.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 103168.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 104608.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 106048.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 107488.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 108928.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 110368.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 111808.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 113248.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 114688.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 116128.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 117568.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 119008.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 120448.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 121888.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 123328.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 124768.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 126208.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 127648.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 129088.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 130528.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 131968.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 133408.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 134848.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 136288.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 137728.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 139168.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 140608.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 142048.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 143488.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 144928.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 146368.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 147808.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 149248.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 150688.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 152128.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 153568.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 155008.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 156448.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 157888.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 159328.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 160768.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 162208.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 163648.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 165088.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 166528.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 167968.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 169408.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 170848.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 172288.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 173728.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 175168.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 176608.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 178048.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 179488.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 180928.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 182368.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 183808.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 185248.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 186688.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 188128.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 189568.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 191008.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 192448.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 193888.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 195328.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 196768.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 198208.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 199648.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 201088.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 202528.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 203968.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 205408.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 206848.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/mcuimg.bin
    total 208288.
    
    OtaArchive_RunParseTar: Write size 382
    to file /sys/mcuimg.bin
    total 208670.
    
    
     Hash verification succeeded.
    
        Total archive file bytes 218398.
    
    OtaArchive_RunParseTar: 3 files that are mentioned in the ota.cmd were saved
    
    OtaArchive_RunParseTar: Downloading File Completed - Size=208670
    
    OtaArchive_RunParseTar: parsing archive file header
    
    OtaArchive_RunParseTar: skip block align  RecvBufLen=1058, SkipAlignSize=226
    
    OtaArchive_RunParseTar: FileType=0, FileName=certificate.pem, FileSize=1224
    
       Create/Open for write file certificate.pem
    
    OtaArchive_RunParseTar: Write size 1224
    to file certificate.pem
    total 1224.
    
    
     Hash verification succeeded.
    
        Total archive file bytes 220360.
    
    OtaArchive_RunParseTar: 4 files that are mentioned in the ota.cmd were saved
    
    OtaArchive_RunParseTar: Downloading File Completed - Size=1224
    
    OtaArchive_RunParseTar: parsing archive file header
    
    OtaArchive_RunParseTar: skip block align  RecvBufLen=1440, SkipAlignSize=312
    
    OtaArchive_RunParseTar: FileType=0, FileName=digcert_high_assurance_ev_root_ca_cert.cer, FileSize=969
    
       Create/Open for write file digcert_high_assurance_ev_root_ca_cert.cer
    
    OtaArchive_RunParseTar: Write size 616
    to file digcert_high_assurance_ev_root_ca_cert.cer
    total 616.
    
    OtaArchive_RunParseTar: Write size 353
    to file digcert_high_assurance_ev_root_ca_cert.cer
    total 969.
    
    
     Hash verification succeeded.
    
        Total archive file bytes 222153.
    
    OtaArchive_RunParseTar: 5 files that are mentioned in the ota.cmd were saved
    
    OtaArchive_RunParseTar: Downloading File Completed - Size=969
    
    OtaArchive_RunParseTar: parsing archive file header
    
    OtaArchive_RunParseTar: skip block align  RecvBufLen=1087, SkipAlignSize=55
    
    OtaArchive_RunParseTar: FileType=0, FileName=dummy_ota_vendor_cert.der, FileSize=614
    
       Create/Open for write file dummy_ota_vendor_cert.der
    
    OtaArchive_RunParseTar: Write size 520
    to file dummy_ota_vendor_cert.der
    total 520.
    
    OtaArchive_RunParseTar: Write size 94
    to file dummy_ota_vendor_cert.der
    total 614.
    
    
     Hash verification succeeded.
    
        Total archive file bytes 223334.
    
    OtaArchive_RunParseTar: 6 files that are mentioned in the ota.cmd were saved
    
    OtaArchive_RunParseTar: Downloading File Completed - Size=614
    
    OtaArchive_RunParseTar: parsing archive file header
    
    OtaArchive_RunParseTar: skip block align  RecvBufLen=1346, SkipAlignSize=410
    
    OtaArchive_RunParseTar: FileType=0, FileName=private.pem, FileSize=1675
    
       Create/Open for write file private.pem
    
    OtaArchive_RunParseTar: Write size 1440
    to file private.pem
    total 1440.
    
    OtaArchive_RunParseTar: Write size 235
    to file private.pem
    total 1675.
    
    
     Hash verification succeeded.
    
        Total archive file bytes 225931.
    
    OtaArchive_RunParseTar: 7 files that are mentioned in the ota.cmd were saved
    
    OtaArchive_RunParseTar: Downloading File Completed - Size=1675
    
    OtaArchive_RunParseTar: parsing archive file header
    
    OtaArchive_RunParseTar: skip block align  RecvBufLen=1205, SkipAlignSize=373
    
    OtaArchive_RunParseTar: FileType=0, FileName=sf-class2-root.pem, FileSize=1468
    
       Create/Open for write file sf-class2-root.pem
    
    OtaArchive_RunParseTar: Write size 1440
    to file sf-class2-root.pem
    total 1440.
    
    OtaArchive_RunParseTar: Write size 28
    to file sf-class2-root.pem
    total 1468.
    
    
     Hash verification succeeded.
    
        Total archive file bytes 228284.
    
    OtaArchive_RunParseTar: 8 files that are mentioned in the ota.cmd were saved
    
    OtaArchive_RunParseTar: Downloading File Completed - Size=1468
    
    OtaArchive_RunParseTar: parsing archive file header
    
    OtaArchive_RunParseTar: skip block align  RecvBufLen=1412, SkipAlignSize=68
    
    OtaArchive_RunParseTar: FileType=0, FileName=/sys/servicepack.ucf, FileSize=48094
    
       Create/Open for write file /sys/servicepack.ucf
    
    OtaArchive_RunParseTar: Write size 832
    to file /sys/servicepack.ucf
    total 832.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/servicepack.ucf
    total 2272.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/servicepack.ucf
    total 3712.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/servicepack.ucf
    total 5152.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/servicepack.ucf
    total 6592.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/servicepack.ucf
    total 8032.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/servicepack.ucf
    total 9472.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/servicepack.ucf
    total 10912.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/servicepack.ucf
    total 12352.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/servicepack.ucf
    total 13792.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/servicepack.ucf
    total 15232.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/servicepack.ucf
    total 16672.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/servicepack.ucf
    total 18112.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/servicepack.ucf
    total 19552.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/servicepack.ucf
    total 20992.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/servicepack.ucf
    total 22432.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/servicepack.ucf
    total 23872.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/servicepack.ucf
    total 25312.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/servicepack.ucf
    total 26752.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/servicepack.ucf
    total 28192.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/servicepack.ucf
    total 29632.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/servicepack.ucf
    total 31072.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/servicepack.ucf
    total 32512.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/servicepack.ucf
    total 33952.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/servicepack.ucf
    total 35392.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/servicepack.ucf
    total 36832.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/servicepack.ucf
    total 38272.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/servicepack.ucf
    total 39712.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/servicepack.ucf
    total 41152.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/servicepack.ucf
    total 42592.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/servicepack.ucf
    total 44032.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/servicepack.ucf
    total 45472.
    
    OtaArchive_RunParseTar: Write size 1440
    to file /sys/servicepack.ucf
    total 46912.
    
    OtaArchive_RunParseTar: Write size 1182
    to file /sys/servicepack.ucf
    total 48094.
    
    
     Hash verification succeeded.
    
        Total archive file bytes 276958.
    
    OtaArchive_RunParseTar: 9 files that are mentioned in the ota.cmd were saved
    
    OtaArchive_RunParseTar: Downloading File Completed - Size=48094
    
    OtaArchive_RunParseTar: parsing archive file header
    
    OtaArchive_RunParseTar: skip block align  RecvBufLen=1440, SkipAlignSize=34
    
    OtaArchive_RunParseTar: End of archive...
    
    _SaveOtaVersionFile: save version file also in the bundle, version=20200904115054
    
    OTA_run: ---- Download file completed /OTA_R2_MCU_FLASH/20200904115054_CC3235S_cc3235s_out_of_box_freertos.tar
    
    OtaRunStep: status from Ota_run: Download done, status = 104
    
    
    
    
    
    
    OtaImageTestingAndReset: download done
    
    OtaImageTestingAndReset: call sl_Stop to move the bundle to testing state
    
    OtaImageTestingAndReset: reset the platform to test the new image...
    
    
    
    OtaImageTestingAndReset: platform does not support self reset
    
    OtaImageTestingAndReset: reset the NWP to test the new image
    

    have a look please.

    but , new downloaded image is not getting started, controller is running in previous image only. see this pic

    see the last few lines. issue in the OtaImageTestingAndReset() function

    int32_t OtaImageTestingAndReset()
    {
    //    int32_t retVal;
    
        OTA_DBG_PRINT("\n\n\n\n");
        OTA_DBG_PRINT("OtaImageTestingAndReset: download done\r\n");
        OTA_DBG_PRINT("OtaImageTestingAndReset: call sl_Stop to move the bundle to "
                      "testing state\r\n");
        sl_Stop(SL_STOP_TIMEOUT);
        OTA_DBG_PRINT("OtaImageTestingAndReset: reset the platform to test the new "
                      "image...\r\n");
        Platform_Reset();
    
        /* if we reach here, the platform does not support self reset */
        /* reset the NWP in order to test the new image */
        OTA_DBG_PRINT("\n");
        OTA_DBG_PRINT(
                "OtaImageTestingAndReset: platform does not support self reset\r\n");
        OTA_DBG_PRINT(
                "OtaImageTestingAndReset: reset the NWP to test the new image\r\n");
        OTA_DBG_PRINT("\n");
    
        Network_startup();
    //    retVal = InitSimplelink(ROLE_STA);
    /* The sl_Stop/Start will produce event APP_EVENT_STARTED */
    
        IsOtaUpdated=true;
        return 0;
    }

    I am not using InitSimplelink() function to start NWP instead i am using Network_startup(), because my application uses both AWS and OTA_cloud (both merged), so i am using AWS's NWP that is Network_startup();

    and  here is 

    void Platform_Reset()
    {
    #ifdef __MSP432P401R__
        MAP_ResetCtl_initiateSoftReset();
    #elif CC32XX
        /* Reset the MCU in order to test the bundle */
        MAP_PRCMHibernateCycleTrigger();
    #endif
    }

    I think this function is responsibly for mcu restart (right?), but this is always hidden (because CC32XX is not defined any where), or it would defined itself at the time of program running?. how does this function works?

    I tried to debug the by putting breakpoint inside Network_startup() , and found it's crashing in 

    status = sl_WifiConfig();
        if (status < 0) {
            /* sl_WifiConfig failed */
            while (1);
        }

    function simply crashing not returning negative value.

    hopefully, i explained well, and you can understand the issue easily as always.

    thanks again,

    waiting for your response...

    Br, 

    sarju bhatnagar

  • The CC32XX flag should be defined (you need to call MAP_PRCMHibernateCycleTrigger()).

    The MCU needs to reset in order to trigger the new image.

    Br,

    Kobi

  • Hi Kobi,

    I did the same as per your suggestion 

    void Platform_Reset()
    {
    #ifdef __MSP432P401R__
        MAP_ResetCtl_initiateSoftReset();
    #else
        #ifdef CC32XX
        /* Reset the MCU in order to test the bundle */
        MAP_PRCMHibernateCycleTrigger();
        #endif
    #endif
    }

    now this function is able to reset the new image, and board gets reset but after some time this(new image) runs for two-three(cycles or second). 

    after that the board gets rolled back to it's previous image automatically without giving any command.

    please have a look of the following images FYI

    1: Resetting image

    after few seconds of proper run the board gets reset

    please do let  me know what to do at this stage.

    thanks again,

    waiting for your response ...

    Br,

    sarju 

  • The new image should commit the update (after it tested some critical functionalities, such as connection to the OTA server).

    If not committed before a watchdog is expired, the MCU will get reset and revert to the previous release.

    This is part of the fail-safe support. See OtaCheckAndDoCommit and the OTA documentation.

    Br,

    Kobi

  • Yes,you'r right image should be commit, 

    Note: let me tell what's going on currently, as i told previously my application is the merged program of both AWS (MQTT) and Cloud_OTA , my mqtt porgram is working well what i did, i merged cloud_ota in it. and the motive is whenever i will give command from AWS server ( or whenever i will publish a topic from any mqtt client) ota update will be arise and code will get updated.

    this is function which i am calling firstly for ota update

    extern void OtaTask()
    {
        IsOtaUpdated=false;
        int iRetVal = 0;
        int8_t event;
        s_AppContext *const pCtx = &gAppCtx;
        s_TblEntry *pEntry = NULL;
        int32_t msgqRetVal;
    
        DisplayBanner();
        /* Queue management related configurations */
    
        /* Create the queue */
        mq_attr attr;
        attr.mq_maxmsg = 10; /* queue size */
        attr.mq_msgsize = sizeof(unsigned char); /* Size of message */
        g_OtaSMQueue = mq_open("ota msg q", O_CREAT, 0, &attr);
    
        if (iRetVal < 0)
        {
            UART_PRINT("unable to create the msg queue\r\n");
            LOOP_FOREVER();
        }
    
        pCtx->currentState = APP_STATE_PINGING_GW;
        //SignalEvent(APP_EVENT_OTA_START);
        SignalEvent(APP_EVENT_PING_COMPLETE);
    
        /* Configure SimpleLink in STATION role */
    //    iRetVal = InitSimplelink(ROLE_STA);
    //
    //    if (iRetVal < 0)
    //    {
    //        UART_PRINT("Failed to initialize the device!!, halt\r\n");
    //        LOOP_FOREVER();
    //    }
    
        while (!IsOtaUpdated)
        {
    #ifdef NORTOS_SUPPORT
            /* The SimpleLink host driver architecture mandate calling 'sl_task' in
            a NO-RTOS application's main loop.       */
            /* The purpose of this call, is to handle asynchronous events and get
            flow control information sent from the NWP.*/
            /* Every event is classified and later handled by the host driver
            event handlers.                                */
            sl_Task(NULL);
    #endif
            msgqRetVal = mq_receive(g_OtaSMQueue, (char*) &event, 1, NULL);
    
            /* if message q is empty */
            if (msgqRetVal < 0)
            {
    #ifdef USE_TIRTOS
                if(pCtx->pendingEvents &= APP_EVENT_TIMEOUT)
                {
                    pCtx->pendingEvents = 0;
                    SignalEvent(APP_EVENT_TIMEOUT);
                    continue;
                }
    #endif
                SignalEvent(APP_EVENT_NULL);
                continue;
            }
    
            if (event != APP_EVENT_NULL)
            {
                StopAsyncEvtTimer();
            }
    
            /* Find Next event entry */
            pEntry = (s_TblEntry*) &gTransitionTable[pCtx->currentState][event];
    
            if (NULL != pEntry->p_evtHndl)
            {
                if (pEntry->p_evtHndl() < 0)
                {
                    UART_PRINT("Event handler failed..!! \r\n");
    //              LOOP_FOREVER();
                    IsOtaUpdated=true;
                }
            }
    
            /* Change state according to event */
            if (pEntry->nextState != pCtx->currentState)
            {
                pCtx->currentState = pEntry->nextState;
            }
        }
        return;
    }

    as you can see , current state is

     pCtx->currentState = APP_STATE_PINGING_GW;

    and current event is 

       SignalEvent(APP_EVENT_PING_COMPLETE);

    by this combination

                 { HandlePingComplete, APP_STATE_PINGING_GW },

    function gets call, see this function

    #define OTA_PERIOD   5 /* number of pings check */
    int32_t PingCounter = 0;
    int32_t HandlePingComplete()
    {
        if(OtaCheckAndDoCommit() != 0)
        {
            OTA_DBG_PRINT("HandlePingComplete->OtaCheckAndDoCommit: returned Error!");
        }
        PingCounter=5;
    
    #ifndef DISABLE_OTA_SWITCH_TRIGGER
        if (g_performOtaCommand)
    #else
        /* Don't wait for external trigger to start the OTA,
    run OTA after 5 ping sequences */
        if(PingCounter >= OTA_PERIOD)
    #endif
        {
            /* It's time to start periodic OTA check */
            OTA_DBG_PRINT("HandlePingComplete: OTA Command arrived\r\n");
            PingCounter = 0;
            g_performOtaCommand = 0;
            SignalEvent(APP_EVENT_OTA_START);
        }
        else
        {
            /* Continue pinging */
            OTA_DBG_PRINT("HandlePingComplete: PingCounter=%d\r\n", PingCounter);
            CheckLanConnection();
        }
        return (0);
    }

    as you can see in this function i am using commit function, and i closed pinging function(is this necessary to use it?). because my board is already online. but condition is same,it  is reverting back to the old image after few seconds.

    this time it should work, but it's not working.

    please do let me know , what else should i try. 

    thank you so much for your continuous help.

    waiting for your response further...

    Br,

    sarju bhatnagar

     

  • Do you see the OtaCheckAndDoCommit() being executed?

    Please add log prints so you can make sure the following command is called:

    "Status = OTA_set(EXTLIB_OTA_SET_OPT_IMAGE_COMMIT, 0, NULL, 0);"

    If this will be called (and return status == 0), you should be ok.

    if not, check what is wrong with your state machine logic.

    Br,

    Kobi

  • Hi Kobi, 

    thanks you so much for being connected and help me out all over the thread.

    my issue has been resolved, but let me tell where i was making mistake so that other can also get benefit. 

    As i told i merged ota code with aws code and whenever i was giving update command from the AWS cloud server ota code was getting execute. and it was updating whole bin file with new bin file, after that new image should get commit. but control was coming to the ota commit function when i am giving command. but when command was coming whole image update process was getting started again, i mean to say it was not reaching to the commit function. i realized my mistake after seeing following image.

    once again thank you so much for your help.

    Br,

    sarju bhatnagar