CC3220SF Launch XL- Azure OTA Update over HTTP Client

Suresh 101 Reputation points
2021-04-06T13:58:06.18+00:00

Hi,

1) I am trying to do HTTP/s based OTA - Update using Azure SDK. (Please suggest any other best way to perform OTA over Azure SDK).

Able to compile and run "simplesample_http" example from Azure sdk <C:\ti\azure_cc32xx_4_10_01_01\examples\rtos\CC3220SF_LAUNCHXL\azure\simplesample_http>.

Based on this example (IOTHUB_CLIENT_LL), Is it possible to perform HTTP GET / POST operation, so that I can download the binary from the Azure -cloud?

I mean, looking for HTTPAPI_ExecuteRequest() equivalent API for IOTHUB_CLIENT_LL.

As I am new to Azure MOCKABLE AP,I not able to map the actual client API calls. Please give some reference to map azure MOCKABLE_FUNCTION APi to Actual HTTP / MQTT Client API.

2) Also, tried HTTP Client API direct accessing (from azure's httpapi_sl.c & httpapi.h). by taking the reference "uhttp" example code (C:\ti\azure_cc32xx_4_10_01_01\source\third_party\azure-iot-pal-simplelink\sdk\deps\uhttp\samples\uhttp_sample)

But I am facing the "HTTPAPI_OPEN_REQUEST_FAILED".

Please find the attached code snippet.

84869-azurehttp.txt

This way can I perform HTTP calls? If Yes, Where I am missing please guide me to override "HTTPAPI_OPEN_REQUEST_FAILED".

Regards,
Suresh

Azure Internet of Things
Azure IoT SDK
Azure IoT SDK
An Azure software development kit that facilitates building applications that connect to Azure IoT services.
228 questions
{count} votes

Accepted answer
  1. Suresh 101 Reputation points
    2021-04-16T06:21:09.997+00:00

    Hi Asergaz,

    Thanks for your support it helped me to get some clarity about OTA-Implementation. Please suggest few more points below.

    1. To download a file from Azure storage blob, is it required to connect using connection string? Example how we are connecting to IOT-HUB using connection string.
    2. As of now we are using HTTP- to download blob storage. Is MQTT available in Azure IoT C SDK to download a binary from azure storage blob?, does azure storage blob support binary downloading using MQTT in chunks?

    Regards,
    Suresh


2 additional answers

Sort by: Most helpful
  1. Suresh 101 Reputation points
    2021-04-08T10:13:58.12+00:00

    Hi Asergaz ,

    Thanks for you response,

    I am using SimpleLink CC32XX SDK Azure IoT Plugin 4.10.01.01 SDK (for TI - CC3220SF- LaunchXL board). Refer release_notes_azure_cc32xx_4_10_01_01.html & HTTP example simplesample_http.c.

    My point 2 - (HTTP Client API direct accessing) is working and able to perform HTTP-GET operation. (due to TLS authentication didn't work my sample code before).

    My point 1 - (with MOCKABLE API) still I am not clear. I understand that, some of the MOCKABLE API's like IoTHubClient_LL_CreateFromConnectionString to establish MQTT/ HTTP protocol by using connection string.

    But If I wanted to perform HTTP-GET operation with IOTHUB_CLIENT_LL, what will be the HTTPAPI_ExecuteRequest() equivalent MOCKABLE API and how I am going to select HTTP-Methods(POST / GET / DELETE etc).
    Please give help me to get more info.

    Regards,
    Suresh

    1 person found this answer helpful.
    0 comments No comments

  2. António Sérgio Azevedo 7,671 Reputation points Microsoft Employee Moderator
    2021-04-10T00:07:44.633+00:00

    For point 1. Did you check this doc already? It is part of the C-SDK which is used by SimpleLink CC32XX SDK Azure IoT Plugin 4.10.01.01 SDK (for TI - CC3220SF- LaunchXL board).

    https://github.com/Azure/azure-iot-sdk-c/blob/master/iothub_client/devdoc/requirement_docs/iothubhttptransport_requirements.md

    86452-image.png


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.