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.

CC3220SF: Problem in OTA download using cloud_ota demo app

Part Number: CC3220SF
Other Parts Discussed in Thread: UNIFLASH,

Hi there!

I am trying to test the "cloud_ota" demo application, I am following the document "Over_The_Air_Update_Guide.html", but getting the error probably while extracting the TAR file downloaded from Dropbox. Following is the information regarding the environment setup at my end, Please help me in resolving this. Also I am trying to implement OTA functionality in the MQTT_Client app on the same device, please share any related help content or guide to do so.

Thank you!

1. CC3220 SDK Version : simplelink_cc32xx_sdk_3_20_00_06

2. Uniflash version :  5.0.0.2289

3. Debug Logs : 

********************************************************************************
                  OTA APP Application - Version 0.10.00.03
********************************************************************************
SimpleLinkInitCallback: started in role 0
Host Driver Version: 3.0.1.54
Build Version 3.12.0.1.31.2.0.0.0.2.2.0.6
STA connected to AP InhandMUM_020, BSSID is 00:18:05:0d:75:c3
IPv4 acquired: IP = 192.168.2.32
Gateway = 192.168.2.1
Pinging GW...!
Ping done. Success rate: 100%
HandlePingComplete: PingCounter=1
Pinging GW...!
Ping done. Success rate: 100%
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=TICC3220SF
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=TICC3220SF
CdnDropbox_SendReqDir: uri=/2/files/list_folder
RespLen is 742, ProcessedSize is: 737
the entire JSON pRespBuf is:     OtaDir FileName=/TICC3220SF/20190726144817_CC3220SF_TICC3220_OTA.tar, FileSize=174080
OTA_run: CdnClient_ReqOtaDir, NumDirFiles=1
OTA_run: CdnClient_GetNextDirFile
OTA_run: CdnClient_GetNextDirFile: file=/TICC3220SF/20190726144817_CC3220SF_TICC3220_OTA.tar, size=174080
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 = 20190726144817_CC3220SF_TICC3220_OTA.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=20190726144817, Start download ...
OTA_run: Call CdnClient_ReqFileUrl, filename = /TICC3220SF/20190726144817_CC3220SF_TICC3220_OTA.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 YiBbV-1Jp5AAAAAAAAAAJGSAHPG9eZjCKOoafaUVfJQPlId_************
Content-Type: Application/Json
Content-Length:  64
{"path": "/TICC3220SF/20190726144817_CC3220SF_TICC3220_OTA.tar"}
OTA_run: Call CdnClient_ConnectFileServer, url = dl.dropboxusercontent.com/.../AHhQl9Ig4QdzwiqX0oBddauejOPJJy5itmAqAnWDFD6HdkRki_DYBN4LL_kXDBBWfUt2qg8zALnM3W7jvxnI1EC6Xjo0UWNXq0xjxQvYuwGrpQGNuG_EsqngzyHVv9gmuWUUViGfRbikRRXXcxeAnvBpmHZKHpXmyA3-6T_IIbhUSiF9jVo7mi8v6rqAc9EHlEZ4I5XfP2uxeqJ6OCy4dfFYIfyQZuPIakcyW1WGbzGLWJKhTIm7h1gCHFPO_wXrrHl5UBmCCkTkxgTo2cLvo2ZN9HfjIaJers77qUDSmaQ_7GEG6aWjwj2Y_pB-Rv3JrsPeMBw8R4ladwBbINY8LyDOHiPtrel8yIOoA_cNpo2E7Q
HttpClient_Connect: IP_ADDR=162.125.81.6
HttpClient_Connect: WARNING Socket Connect, status=-468, Ignored...
OTA_run: Call CdnClient_ReqFileContent, url = dl.dropboxusercontent.com/.../AHhQl9Ig4QdzwiqX0oBddauejOPJJy5itmAqAnWDFD6HdkRki_DYBN4LL_kXDBBWfUt2qg8zALnM3W7jvxnI1EC6Xjo0UWNXq0xjxQvYuwGrpQGNuG_EsqngzyHVv9gmuWUUViGfRbikRRXXcxeAnvBpmHZKHpXmyA3-6T_IIbhUSiF9jVo7mi8v6rqAc9EHlEZ4I5XfP2uxeqJ6OCy4dfFYIfyQZuPIakcyW1WGbzGLWJKhTIm7h1gCHFPO_wXrrHl5UBmCCkTkxgTo2cLvo2ZN9HfjIaJers77qUDSmaQ_7GEG6aWjwj2Y_pB-Rv3JrsPeMBw8R4ladwBbINY8LyDOHiPtrel8yIOoA_cNpo2E7Q
CdnDropbox_SendReqFileContent: file=/apitl/1/AHhQl9Ig4QdzwiqX0oBddauejOPJJy5itmAqAnWDFD6HdkRki_DYBN4LL_kXDBBWfUt2qg8zALnM3W7jvxnI1EC6Xjo0UWNXq0xjxQvYuwGrpQGNuG_EsqngzyHVv9gmuWUUViGfRbikRRXXcxeAnvBpmHZKHpXmyA3-6T_IIbhUSiF9jVo7mi8v6rqAc9EHlEZ4I5XfP2uxeqJ6OCy4dfFYIfyQZuPIakcyW1WGbzGLWJKhTIm7h1gCHFPO_wXrrHl5UBmCCkTkxgTo2cLvo2ZN9HfjIaJers77qUDSmaQ_7GEG6aWjwj2Y_pB-Rv3JrsPeMBw8R4ladwBbINY8LyDOHiPtrel8yIOoA_cNpo2E7Q
OtaArchive_RunParse: set state=ARCHIVE_STATE_PARSE_HDR
OtaArchive_RunParseTar: parsing archive file header
OtaArchive_RunParseTar: filetype=5, directory=20190726144817_CC3220SF_TICC3220_OTA/
OtaArchive_RunParseTar: parsing archive file header
OtaArchive_RunParseTar: filetype=5, directory=20190726144817_CC3220SF_TICC3220_OTA/0/
OtaArchive_RunParseTar: parsing archive file header
OtaArchive_RunParseTar: filetype=5, directory=20190726144817_CC3220SF_TICC3220_OTA/1/
OtaArchive_RunParseTar: parsing archive file header
OtaArchive_RunParseTar: filetype=5, directory=20190726144817_CC3220SF_TICC3220_OTA/2/
OtaArchive_RunParseTar: parsing archive file header
OtaArchive_RunParseTar: FileType=0, FileName=ota.cmd, FileSize=2145
[_BundleCmdFile_Parse]    bundle cmd file=/sys/mcuimg.bin, sig_len=256, SHA_256_Digets=631e6d701a489529e789012e6fd59b6ea81e060cae65c61e44b9b4e087cd2b3d,  cert=dummy-root-ca-cert, secured=1, bundle=1
[_BundleCmdFile_Parse]    bundle cmd file=digicert_high_assurance_ca.der, 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=1
[_BundleCmdFile_Parse]    bundle cmd file=dummy-trusted-ca-cert, sig_len=0, SHA_256_Digets=07ad6ba74b3921009edf184cb382c05a32baacf9c767f74427c094b2c56aa135,  cert=, secured=0, bundle=1
[_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=/sys/servicepack.ucf, sig_len=256, SHA_256_Digets=5685a25b1060d40e50cb194a78f55edc825abb6b16b45c87078ab8c6609de027,  cert=, secured=1, bundle=1
OtaArchive_RunParseTar: parsing archive file header
OtaArchive_RunParseTar: skip block align  RecvBufLen=620, SkipAlignSize=416
OtaArchive_RunParseTar: parsing archive file header
OtaArchive_RunParseTar: FileType=0, FileName=ota.sign, FileSize=71
OtaArchive_RunParseTar: parsing archive file header
OtaArchive_RunParseTar: skip block align  RecvBufLen=857, SkipAlignSize=441
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 ERROR from sl_FsOpen, Status=-10279
OtaArchive_Rollback: ERROR sl_FsCtl, Status=-10282
OTA_run: ERROR OtaArchive_RunParse, Status=-20106
_OtaCheckConsecutiveErrors: ConsecutiveOtaErrors=1/5, return only WARNNING
OtaRunStep: WARNING Ota_run, Status=20009, continue fornext 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=TICC3220SF
CdnDropbox_SendReqDir: uri=/2/files/list_folder
RespLen is 742, ProcessedSize is: 737
the entire JSON pRespBuf is:     OtaDir FileName=/TICC3220SF/20190726144817_CC3220SF_TICC3220_OTA.tar, FileSize=174080
OTA_run: CdnClient_ReqOtaDir, NumDirFiles=1
OTA_run: CdnClient_GetNextDirFile
OTA_run: CdnClient_GetNextDirFile: file=/TICC3220SF/20190726144817_CC3220SF_TICC3220_OTA.tar, size=174080
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 = 20190726144817_CC3220SF_TICC3220_OTA.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=20190726144817, Start download ...
OTA_run: Call CdnClient_ReqFileUrl, filename = /TICC3220SF/20190726144817_CC3220SF_TICC3220_OTA.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 YiBbV-1Jp5AAAAAAAAAAJGSAHPG9eZjCKOoafaUVfJQPlId_***********
Content-Type: Application/Json
Content-Length:  64
{"path": "/TICC3220SF/20190726144817_CC3220SF_TICC3220_OTA.tar"}
OTA_run: Call CdnClient_ConnectFileServer, url = dl.dropboxusercontent.com/.../AHifCtqYePZmK-qbgGxGCcn22S7yu1SxjFBzppiMnkYNKo4QHu3Vmp4WBgVaBR-s7U6pDEumM8b2nuFHpumDaQu2tjmfzil9qsggTJRmvqTiWR4W2Z430oWeV3FafNUN0czxS7BgsGXyr_UWDKscNJsFlQB_sRqHrCOh1gO0bgW8DZ8pL-U2bCKw3gqVEHdCUkcbMZ1WcC_i1eFflqxgYMwYBepOIcHOmCA2DQlF7Q0MWTJakw7LihDppHHAZXc-2PF7vnZ9-sv2scZKnnu265CWpMOqsaUix3ereTUxvvKynNAZJqWthLFf775e7QURHh3nDuxnNf4L7D5q6VBeAI7bHjZXaKC1FbvTS_hmjdgy_w
HttpClient_Connect: IP_ADDR=162.125.81.6
HttpClient_Connect: WARNING Socket Connect, status=-468, Ignored...
OTA_run: Call CdnClient_ReqFileContent, url = dl.dropboxusercontent.com/.../AHifCtqYePZmK-qbgGxGCcn22S7yu1SxjFBzppiMnkYNKo4QHu3Vmp4WBgVaBR-s7U6pDEumM8b2nuFHpumDaQu2tjmfzil9qsggTJRmvqTiWR4W2Z430oWeV3FafNUN0czxS7BgsGXyr_UWDKscNJsFlQB_sRqHrCOh1gO0bgW8DZ8pL-U2bCKw3gqVEHdCUkcbMZ1WcC_i1eFflqxgYMwYBepOIcHOmCA2DQlF7Q0MWTJakw7LihDppHHAZXc-2PF7vnZ9-sv2scZKnnu265CWpMOqsaUix3ereTUxvvKynNAZJqWthLFf775e7QURHh3nDuxnNf4L7D5q6VBeAI7bHjZXaKC1FbvTS_hmjdgy_w
CdnDropbox_SendReqFileContent: file=/apitl/1/AHifCtqYePZmK-qbgGxGCcn22S7yu1SxjFBzppiMnkYNKo4QHu3Vmp4WBgVaBR-s7U6pDEumM8b2nuFHpumDaQu2tjmfzil9qsggTJRmvqTiWR4W2Z430oWeV3FafNUN0czxS7BgsGXyr_UWDKscNJsFlQB_sRqHrCOh1gO0bgW8DZ8pL-U2bCKw3gqVEHdCUkcbMZ1WcC_i1eFflqxgYMwYBepOIcHOmCA2DQlF7Q0MWTJakw7LihDppHHAZXc-2PF7vnZ9-sv2scZKnnu265CWpMOqsaUix3ereTUxvvKynNAZJqWthLFf775e7QURHh3nDuxnNf4L7D5q6VBeAI7bHjZXaKC1FbvTS_hmjdgy_w
OtaArchive_RunParse: set state=ARCHIVE_STATE_PARSE_HDR
OtaArchive_RunParseTar: parsing archive file header
OtaArchive_RunParseTar: filetype=5, directory=20190726144817_CC3220SF_TICC3220_OTA/
OtaArchive_RunParseTar: parsing archive file header
OtaArchive_RunParseTar: filetype=5, directory=20190726144817_CC3220SF_TICC3220_OTA/0/
OtaArchive_RunParseTar: parsing archive file header
OtaArchive_RunParseTar: filetype=5, directory=20190726144817_CC3220SF_TICC3220_OTA/1/
OtaArchive_RunParseTar: parsing archive file header
OtaArchive_RunParseTar: filetype=5, directory=20190726144817_CC3220SF_TICC3220_OTA/2/
OtaArchive_RunParseTar: parsing archive file header
OtaArchive_RunParseTar: FileType=0, FileName=ota.cmd, FileSize=2145
[_BundleCmdFile_Parse]    bundle cmd file=/sys/mcuimg.bin, sig_len=256, SHA_256_Digets=631e6d701a489529e789012e6fd59b6ea81e060cae65c61e44b9b4e087cd2b3d,  cert=dummy-root-ca-cert, secured=1, bundle=1
[_BundleCmdFile_Parse]    bundle cmd file=digicert_high_assurance_ca.der, 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=1
[_BundleCmdFile_Parse]    bundle cmd file=dummy-trusted-ca-cert, sig_len=0, SHA_256_Digets=07ad6ba74b3921009edf184cb382c05a32baacf9c767f74427c094b2c56aa135,  cert=, secured=0, bundle=1
[_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=/sys/servicepack.ucf, sig_len=256, SHA_256_Digets=5685a25b1060d40e50cb194a78f55edc825abb6b16b45c87078ab8c6609de027,  cert=, secured=1, bundle=1
OtaArchive_RunParseTar: parsing archive file header
OtaArchive_RunParseTar: skip block align  RecvBufLen=620, SkipAlignSize=416
OtaArchive_RunParseTar: parsing archive file header
OtaArchive_RunParseTar: FileType=0, FileName=ota.sign, FileSize=71
[_BundleCmdSignatureFile_Parse] signature verification failed!
OtaArchive_RunParseTar: ERROR in _BundleCmdSignatureFile_Parse, Status=-14
OTA_run: SECURITY ALERT OtaArchive_RunParse, Status=-20199
OtaRunStep: FATAL ERROR from Ota_run -21004 !!!!!!!!!!!!!!!!!!!!!!!!!!!
Test failed: State = 6, Event = 17
Event handler failed..!!

 

  • Hello,

    Have you been following the ota tutorial found here?

    I think the issue is you're not pointing to the right OTA_VENDOR_DIR defined in otauser.h. It should be SEC_OTA_CC3220SF if you're using the CC3220SF. You can find more details and steps in the link I provided.

    Jesu

  • My mistake you probably made your own directory and that is why you have it like that in OTA_VENDOR_DIR. It looks like your tar signature failed. Please give me time to run it myself using dropbox and report back. I will do so with the cloud_ota example.

    Jesu

  • Hi Jesu!

    Thanks for your response!

    Yes I did read through the guide you mentioned, but it seemed to be using GitHub as CDN therefore I followed the guide "Over_The_Air_Update_Guide.html" provided in the SDK at path : C:\ti\simplelink_cc32xx_sdk_3_20_00_06\docs\simplelink_mcu_sdk. Also, yes I named my App directory to be CC3220SF and I think that should not be the problem.

    I forgot to mention, I have also tried the same example in the previous version of CC3220  SDK i.e.simplelink_cc32xx_sdk_3_10_00_04 with the same Dropbox setup and it worked.

    I think there is some version mismatch while signing the TAR file, but don't see anything in the release notes of the new SDK, can you please verify that for me? I am new to signing the files and recovering them after we extract it. In the meanwhile I will try again with the previous version SDK.

    Much appreciated!

    Thank you.

  • Hello, 

    I don't think it's an issue with the SDK v3.20 because I tested it with dropbox on the latest yesterday and it worked. There must be an issue with your setup. As you know a separate ota project dependency has to be imported to the workspace. Since you tested it on 2 different sdk versions one of the examples maybe referencing the wrong ota project? Perhaps try it on a fresh workspace or rename one of the ota projects to prevent collisions. Nothing has changed regarding ota from v3.10 to v3.20 so your steps should be the same so keep in mind the dependencies across different SDKs. Please retrace your footsteps and try again.

    Jesu

  • Hello,

    I'm going to close this thread due to inactivity. If you have the same issue respond here. If you have a new issue create a new thread.

    Jesu

  • Hello Jesu

    Sorry for not responding timely, the issue has been resolved and it was due to the "public write" flag being unchecked while signing the mcuimg in my case, so the mcuimg was not writable after extraction from the tar file. I understand that was my mistake, but I would recommend you a change in the ota guide in the SDK at the path I posted earlier, the screenshot of mcuimg signing doesn't show the same flag checked, so that is the apparent cause of my error and would like to get it corrected from your side.

    Thank you very much for your efforts and timely help. Much appreciated!

    Best regards,

    Bhupendra.

  • Thanks Bhupendra.

    I will review this and submit an internal ticket for this.

    Jesu