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:
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