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.

CC3235SF: OTA with private git repo fails on RecvSkipHdr

Part Number: CC3235SF

Hi! I created a test repo on git to see if I could download OTA files. I managed to do so when the repo is set to public, but it only gives an error when it's set to private. Here is the output:

CdnGithub_SendReqDir: uri=/repos/---/TI_OTA_Test/contents/

HttpClient_RecvSkipHdr: http error code HTTP/1.1 404

CdnGithub_ParseRespDir: ERROR HttpClient_RecvSkipHdr, status=-20310

OTA_run: ERROR CdnClient_ReqOtaDir, Status=-20310

I have tried creating a Git Token and inserting it in "otauser.h"->OTA_VENDOR_TOKEN (even tried the base64 format), but this does not work for either public or private (though it gives http errors 403 or 400 depending on the settings). Clearly I'm missing something, but everything works except for the authorization/credentials for the private repo. Thankful for any help I can get!

Kind regards
David 

  • In SDK6.10 we demonstrate the OTA access through the MQTT Example (check the application README for instructions to enable the OTA).

    The example contains a client for Dropbox and for github (see under "ifmod/ota_vendor_github.c").

    The github client shows the use the VENDOR_TOKEN.

  • Hi, I tried importing parts of the OTA from the mqtt_client project into our project instead and got it to work completely for a public git server, but not for a private one. I looked through the README and created the token as instructed, no expiration date, no "scope" selected, and converted to base64. 

    So, I can: 

    1. Connect
    2. Get the download link
    3. Download the tar
    4. Install the files
    5. Reset the device
    6. Confirm that there is a Commit Pending
    7. Commit the new Image
    8. (Then it tries downloading again until it sees that the "new" image is the same as the old)

    [OTA::DEBUG] OTA_IF STATUS = 4
    [IFX::INFO]  Trigger OTA...(button press)
    [OTA::DEBUG] ...OTA image is PENDING_COMMIT
    [IFX::INFO]  Starting Cloud OTA
    [IFX::INFO]  OTA_NOTIF_IMAGE_PENDING_COMMIT
    [OTA::DEBUG] OTA_IF STATUS = 5
    [OTA::INFO]  OTA_IF_commit: OTA succeeded - new image is committed!
    [OTA-GITHUB::INFO]  *** Attempting GITHUB getDownloadLink ***
    [OTA-GITHUB::INFO]  === Sending GET Request ===
    
    ...
    
    [OTA-GITHUB::DEBUG] GithubResponseParser: Key Not Found (processed=865)
    [OTA-GITHUB::DEBUG] GithubResponseParser: read chunk (read=51)
    [OTA-GITHUB::DEBUG] GithubResponseParser: Key Not Found (processed=17)
    [OTA-GITHUB::INFO]  *** No new image was found!!! ***
    [OTA::DEBUG] Download Link Failure!
    [IFX::ERROR] OTA_NOTIF_GETLINK_ERROR (-35000)
    [OTA::DEBUG] OTA_IF STATUS = 6
    [SOCK ERROR] - TX FAILED  :  socket 5 , reason (-9)

    But if I take the git repo private, I only get the "404 error"

    [OTA::DEBUG] ...OTA image is not PENDING_COMMIT
    [IFX::INFO]  Trigger OTA...(button press)
    [IFX::INFO]  Starting Cloud OTA
    [OTA-GITHUB::INFO]  *** Attempting GITHUB getDownloadLink ***
    [OTA-GITHUB::INFO]  === Sending GET Request ===
     uri: /repos/-----/-----/contents/ota
    [OTA-GITHUB::DEBUG] HTTP Response Status Code: 404
    [OTA-GITHUB::ERROR] HTTP Response Error: 404
    [OTA::DEBUG] Download Link Failure!
    [IFX::ERROR] OTA_NOTIF_GETLINK_ERROR (-404)
    [OTA::DEBUG] OTA_IF STATUS = 6

  • Found the issue. The instructions in the README file does not work for private repos, you have to click the "scope" that gives access to private repositories when you create the Git Token. Everything works well enough for me now at least.

    Thanks for the help!