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.

How to use the OTA example

Other Parts Discussed in Thread: CC3220SF

how to connect? How to download firmware from github? How to upgrade?

  • Please refer to the README (in the example folder) and to the OTA Update document (https://www.ti.com/lit/pdf/swra510).

    Basically you will need to configure the library otauser.h to set your github account and the rebuild the library and the CloudOta app.

    Br,

    Kobi

  • hi Kobi:

       Certificates for Dropbox and Github:
             – Download the Dropbox and Github Root CA certificates (that is, ”DigCert_High_Assurance_CA.der”
            and “GoDaddy_class2_CA.der”)

        Where can I download these two certificates, I cannot find these two certificates( ”DigCert_High_Assurance_CA.der”
            and “GoDaddy_class2_CA.der”)

  • hi Kobi:

       When running CC3220SF, the following message will be printed. Could you tell me where is the configuration problem?

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

    SimpleLinkInitCallback: started in role 0
    Host Driver Version: 3.0.1.65
    Build Version 3.16.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.16.0.1
    ROM 0
    HOST 3.0.1.65
    MAC address: 4c:24:98:43:d3:e


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

    Provisioning Command Error, num:-2172

  • hi Kobi:

         Can you provide the SimpleLink™ Starter Pro software, I can’t download it on TI’s official website, thank you!

    Ken lai

  • You will need to use "DigCert_High_Assurance_CA.der" for the github.

    You can find it in DigiCert download site, or in your computer's certificate manager (e.g. in Windows you can type "certificate" in the Start Search and you'll find the certificate manger, then open the "Trusted Root Certification Authorities" to find the list of certificate and you can check the relevant one and copy it). 

    The -2172 error (see "<sdk-root>/source/ti/drivers/net/wifi/errors.h") means invalid parameter. See the provisioning examples and documentation to find the issue in your code.

    You can find the Starter Pro sources in https://www.ti.com/tool/WIFISTARTERPRO

    Br,

    Kobi

     

      

  • hi Kobi:

    I have find "DigCert_High_Assurance_CA.der" in Windows, thanks you

    Starter Pro sources in https://www.ti.com/tool/WIFISTARTERPRO.  I can't download from this site, can you send the APK to me, thank you

  • Why can't you download from there? what is the error you are getting?

    (i just verified that the download works)

    I can't send the sources or apk, it should be downloaded from the site after signing the legal agreement.

    Br,

    Kobi

  • hi Kobi:

    Because I am in China and cannot download software from google, you can download it abroad, so I want you to send me the APK, thank you

  • You can load the source code (3rd link) from TI.

    You should be able to build the application from it.

    If you still need the pre-built APK - I will need to look for it internally and check what the legal procedure to publish it. 

  • also you can try loading the apk from replication services (such as “https://downloadapk.net/SimpleLink-Wi-Fi-Starter-Pro.html” ).

    Br,

    Kobi

  • hi Kobi:

         I also can’t download the APK from this website and can’t open it (downloadapk.net/SimpleLink-Wi-Fi-Starter-Pro.html)

  • Ok, 

    Did you try to build the APK based on the source code?

    I'm still checking with our legal what other way we can publish the APK.

    Br,

    Kobi

  • hi Kobi:

    I have failed to build  the APK based on the source code!

    During the OTA upgrade process, the following errors appeared. What does -668 mean and how to configure github?

    HttpClient_Connect: ERROR Socket Connect, status=-688

  • We are still checking the legal aspects of releasing the APK.

    What is the issue you have with building it from the source files?

    -688 means you are using the wrong root CA to the server - please refer to chapter 2.5.1 in the Certificate Handling Guide for instructions for finding the required root CA.

    Br,

    Kobi

  • Hi Kobi:

          Prompt that there are missing files when the source file is built

         I downloaded the DigiCert High Assurance EV Root CA file from Chrome browser, but it still reported -456 error. I configured it according to 2.5.1 and 2.5.2. The others were not configured. Why? 

  • Hi Ken,

    As seen in the errors.h file of the SimpleLink Wi-Fi hos driver, -456 represents SL_ERROR_BSD_ESECBADCAFILE. You can find a description of this error and other common errors in Table 7-4 of our Network Processor Programmer's guide: www.ti.com/lit/swru455

    As stated in the guide, it seems there is an issue with the file you loaded. Please double check that the file you are using is valid.

    Best Regards,

    Ben M

  • Hi Ben:

        I can double-click to open "DigiCert High Assurance EV Root CA.der", and the displayed content is normal, so there should be no problem with the downloaded file


      I have a question, how to use the downloaded DER file, the description in file 2.5.2 is
    The downloaded root CA certificate must be installed to the file system
    How to install the downloaded root CA certificate to the file system?

  • Hi Ken!

    You can add the file to the file system using our ImageCreator tool. Take a look at the "Adding a User File" section of this SimpleLink Academy training we have:

    https://dev.ti.com/tirex/explore/node?node=ABEoqU9o3snoxDcmIpW0EA__fc2e6sr__LATEST

    Best Regards,

    Ben M

  • Hi Ben:

        I have added the file, but the error -456 is still reported, as shown in the figure below
       Can you provide a valid CA files,  please send me, thank you!

  • Hi Ben:

         The print information of the cloud_ota example is as follows: a -456 error is generated

    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=github.com
    OtaConfig: call OTA_set EXTLIB_OTA_SET_OPT_VENDOR_ID, VendorDir=ota
    OTA_run: call CdnClient_ConnectServer OTA server=github.com
    CdnClient_ConnectServer: HttpClient_Connect github.com
    HttpClient_Connect: IP_ADDR=52.74.223.119
    HttpClient_Connect: ERROR Socket Connect, status=-456
    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

  • Hi Ken,

    Can you share a screenshot of the General Certificate Information for the cert you are using? Or attach the cert as a file so I can inspect it?

    Best Regards,

    Ben M

  • Hi Ben:

        I tested the digital certificate on the following URL and found that there is no problem with the digital certificate
    https://www.digicert.com/help/


         And re-downloaded "DigiCert High Assurance EV Root CA" from here, still reported -456 error, so is there something wrong with the configuration, not the digital certificate

  • Hi Ben:

       Now encounter the following problems, the print information is as follows:

    OTA_run: call CdnClient_ConnectServer OTA server=api.github.com
    CdnClient_ConnectServer: HttpClient_Connect api.github.com
    HttpClient_Connect: IP_ADDR=192.30.255.117
    HttpClient_Connect: WARNING Socket Connect, status=-468, Ignored...
    OTA_run: CdnClient_ReqOtaDir, VendorDir=ota
    CdnGithub_SendReqDir: uri=/repos/tianyigithub/ota/contents/
    HttpClient_RecvSkipHdr: http error code HTTP/1.1 403
    CdnGithub_ParseRespDir: ERROR HttpClient_RecvSkipHdr, status=-20310
    OTA_run: ERROR CdnClient_ReqOtaDir, Status=-20310

    But my configuration is that the security authentication has been turned on, as shown below
    #define OTA_SERVER_SECURED 1

    How to deal with this problem?

  • Hi Ken,

    Please confirm my connection request and I will send you a direct message with a file to try. 
    I tested connecting with https to github.com and doing a get request using our device with this file and it works.

    Best Regards,

    Ben M

  • Hi Ben:

          I have downloaded your cert and compared it with the cert I used. There is no difference. When testing with your cert, the problem still exists


          How your github is configured, Is there a problem with my configuration? my github configuration is as follows.


    /* 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 "/tianyigithub/ota"
    #define OTA_VENDOR_TOKEN "9bf37f64be1c86eadd79d697012949b10cec58e4"
    #ifndef OTA_VENDOR_TOKEN
    #error "Please define your personal cloud account token in OTA_VENDOR_TOKEN above"
    #endif

    #define OTA_SERVER_ROOT_CA_CERT "DigiCert High Assurance EV Root CA.der"
    #define OTA_SERVER_AUTH_DISABLE_CERT_STORE

  • -456 can refer to a wrong path/file name for the root CA file (assuming the content is ok).

    Please try to write the file with a short name (e.g. "digi.der") to the root folder of the file system (and update the otauser.h accordingly).

    Br,

    Kobi

  • Hi Kobi:

      The file cannot be renamed to "digi.der",
      And it still reports HTTP404 error. Is there any problem with the above configuration? I have changed OTA_SERVER_NAME to "github.com"


    The current printing information is as follows:
    HttpClient_Connect: WARNING Socket Connect, status=-468, Ignored...
    OTA_run: CdnClient_ReqOtaDir, VendorDir=ota
    CdnGithub_SendReqDir: uri=/tianyigithub/ota/contents/
    HttpClient_RecvSkipHdr: http error code HTTP/1.1 404
    CdnGithub_ParseRespDir: ERROR HttpClient_RecvSkipHdr, status=-20310
    OTA_run: ERROR CdnClient_ReqOtaDir, Status=-20310

  • you can decide about the name of the file on the file system.

    However, "-468" means that the certificate file is ok.

    The 404 error relates to the OTA_VENDOR_ROOT_DIR - it should look like with "/repos/<projectname>/<root-folder>" - see the OTA documentation and the simplelink academy (https://dev.ti.com/tirex/explore/node?node=ACE5ggZRybEJNZUcnzc3ww__fc2e6sr__LATEST).

    Br,

    Kobi