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.

LAUNCHCC3220MODASF: Errors Encountered Running Cloud_OTA Example with Dropbox Server on Launch-CC3220MODASF Kit

Other Parts Discussed in Thread: CC3220SF, UNIFLASH

Hey everyone,

I am attempting to run the cloud_ota example on my Launch-CC3220MODASF development kit using a Dropbox server. I believe I've configured everything correctly, but encountered the following errors.

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

SimpleLinkInitCallback: started in role 0
Host Driver Version: 3.0.1.61
Build Version 3.15.0.1.31.2.0.0.0.2.2.0.7

==================================

Provisioning Example Ver. 1.0.16
==================================

CHIP 0x31000019
MAC 31.2.0.0.0
PHY 2.2.0.7
NWP3.15.0.1
ROM 0
HOST 3.0.1.61
MAC address: 10:ce:a9:47:bc:8f

Starting Provisioning! mode=2 (0-AP, 1-SC, 2-AP+SC, 3-AP+SC+WAC)

[Provisioning] Smart Config Synced!
[Provisioning] Profile Added: SSID: ALHN-EA2E
[Provisioning] Profile confirmation: WLAN Connected!
[Provisioning] Profile confirmation: IP Acquired!
[Provisioning] Profile Confirmation Success!
[Provisioning] Provisioning Application Ended Successfully

Provisioning stopped: Current Role: STA
WLAN Status: CONNECTED
Connected to SSID: ALHN-EA2E
DHCP is ON
IP 192.168.1.88
MASK 255.255.255.0
GW 192.168.1.254
DNS 192.168.1.254
Pinging GW...!
Ping done. Success rate: 100%

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: 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=OTA_CC3220SF
OTA_run: call CdnClient_ConnectServer OTA server=api.dropboxapi.com
CdnClient_ConnectServer: HttpClient_Connect api.dropboxapi.com
[ERROR] - FATAL ERROR: Driver Abort detected.
HttpClient_Connect: ERROR sl_NetAppDnsGetHostByName, status=-2005
CdnClient_ConnectServer: ERROR HttpClient_Connect, Status=-20301
OTA_run: ERROR CdnClient_ConnectServer, Status=-20301

_OtaCheckConsecutiveErrors: ConsecutiveOtaErrors=1/5, return only WARNNING
OtaRunStep: WARNING Ota_run, Status=20006, continue fornext OTA retry

Test failed: State = 6, Event = 17
Event handler failed..!!


Below is my stepwise configuration setup. Please review for any issues in any steps.

1. I set up a Dropbox account and included a developer app (for which I obtained a token); it appears like this.



      Here I am using a generated access token as $OTA\_VENDOR\_TOKEN$. Is this step correct? If not, how can I generate $OTA\_VENDOR\_TOKEN$ using the generated access token, app key, and app secret?

2.  I now have a folder in my Dropbox account named FLECK_TEST_OTA_1, similar to my app in my developer's account. I created a folder inside it named OTA_CC3220SF, to correspond with the vendor directory       

      specified in otauser.h in the cloud_ota example. The definition is as follows: #define OTA_VENDOR_DIR "OTA_CC3220SF"

3. In otauser.h I defined the OTA_VENDOR_TOKEN  (Generated access token) I also defined SL_ENABLE_OTA_DEBUG_TRACES and DISABLE_OTA_SWITCH_TRIGGER in otauser.h and cloud_ota.c, as described in

      the instructions and build the cloud_ota project

otauser.h



4. my uniflash setup attach below

                      






5. My .tar file is attached. Please review if anything is missing.

5482.20240310081436_CC3220SF_OTA.tar


I am following this documentation.

https://software-dl.ti.com/ecs/SIMPLELINK_CC3220_SDK/1_50_00_06/exports/docs/simplelink_mcu_sdk/Over_The_Air_Update_Guide.html#fig.-22:-OTA-Apps-Diagram



  • what SDK are you using?

    if you are just starting with ota - please use the ota_if  from sdk6 or 7. it is demonstrated and explained in the mqtt_client example.

    please build the ota library with SL_ENABLE_OTA_DEBUG_TRACES enabled (in otauser.h).

  • Hi,

    we are using simplelink_cc32xx_sdk_4_10_00_07. Sorry, our project is in the final stage so we can't switch to the latest SDK versions. Currently, we are working with cloud OTA sample code on this SDK.

    we tried some modifications such as increasing MAX_VENDOR_TOKEN_SIZE from 96 to 160 due to the recent change in the length of the Dropbox access token by referring to this E2E link.

     CCS/CC3220SF: Recent dropbox access token changes may require updates to TI OTA feature. 

    And modify the otauser.h file to define both certificates as shown in the following  by referring to this e2e link

    (+) CC3220SF: Need help troubleshooting OTA failure - Wi-Fi forum - Wi-Fi - TI E2E support forums

     #define OTA_SERVER_ROOT_CA_CERT              "digicerthighassuranceevrootca.crt"
     #define OTA_FILE_SERVER_ROOT_CA_CERT       "DigiCertGlobalRootCA.crt"

    Are the above steps correct?
    then we encountered another error like this

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

     SimpleLinkInitCallback: started in role 0
    Host Driver Version: 3.0.1.61
    Build Version 3.15.0.1.31.2.0.0.0.2.2.0.7
    STA connected to AP Inthings, BSSID is 14:a7:2b:74:db:d1
    IPv4 acquired: IP = 192.168.1.10
    Gateway = 192.168.1.1
    Pinging GW...!
    Ping done. Success rate: 100%

    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: 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=7800, 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_CC3220SF
    OTA_run: call CdnClient_ConnectServer OTA server=api.dropboxapi.com
    CdnClient_ConnectServer: HttpClient_Connect api.dropboxapi.com
    HttpClient_Connect: IP_ADDR=162.125.81.19
    SL_SOCKET_ASYNC_EVENT socket event 2, do restart
    HttpClient_Connect: ERROR Socket Connect, status=-688
    CdnClient_ConnectServer: ERROR HttpClient_Connect, Status=-20304
    OTA_run: ERROR CdnClient_ConnectServer, Status=-20304 

    _OtaCheckConsecutiveErrors: ConsecutiveOtaErrors=1/5, return only WARNNING
    OtaRunStep: WARNING Ota_run, Status=20006, continue fornext OTA retry

    ProcessRestartMcu: reset the platform...

  • -688 means you are using the wrong root CA for the connection (see "chapter 2.5.1 Finding a Server’s Root CA" in cc32xx certificate handling guide).

    The step you did seems correct (assuming the new root ca file is programmed to the file-system).

    The OTA_IF (available in SDK 6.10/7.10) simplifies all these - and leaves such changes to the application code (instead of the library).

    Note that currently we have another known issue working with Dropbox (i.e. through the first negotiation after the connection succeed). It is currently in debug. So you better test the Github first. And remember that both Github and Dropbox are provided as reference only - we recommend that you will use a more reliable cloud server for IOT use (as an IOT device we have limited resources eg. to keep multiple certificates and thus changes in the server must be known to the client in advance - Dropbox and Github are not focused on these kind of devices and have frequent updates).

  • Hi,
    I revised cloudota.c as per the cc32xx certificate handling guide and received the following information.

    HttpClient_Connect: IP_ADDR=162.125.81.19
    SL_SOCKET_ASYNC_EVENT: ERROR - WRONG ROOT CA
    Please install the following Root Certificate:
    DigiCert Global Root CA
    HttpClient_Connect: ERROR Socket Connect, status=-688
    CdnClient_ConnectServer: ERROR HttpClient_Connect, Status=-20304
    OTA_run: ERROR CdnClient_ConnectServer, Status=-20304

    _OtaCheckConsecutiveErrors: ConsecutiveOtaErrors=1/5, return only WARNNING
    OtaRunStep: WARNING Ota_run, Status=20006, continue fornext OTA retry

    otauser.h




    Previously, you mentioned that Dropbox and GitHub are not reliable. In fact, our project's cloud platform is Azure IoT Blob Storage. Can I directly upload the OTA .tar file to Azure IoT Blob Storage, create a URL, and use this URL in the CloudOTA sample code by defining #define OTA_SERVER_TYPE OTA_FILE_DOWNLOAD?

    Can you assist in creating the ota.tar file and identify which certificates are used as OTA_SERVER_ROOT_CA_CERT?

  • regarding the first question - the answer is yes: use OTA_FILE_DOWNLOAD and set the URL with OTA_set(EXTLIB_OTA_SET_OPT_FILE_SERVER_URL...).

    For the OTA_SERVER_ROOT_CA_CERT - if Azure doesn't provide the info - you can use the same method (i.e. set any root CA and look for the error code with the requested certificate).

  • Hi,

    We tried the OTA_FILE_DOWNLOAD method by commenting the OTA_SERVER_ROOT_CA_CERT section. Then, using CloudOTA on CCS debug mode, it was successful. The logs are attached below.

    *******************************************************************************
                      OTA APP Application - Version 0.10.00.03        
    ********************************************************************************
    
    SimpleLinkInitCallback: started in role 0
    Host Driver Version: 3.0.1.61
    Build Version 3.15.0.1.31.2.0.0.0.2.2.0.7
    
    
    
    ==================================
     Provisioning Example Ver. 1.0.16
    ==================================
    
     CHIP 0x31000019
     MAC  31.2.0.0.0
     PHY  2.2.0.7
     NWP3.15.0.1
     ROM  0
     HOST 3.0.1.61
     MAC address: 10:ce:a9:47:bc:8f
    
    
     Starting Provisioning! mode=2 (0-AP, 1-SC, 2-AP+SC, 3-AP+SC+WAC)
    
     [Provisioning] Smart Config Synced!
     [Provisioning] Profile Added: SSID: Inthings
     [Provisioning] Profile confirmation: WLAN Connected!
     [Provisioning] Profile confirmation: IP Acquired!
     [Provisioning] Profile Confirmation Success!
    [Provisioning] Provisioning Application Ended Successfully 
     
     Provisioning stopped: Current Role: STA
                           WLAN Status: CONNECTED
                           Connected to SSID: Inthings
            DHCP is ON 
            IP      192.168.1.10 
            MASK    255.255.255.0 
            GW      192.168.1.1 
            DNS     103.94.136.10
    Pinging GW...!
    Ping done. Success rate: 100%
    
    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: 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=7800, 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
    OTA_run: Call CdnClient_ConnectFileServer, url = https://onesensetestdeviceupdate.blob.core.windows.net/deviceupdate-3/20240313123751_CC3220SF_OTA.tar?sv=2020-04-08&se=2024-03-15T05%3A33%3A34Z&sr=b&sp=r&sig=SDaeEb5%2Fg94wa5sj50g%2F0J8VeS%2B1KrSXDjCN1%2Bg8OIE%3D
    HttpClient_Connect: IP_ADDR=20.60.72.36
    HttpClient_Connect: WARNING Socket Connect, status=-453, Ignored...
    OTA_run: Call CdnClient_ReqFileContent, url = https://onesensetestdeviceupdate.blob.core.windows.net/deviceupdate-3/20240313123751_CC3220SF_OTA.tar?sv=2020-04-08&se=2024-03-15T05%3A33%3A34Z&sr=b&sp=r&sig=SDaeEb5%2Fg94wa5sj50g%2F0J8VeS%2B1KrSXDjCN1%2Bg8OIE%3D
    OtaArchive_RunParse: set state=ARCHIVE_STATE_PARSE_HDR
    OtaArchive_RunParseTar: parsing archive file header
    OtaArchive_RunParseTar: filetype=5, directory=20240313123751_CC3220SF_OTA/
    OtaArchive_RunParseTar: parsing archive file header
    OtaArchive_RunParseTar: filetype=5, directory=20240313123751_CC3220SF_OTA/0/
    OtaArchive_RunParseTar: parsing archive file header
    OtaArchive_RunParseTar: filetype=5, directory=20240313123751_CC3220SF_OTA/1/
    OtaArchive_RunParseTar: parsing archive file header
    OtaArchive_RunParseTar: filetype=5, directory=20240313123751_CC3220SF_OTA/2/
    OtaArchive_RunParseTar: parsing archive file header
    OtaArchive_RunParseTar: FileType=0, FileName=ota.cmd, FileSize=2144
    [_BundleCmdFile_Parse]    bundle cmd file=/sys/mcuflashimg.bin, sig_len=256, SHA_256_Digets=0d8b432d50d013381913eec3c948794c22c49b2fa2ddb9cace7a28604be60a1a,  cert=dummy-root-ca-cert, secured=1, bundle=1
    [_BundleCmdFile_Parse]    bundle cmd file=digicertglobalrootg2.crt, sig_len=0, SHA_256_Digets=cb3ccbb76031e5e0138f8dd39a23f9de47ffc35e43c1144cea27d46a5ab1cb5f,  cert=, secured=0, bundle=0
    [_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-trusted-ca-cert, sig_len=0, SHA_256_Digets=07ad6ba74b3921009edf184cb382c05a32baacf9c767f74427c094b2c56aa135,  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=0
    [_BundleCmdFile_Parse]    bundle cmd file=/sys/servicepack.ucf, sig_len=256, SHA_256_Digets=2f75616db04cb1525d8060671ebe0123a1079757fb446a7ab4177aa9884c5e56,  cert=, secured=1, bundle=1
    OtaArchive_RunParseTar: parsing archive file header
    OtaArchive_RunParseTar: skip block align  RecvBufLen=620, SkipAlignSize=417
    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=111884
       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 1118 to file /sys/mcuflashimg.bin total 23550.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 24990.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcg.bin total 26430.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 2787uflashim0.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 29310.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 30750.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 32190.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 33630.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 35070.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 36510.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 37950.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 39390.
    OtaArchive_RunParseTar: Write size 1016 to file /sys/mcuflashimg.bin total 40406.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 41846.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 43286.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 44726.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 46166.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 47606.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 49046.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 50486.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 51926.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 53366.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 54806.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 56246.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 57686.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 59126.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 60566.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 62006.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 63446.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 64886.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 66326.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 67766.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 69206.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 70646.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 72086.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 73526.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 74966.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 76406.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 77846.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 79286.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 80726.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 82166.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 83606.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 85046.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 86486.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 87926.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 89366.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 90806.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 92246.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 93686.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 95126.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 96566.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 98006.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 99446.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 100886.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 102326.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 103766.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 105206.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 106646.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 108086.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 109526.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/mcuflashimg.bin total 110966.
    OtaArchive_RunParseTar: Write size 918 to file /sys/mcuflashimg.bin total 111884.
    
     Hash verification succeeded.
        Total archive file bytes 120076.
    OtaArchive_RunParseTar: 2 files that are mentioned in the ota.cmd were saved
    OtaArchive_RunParseTar: Downloading File Completed - Size=111884
    OtaArchive_RunParseTar: parsing archive file header
    OtaArchive_RunParseTar: skip block align  RecvBufLen=522, SkipAlignSize=244
    OtaArchive_RunParseTar: parsing archive file header
    OtaArchive_RunParseTar: FileType=0, FileName=digicertglobalrootg2.crt, FileSize=914
       Create/Open for write file digicertglobalrootg2.crt
    OtaArchive_RunParseTar: Write size 914 to file digicertglobalrootg2.crt total 914.
    
     Hash verification succeeded.
        Total archive file bytes 121746.
    OtaArchive_RunParseTar: 3 files that are mentioned in the ota.cmd were saved
    OtaArchive_RunParseTar: Downloading File Completed - Size=914
    OtaArchive_RunParseTar: parsing archive file header
    OtaArchive_RunParseTar: skip block align  RecvBufLen=1440, SkipAlignSize=110
    OtaArchive_RunParseTar: FileType=0, FileName=dummy-trusted-ca-cert, FileSize=970
       Create/Open for write file dummy-trusted-ca-cert
    OtaArchive_RunParseTar: Write size 818 to file dummy-trusted-ca-cert total 818.
    OtaArchive_RunParseTar: Write size 152 to file dummy-trusted-ca-cert total 970.
    
     Hash verification succeeded.
        Total archive file bytes 123338.
    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=1288, SkipAlignSize=54
    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 614 to file dummy_ota_vendor_cert.der total 614.
    
     Hash verification succeeded.
        Total archive file bytes 124518.
    OtaArchive_RunParseTar: 5 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=1440, SkipAlignSize=410
    OtaArchive_RunParseTar: FileType=0, FileName=/sys/servicepack.ucf, FileSize=45146
       Create/Open for write file /sys/servicepack.ucf
    OtaArchive_RunParseTar: Write size 518 to file /sys/servicepack.ucf total 518.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 1958.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 3398.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 4838.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 6278.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 7718.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 9158.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 10598.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 12038.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 13478.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 14918.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 16358.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 17798.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 19238.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 20678.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 22118.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 23558.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 24998.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 26438.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 27878.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 29318.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 30758.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 32198.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 33638.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 35078.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 36518.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 37958.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 39398.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 40838.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 42278.
    OtaArchive_RunParseTar: Write size 1440 to file /sys/servicepack.ucf total 43718.
    OtaArchive_RunParseTar: Write size 1428 to file /sys/servicepack.ucf total 45146.
    
     Hash verification succeeded.
        Total archive file bytes 170586.
    OtaArchive_RunParseTar: 6 files that are mentioned in the ota.cmd were saved
    OtaArchive_RunParseTar: Downloading File Completed - Size=45146
    OtaArchive_RunParseTar: parsing archive file header
    OtaArchive_RunParseTar: skip block align  RecvBufLen=1440, SkipAlignSize=422
    OtaArchive_RunParseTar: End of archive...
    _SaveOtaVersionFile: save version file also in the bundle, version=
    OTA_run: ---- Download file completed 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...
    
    



    The same CloudOTA bin file flashing through UniFlash is encountering some signature parsing errors. Detailed logs are attached below.

    ********************************************************************************
                      OTA APP Application - Version 0.10.00.03
    ********************************************************************************
    
    SimpleLinkInitCallback: started in role 0
    Host Driver Version: 3.0.1.61
    Build Version 3.15.0.1.31.2.0.0.0.2.2.0.7
    STA connected to AP Inthings, BSSID is 14:a7:2b:74:db:d1
    IPv4 acquired: IP = 192.168.1.10
    Gateway = 192.168.1.1
    Pinging GW...!
    Ping done. Success rate: 100%
    
    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: 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=7800, 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
    OTA_run: Call CdnClient_ConnectFileServer, url = https://onesensetestdeviceupdate.blob.core.windows.net/deviceupdate-3/20240313123751_CC3220SF_OTA.tar?sv=2020-04-08&se=2024-03-15T05%3A33%3A34Z&sr=b&sp=r&sig=SDaeEb5%2Fg94wa5sj50g%2F0J8VeS%2B1KrSXDjCN1%2Bg8OIE%3D
    HttpClient_Connect: IP_ADDR=20.60.72.36
    HttpClient_Connect: WARNING Socket Connect, status=-453, Ignored...
    OTA_run: Call CdnClient_ReqFileContent, url = https://onesensetestdeviceupdate.blob.core.windows.net/deviceupdate-3/20240313123751_CC3220SF_OTA.tar?sv=2020-04-08&se=2024-03-15T05%3A33%3A34Z&sr=b&sp=r&sig=SDaeEb5%2Fg94wa5sj50g%2F0J8VeS%2B1KrSXDjCN1%2Bg8OIE%3D
    OtaArchive_RunParse: set state=ARCHIVE_STATE_PARSE_HDR
    OtaArchive_RunParseTar: parsing archive file header
    OtaArchive_RunParseTar: filetype=5, directory=20240313123751_CC3220SF_OTA/
    OtaArchive_RunParseTar: parsing archive file header
    OtaArchive_RunParseTar: filetype=5, directory=20240313123751_CC3220SF_OTA/0/
    OtaArchive_RunParseTar: parsing archive file header
    OtaArchive_RunParseTar: filetype=5, directory=20240313123751_CC3220SF_OTA/1/
    OtaArchive_RunParseTar: parsing archive file header
    OtaArchive_RunParseTar: filetype=5, directory=20240313123751_CC3220SF_OTA/2/
    OtaArchive_RunParseTar: parsing archive file header
    OtaArchive_RunParseTar: FileType=0, FileName=ota.cmd, FileSize=2144
    [_BundleCmdFile_Parse]    bundle cmd file=/sys/mcuflashimg.bin, sig_len=256, SHA_256_Digets=0d8b432d50d013381913eec3c948794c22c49b2fa2ddb9cace7a28604be60a1a,  cert=dummy-root-ca-cert, secured=1, bundle=1
    [_BundleCmdFile_Parse]    bundle cmd file=digicertglobalrootg2.crt, sig_len=0, SHA_256_Digets=cb3ccbb76031e5e0138f8dd39a23f9de47ffc35e43c1144cea27d46a5ab1cb5f,  cert=, secured=0, bundle=0
    [_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-trusted-ca-cert, sig_len=0, SHA_256_Digets=07ad6ba74b3921009edf184cb382c05a32baacf9c767f74427c094b2c56aa135,  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=0
    [_BundleCmdFile_Parse]    bundle cmd file=/sys/servicepack.ucf, sig_len=256, SHA_256_Digets=2f75616db04cb1525d8060671ebe0123a1079757fb446a7ab4177aa9884c5e56,  cert=, secured=1, bundle=1
    OtaArchive_RunParseTar: parsing archive file header
    OtaArchive_RunParseTar: skip block align  RecvBufLen=620, SkipAlignSize=417
    OtaArchive_RunParseTar: parsing archive file header
    OtaArchive_RunParseTar: FileType=0, FileName=ota.sign, FileSize=72
    [_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
    
    OTA_run: Call CdnClient_ConnectFileServer, url = https://onesensetestdeviceupdate.blob.core.windows.net/deviceupdate-3/20240313123751_CC3220SF_OTA.tar?sv=2020-04-08&se=2024-03-15T05%3A33%3A34Z&sr=b&sp=r&sig=SDaeEb5%2Fg94wa5sj50g%2F0J8VeS%2B1KrSXDjCN1%2Bg8OIE%3D
    HttpClient_Connect: IP_ADDR=20.60.72.36
    HttpClient_Connect: WARNING Socket Connect, status=-453, Ignored...
    OTA_run: Call CdnClient_ReqFileContent, url = https://onesensetestdeviceupdate.blob.core.windows.net/deviceupdate-3/20240313123751_CC3220SF_OTA.tar?sv=2020-04-08&se=2024-03-15T05%3A33%3A34Z&sr=b&sp=r&sig=SDaeEb5%2Fg94wa5sj50g%2F0J8VeS%2B1KrSXDjCN1%2Bg8OIE%3D
    OtaArchive_RunParseTar, ERROR state ARCHIVE_STATE_PARSING_FAILED, User should not call init to restart the process 16787440
    OtaArchive_RunParseTar, ERROR state ARCHIVE_STATE_PARSING_FAILED, User should not call init to restart the process 16787440
    OtaArchive_RunParseTar, ERROR state ARCHIVE_STATE_PARSING_FAILED, User should not call init to restart the process 16787440
    OtaArchive_RunParseTar, ERROR state ARCHIVE_STATE_PARSING_FAILED, User should not call init to restart the process 16787440
    OtaArchive_RunParseTar, ERROR state ARCHIVE_STATE_PARSING_FAILED, User should not call init to restart the process 16787440
    OtaArchive_RunParseTar, ERROR state ARCHIVE_STATE_PARSING_FAILED, User should not call init to restart the process 16787440
    OtaArchive_RunParseTar, ERROR state ARCHIVE_STATE_PARSING_FAILED, User should not call init to restart the process 16787440
    OtaArchive_RunParseTar, ERROR state ARCHIVE_STATE_PARSING_FAILED, User should not call init to restart the process 16787440
    OtaArchive_RunParseTar, ERROR state ARCHIVE_STATE_PARSING_FAILED, User should not call init to restart the process 16787440
    OtaArchive_RunParseTar, ERROR state ARCHIVE_STATE_PARSING_FAILED, User should not call init to restart the process 16787440
    OtaArchive_RunParseTar, ERROR state ARCHIVE_STATE_PARSING_FAILED, User should not call init to restart the process 16787440
    OtaArchive_RunParseTar, ERROR state ARCHIVE_STATE_PARSING_FAILED, User should not call init to restart the process 16787440
    OtaArchive_RunParseTar, ERROR state ARCHIVE_STATE_PARSING_FAILED, User should not call init to restart the process 16787440
    OtaArchive_RunParseTar, ERROR state ARCHIVE_STATE_PARSING_FAILED, User should not call init to restart the process 16787440
    OtaArchive_RunParseTar, ERROR state ARCHIVE_STATE_PARSING_FAILED, User should not call init to restart the process 16787440
    OtaArchive_RunParseTar, ERROR state ARCHIVE_STATE_PARSING_FAILED, User should not call init to restart the process 16787440
    OtaArchive_RunParseTar


    Uniflash setup:



    My OTA .tar file uploaded on Azure Blob
    20240313123751_CC3220SF_OTA .tar


    Is any modification required?

  • I don't under why you commented out OTA_SERVER_ROOT_CA_CERT.

    if OTA_SERVER_TYPE == OTA_FILE_DOWNLOAD

    the OTA_SERVER_ROOT_CA_CERT is not defined.

    The error you got is with the image signature.

    When building a secure OTA image you need to sign it with a private key.

    In our example it works with "tools\cc32xx_tools\ota-example-cert\dummy_ota_vendor_key.[der/pem]".

    In such case you will need to have "dummy_ota_vendor_cert.der" in the file-system (for verification).

    If you use your own certificate pair and the certificate is written inot other path or name - you should replace "OTA_CERTIFICATE_NAME" (in OtaArchive.c) and rebuild the ota library.

  • Hi,

    Thanks for your valuable support :)

    Now the OTA is successful with the Baltimore Trust Root Certificate as OTA_SERVER_ROOT_CA_CERT