Firmware upgrade using MQTT from Azure cloud

Katam, Harish 11 Reputation points
2021-03-11T09:43:05.563+00:00

Hi,

We wanted to migrate our device to Azure from AWS, we have downloaded Azure SDK and checked the examples for CC3220SF. I did not see any example for the OTA (over the air) firmware upgrade for CC3220SF device, I request you to share the example for OTA with Azure using MQTT. Let me know any OTA agent support for the azure is available (Like AWS OTA agent).

If sharing of the example is not possible let me know the procedure to perform OTA over MQTT (any document). I was searching for the information online but could not get any information like on what topics the device must subscribe and publish the request for firmware download.

We are expecting the firmware to receive in chunks and store.

Operating System: FreeRTOS
Device: CC3220SF
Cloud: Azure

I got one link in Azure site and it has some node.js example, but it is of no use to us as we develop our code in C language, this only talks most from the cloud side implementation. node.js example I checked but not much detailed information on MQTT topics and procedure.
https://learn.microsoft.com/en-us/azure/iot-hub/tutorial-firmware-update

I request you to help me in this regard, please provide a detailed information from the device side (hardware) OTA firmware upgrade. Information required is mentioned below.

• Detailed Procedure to be performed on the SMS device firmware download using MQTT [ I know, 1) check the twin, 2) download firmware 3) verify the firmware 4) reboot ]
• On what topic does the device subscribe for MQTT
• On what topics does it send request to download the firmware in chunks for MQTT. • How to update status to the Azure cloud, what are the status codes?
• Is there any job document involved in the process of OTA , if yes what are the contents and how to download it on to the device ?
• How the file size and signature is transferred to the device ?

Note : Any C example for any other hardware device is available please provide us. Our device is a sleeping end device.

Thanks,
Harish

Azure IoT Hub
Azure IoT Hub
An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.
1,272 questions
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

3 answers

Sort by: Most helpful
  1. QuantumCache 20,366 Reputation points Moderator
    2021-03-17T08:01:27.637+00:00

    Hello @Katam, Harish This is really a great question related to device update.

    I have received a response from the Microsoft Product team on your query, I hope this helps with your initial query.

    That is a good question. Unfortunately, we don’t have OTA samples in the C SDK. You can keep an eye on the product documentation and tutorials side to have the updated information on this.

    The closest we have to help with your query is this article for the MXChip: Azure MXChip IoT DevKit Firmware OTA (Over-the-Air) - Code Samples | Microsoft Learn

    I hope you have already came across the : Device Update for IoT Hub documentation

    Device Update for IoT Hub in public preview

    Please leave your comments, and feedback in the below section.

    If the response is helpful, please click "Accept Answer" and upvote it.

    0 comments No comments

  2. Katam, Harish 11 Reputation points
    2021-03-17T12:32:34.29+00:00

    @QuantumCache this is very unfortunate that you don't have a c code for MQTT firmware download from Azure.

    • I request you to provide the procedure to download the firmware using MQTT from Azure cloud in document form (which include procedure in steps) I guess this should be available with you.

    I have gone through the example by Azure for MXChip IoT DevKit Firmware OTA (Over-the-Air) - Code Samples. it was depending on Arduino, I had to install Arduino tool and specific board related packages using board manager of Arduino IDE to get the code compiled. unfortunately these steps are missing in the tutorial link shared.

    https://learn.microsoft.com/en-us/samples/azure-samples/mxchip-iot-devkit-firmware-ota/sample/

    • It seems that this code downloads the firmware using HTTPS and reports the status in MQTT.
    • it is very difficult to analyze this code, at end it uses libraries, I am not able to find out on what topic it publishes the Status at least.
    • Please point me to the file or location in the code where it subscribes and publishes the data over MQTT , my interest is to see topics.

    One basic question is it possible to download the firmware file in chunks using MQTT from Azure cloud? our hardware/software does not support HTTPS client.

    Please answer to the points mentioned above so that no point is missed, also let me know what is the fastest way to get support on this.

    thanks,
    Harish


  3. Luca Maggiani 1 Reputation point
    2022-02-21T14:03:16.893+00:00

    Hi, same issue here. Is there any update on this topic?
    Thank you


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.