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/CC3220SF-LAUNCHXL: CC3220SF-LAUNCHXL

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

Tool/software: Code Composer Studio

Hello,

I have gone through many forum discussions but still haven't found a clear document / answer explaining how to use local_ota feature in a orderly manner.

What i have understood till now is

a. Open the zipped local_ota uniflash project and add the latest mcuflashimg.bin of local_ota examle project.

b. Flash this to the controller.

c. Remove the mcuflashimg.bin file from the uniflash local_ota project and add a 2ndImage.bin file and create .tar file.

d. I have to update the .tar file in the local html page.

I have 2 questions regarding this topic.

1) Is my understanding of the local_ota concept correct? if not please correct me.

2) Can you please tell me how can I open this HTML page?

Bijoor.

  • Hi,

    Steps a+b are correct.

    for C, I would suggest that for the OTA you will create a new uniflash project that will only include the files that you want to replace/add (e.g. just MCU image).

    The HTML just helps the user reading the device version and status (of the simplelink device) using HTTP GET requests, to find the tar file on the client's local storage and to send it to the device using HTTP POST request.

    If you know the file you want to send in advance (and you don't care about the current state of the device or the progress bar) - you can avoid the entire HTML page and just send the HTTP Post ("/ota") with the tar file as the payload.

    What do you mean by opening the html? you can open it in a browser from a PC when the HTTP server is turned on ("<simplelink-address>/ota.html").

    If you want to check (or update) the content of the file, you can load it from the uniflash project (i.e. in Uniflash, in "user files", find the file and click the "Get File").

    Br,

    Kobi 

  • Will check the same and get back to you ASAP. As of now I am stuck creating the local ota project and successfully flashing to launch pad using uniflash.

  • Hello Kobi,

    I have flashed the device with example local_ota project using uniflash local_ota.zip project. Attaching the project for your ref. cc3220sf_local_ota_tirtos_desk01_200522110931.zip

    My project is in development mode with latest playground certificates. Now everything setup i am trying to open the ota.html browser . I have connected both my laptop and mobile to the same wifi network to which cc3220sf device is connected. But when i open the browser and enter  http://192.168.1.102/ota.html the browser displays a error message saying 'This site cant be reached, takes too long to respond' connection timedout. Is my url wrong?
    Do i have to change certificate settings in my .c/.h files also? since we are using new playground certificates in uniflash project.
    attaching my local_ota project for your reference.

    local_ota_CC3220SF_LAUNCHXL_tirtos_ccs.zip

  • Did you change anything in the original code or remove anything from the user-files of the local_ota project?

    Where did you get the 192.168.1.102 address? do you see it in the terminal log?

    What is IP address of the device that runs the browser?

    Did you configure any certificate for the HTTP Server? the default works as non-secure HTTP connection.

    Br,

    Kobi

  • Hello Kobi,

    I have just changed the wifi user name and password in local_ota.h file.
    Also I have removed certificates  "ca-priv-key.der"  and "ca_in_cert_store"  from the uniflash project and added playground certificates from latest sdk version simplelink_cc32xx_sdk_4_10_00_07.

    Yes I see this ip adress on the serial port terminal (screenshot below)

    Also attaching both my ccs and uniflash projects for your reference.

    cc3220sf_local_ota_tirtos_desk02_200522172225.zip

    2068.local_ota_CC3220SF_LAUNCHXL_tirtos_ccs.zip

    ,
    Bijoor.

  • Hello Kobi,

    I have created a entirely new workspace and flashed the bin files without renaming the projects. I was able to create flash local ota project and access the ota.html page.
    Now i am facing issues with Getting OTA update. I created tar project using dummy_ota_vendor_key.der as OTA Private Key File from \simplelink_cc32xx_sdk_4_10_00_07\tools\cc32xx_tools\ota-example-cert and the .tar file is getting transnferred to controller successfully. But it looks like the bootloader is not taking over the new .bin file. Attaching the uart logs and .tar files for your reference.

    
    
                     =================================================
                               local ota Example Ver. 1.00.00.10
                     =================================================
    
    
    
    [WLAN EVENT] STA Connected to the AP: EB_DEMO ,BSSID: b0:4e:26:ed:65:6c
    [NETAPP EVENT] IP Acquired: IP=192.168.1.103 , Gateway=192.168.1.1
    [NETAPP EVENT] IP Acquired: IP=192.168.1.103 , Gateway=192.168.1.1
    [Local ota task] ConfigureHttpServer for secured mode...
    [Local ota task] HTTP Server Stopped
    [Local ota task] HTTP Server Re-started
    [Local ota task] Device is configured in default state
    [Local ota task] SimpleLinkInitCallback: started in role 0
    [Provisioning task] detected device is CC3220SF
    [Local ota task] Host Driver Version: 3.0.1.61
    Build Version 3.15.0.1.31.2.0.0.0.2.2.0.7
    [Local ota task] WlanConnect SSID=EB_DEMO
    [WLAN EVENT] STA Connected to the AP: EB_DEMO ,BSSID: b0:4e:26:ed:65:6c
    [NETAPP EVENT] IP Acquired: IP=192.168.1.103 , Gateway=192.168.1.1
    [Local ota task] Pinging gateway, please wait...
    [Local ota task] pinging to gateway succeeded
    [Local ota task] waiting for new ota upload...
    [SOCK ERROR] an event received on socket 0
    [SOCK ERROR] Recoverable error occurred during the handshake -708
    [SOCK EVENT] - Unexpected Event [20x]
    
                                         [Link local task] HTTP PUT Request
    [Link local task] characteristic is: filename
    [Link local task] value is: 20200526170351_CC3220SF_cc3220sf_local_ota_tirtos.tar
    [Provisioning task] detected device is CC3220SF
    [Link local task] Received OTA filename 20200526170351_CC3220SF_cc3220sf_local_ota_tirtos.tar, len = 337920
    [OtaArchive_Init] OTA archive version = OTA_ARCHIVE_2.0.0.4
    [    OtaArchive_CheckVersion] current version str = 20180503150640
    [    OtaArchive_CheckVersion] new     version str = 20200526170351
        OtaArchive_CheckVersion: newer version update - 20200526170351
    [_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/mcuflashimg.bin, sig_len=256, SHA_256_Digets=086ee16018386a71dfa03af977727d356e1b1e2f5713111ed109bcbbf181b319,  cert=dummy-root-ca-cert, secured=1, bundle=1
    [_BundleCmdFile_Parse]    bundle cmd file=/www/css/style.css, sig_len=0, SHA_256_Digets=40269725b8af3f678e58444efc21de7640988932ca891432bf699d26dc73b65f,  cert=, secured=0, bundle=1
    [_BundleCmdFile_Parse]    bundle cmd file=/www/help.html, sig_len=0, SHA_256_Digets=3e3b36240749d60e5fd1ecf4b8737f3df155a2b91eb4e8a267a4653b6a58d9ba,  cert=, secured=0, bundle=1
    [_BundleCmdFile_Parse]    bundle cmd file=/www/images/icons/help.png, sig_len=0, SHA_256_Digets=81d79e4b38391e7d3bbbe825d639ca9a4bae777bb1f792d6805e8616a3c7d71d,  cert=, secured=0, bundle=1
    [_BundleCmdFile_Parse]    bundle cmd file=/www/images/icons/menu.png, sig_len=0, SHA_256_Digets=ec6173aa201099907edf035e11fd23462499f0642e8aaa967838fddad332c3be,  cert=, secured=0, bundle=1
    [_BundleCmdFile_Parse]    bundle cmd file=/www/images/icons/wireless.png, sig_len=0, SHA_256_Digets=e04e33b015cf29d69124eb970d410f21c96d72776131bff908fa41ded2b8f65f,  cert=, secured=0, bundle=1
    [_BundleCmdFile_Parse]    bundle cmd file=/www/images/icons/wirelessfull.png, sig_len=0, SHA_256_Digets=5ea6198e7f4d1ea4d4a6317696a5d10e602797904b3a00262e02323999d7b3c4,  cert=, secured=0, bundle=1
    [_BundleCmdFile_Parse]    bundle cmd file=/www/images/tilogo.gif, sig_len=0, SHA_256_Digets=3e59f665ba3876aafbc0b124459df996dc85c9bc7533df63b670ba19228e2d1e,  cert=, secured=0, bundle=1
    [_BundleCmdFile_Parse]    bundle cmd file=/www/index.html, sig_len=0, SHA_256_Digets=d7bf04dad7a65d22ff3d44d5d0caadb4da79ffa838efa2a9bbed6deaa2a3ca4e,  cert=, secured=0, bundle=1
    [_BundleCmdFile_Parse]    bundle cmd file=/www/js/jquery.min.js, sig_len=0, SHA_256_Digets=22642f202577f0ba2f22cbe56b6cf291a09374487567cd3563e0d2a29f75c0c5,  cert=, secured=0, bundle=1
    [_BundleCmdFile_Parse]    bundle cmd file=/www/js/scripts.js, sig_len=0, SHA_256_Digets=499033372e66443a41a9d407717ed82da66550b1ff067549cfe88b0c058e1f9b,  cert=, secured=0, bundle=1
    [_BundleCmdFile_Parse]    bundle cmd file=/www/ota.html, sig_len=0, SHA_256_Digets=d37906f095315cef812fd491f6406725816b0684adb2734604bd332c700c15e7,  cert=, secured=0, bundle=1
    [_BundleCmdFile_Parse]    bundle cmd file=/www/settings.html, sig_len=0, SHA_256_Digets=a7ef881e185e778773b9f56379e8b5d19181ce35fb33f714ffa57b8d8d30b2b9,  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=/sys/servicepack.ucf, sig_len=256, SHA_256_Digets=2f75616db04cb1525d8060671ebe0123a1079757fb446a7ab4177aa9884c5e56,  cert=, secured=1, bundle=1
    [OtaArchive_RunParseTar]   Create/Open for write file dummy-root-ca-cert
    
     Hash verification succeeded.
        Total archive file bytes 10191.
    OtaArchive_RunParseTar: 1 files that are mentioned in the ota.cmd were saved
    [OtaArchive_RunParseTar] Downloading File Completed - Size=975
    [OtaArchive_RunParseTar]   Create/Open for write file /sys/mcubootinfo.bin
    
     Hash verification succeeded.
        Total archive file bytes 10768.
    OtaArchive_RunParseTar: 2 files that are mentioned in the ota.cmd were saved
    [OtaArchive_RunParseTar] Downloading File Completed - Size=16
    [OtaArchive_RunParseTar]   Create/Open for write file /sys/mcuflashimg.bin
    
     Hash verification succeeded.
        Total archive file bytes 118716.
    OtaArchive_RunParseTar: 3 files that are mentioned in the ota.cmd were saved
    [OtaArchive_RunParseTar] Downloading File Completed - Size=106940
    [OtaArchive_RunParseTar]   Create/Open for write file /www/css/style.css
    
     Hash verification succeeded.
        Total archive file bytes 148858.
    OtaArchive_RunParseTar: 4 files that are mentioned in the ota.cmd were saved
    [OtaArchive_RunParseTar] Downloading File Completed - Size=29562
    [OtaArchive_RunParseTar]   Create/Open for write file /www/help.html
    
     Hash verification succeeded.
        Total archive file bytes 150305.
    OtaArchive_RunParseTar: 5 files that are mentioned in the ota.cmd were saved
    [OtaArchive_RunParseTar] Downloading File Completed - Size=801
    [OtaArchive_RunParseTar]   Create/Open for write file /www/images/icons/help.png
    
     Hash verification succeeded.
        Total archive file bytes 152329.
    OtaArchive_RunParseTar: 6 files that are mentioned in the ota.cmd were saved
    [OtaArchive_RunParseTar] Downloading File Completed - Size=1289
    [OtaArchive_RunParseTar]   Create/Open for write file /www/images/icons/menu.png
    
     Hash verification succeeded.
        Total archive file bytes 154063.
    OtaArchive_RunParseTar: 7 files that are mentioned in the ota.cmd were saved
    [OtaArchive_RunParseTar] Downloading File Completed - Size=975
    [OtaArchive_RunParseTar]   Create/Open for write file /www/images/icons/wireless.png
    
     Hash verification succeeded.
        Total archive file bytes 155800.
    OtaArchive_RunParseTar: 8 files that are mentioned in the ota.cmd were saved
    [OtaArchive_RunParseTar] Downloading File Completed - Size=1176
    [OtaArchive_RunParseTar]   Create/Open for write file /www/images/icons/wirelessfull.png
    
     Hash verification succeeded.
        Total archive file bytes 157752.
    OtaArchive_RunParseTar: 9 files that are mentioned in the ota.cmd were saved
    [OtaArchive_RunParseTar] Downloading File Completed - Size=1080
    [OtaArchive_RunParseTar]   Create/Open for write file /www/images/tilogo.gif
    
     Hash verification succeeded.
        Total archive file bytes 165902.
    OtaArchive_RunParseTar: 10 files that are mentioned in the ota.cmd were saved
    [OtaArchive_RunParseTar] Downloading File Completed - Size=7182
    [OtaArchive_RunParseTar]   Create/Open for write file /www/index.html
    
     Hash verification succeeded.
        Total archive file bytes 167922.
    OtaArchive_RunParseTar: 11 files that are mentioned in the ota.cmd were saved
    [OtaArchive_RunParseTar] Downloading File Completed - Size=1010
    [OtaArchive_RunParseTar]   Create/Open for write file /www/js/jquery.min.js
    
     Hash verification succeeded.
        Total archive file bytes 252828.
    OtaArchive_RunParseTar: 12 files that are mentioned in the ota.cmd were saved
    [OtaArchive_RunParseTar] Downloading File Completed - Size=84380
    [OtaArchive_RunParseTar]   Create/Open for write file /www/js/scripts.js
    
     Hash verification succeeded.
        Total archive file bytes 256002.
    OtaArchive_RunParseTar: 13 files that are mentioned in the ota.cmd were saved
    [OtaArchive_RunParseTar] Downloading File Completed - Size=2562
    [OtaArchive_RunParseTar]   Create/Open for write file /www/ota.html
    
     Hash verification succeeded.
        Total archive file bytes 266179.
    OtaArchive_RunParseTar: 14 files that are mentioned in the ota.cmd were saved
    [OtaArchive_RunParseTar] Downloading File Completed - Size=9155
    [OtaArchive_RunParseTar]   Create/Open for write file /www/settings.html
    
     Hash verification succeeded.
        Total archive file bytes 283781.
    OtaArchive_RunParseTar: 15 files that are mentioned in the ota.cmd were saved
    [OtaArchive_RunParseTar] Downloading File Completed - Size=17029
    [OtaArchive_RunParseTar]   Create/Open for write file dummy_ota_vendor_cert.der
    
     Hash verification succeeded.
        Total archive file bytes 285286.
    OtaArchive_RunParseTar: 16 files that are mentioned in the ota.cmd were saved
    [OtaArchive_RunParseTar] Downloading File Completed - Size=614
    [OtaArchive_RunParseTar]   Create/Open for write file /sys/servicepack.ucf
    
     Hash verification succeeded.
        Total archive file bytes 331354.
    OtaArchive_RunParseTar: 17 files that are mentioned in the ota.cmd were saved
    [OtaArchive_RunParseTar] Downloading File Completed - Size=45146
    [OtaArchive_RunParseTar] End of archive...
    [Link local task] sl_extLib_OtaRun: ---- Download file completed 20200526170351_CC3220SF_cc3220sf_local_ota_tirtos.tar
    [Link local task] ota put done. status=0
    [Link local task] waiting for signal from report server
    [ota report task] Error accepting client connection, aborting progress bar...
    [Common] CC32xx MCU reset request
    

    20200526171542_CC3220SF_ota_tarfile_project01.tar

    20200526170351_CC3220SF_cc3220sf_local_ota_tirtos.tar

    I have tried both the tar files attached above and i have got the same logs. Please help me understand why am i facing this error.

    Bijoor,

  • I Have observed in cc3200sf_ota_logs_03.txt (attached above) that I am getting -708 error code at line 28 and when I debugged and checked I have observed that sl_Accept() in ota_report_server_task.c (line229) always returns -11 and hence 'acceptTrials' gets incremented until it crosses OTA_NUM_OF_ACCEPT_TRIALS where MCU resests. Hence the OTA progress never starts. I have not able to understand why am I getting -708 error code for sl_Accept. I have gone through the certificates I have used and as per my understands it shouldn't behave like this when playground certificates are use. My project and .tar files are attached in the above query.

    with regards,
    Bijoor.

  • Hello Roger,

    I observed that i was able to do local ota through my android device but am getting error code -708 when i do it through my system. tried it both in my office and personal laptop.

    Attaching the created .tar file which worked perfectly in android phone. Also attaching logs of local ota for both my .tar file and for the .tar file shared by you.

    Local_Ota_attachment.zip

    ~Bijoor

  • Hi Bijoor,

        $ grep 708 /usr/local/ti/simplelink_cc32xx_sdk_3_30_01_02/source/ti/drivers/net/wifi/errors.h
        #define SL_ERROR_BSD_ESEC_SOCKET_ERROR_E                                (-708L) /* error state on socket */
        $

    That error doesn't mean anything to me, but perhaps now you've a name for it, a forum search will turn up something.

    Cheers, Ralph.

  • the -708 relates to the acceptance of the report (progress bar) connection. 

    This error means that the connection was accepted in the TCP layer but failed during the SSL negotiation, so start by checking the certificates used for the report connection (on the localOta application, please refer to the "otaReportServerTask").

    Even if this fail, it should impact the OTA process - the report channel is optional.

    br,

    Kobi 

  • Hello Kobi,

    In my field application I have no way to confirm if my local ota image is flashed or not without ota.html UI.
    I have used the playground certificates for testing this from C:\ti\simplelink_cc32xx_sdk_3_30_01_02\tools\cc32xx_tools\certificate-playground

    Can you please help me to create certificates so that i can test the same with certificates created by me.

    ~Bijoor

  • Hi Bijoor,

    The problem may be related to the use of the playground certificate. The browser may fail when it authenticate the server (in this case the device is the server) since playground are dummy certificate and are not signed by a valid root CA (maybe the android ignores this, but the browser/OS on your PC breaks the SSL connection).

    If this is issue, you can do one f the following:

    1. Use a valid (bought) certificate that is signed by root CA in the browser certificate store.

    2. You can add (temporary) the playground root CA to the certificate manager used by your browser.

    3. Use a non-secure connection (i.e. change the code)

    if this is not the problem, you can try to capture NWP log so we can have more info on the internal error. See chapter 20.1 in http://www.ti.com/lit/ug/swru455j/swru455j.pdf

    Br,

    Kobi

    Br,

    Kobi