Azure IoT Hub LoRaWAN FUOTA

Karol 20 Reputation points
2025-09-29T08:49:53.8466667+00:00

I have a following setup, an end-device communicating via LoRaWAN with a gateway that is connected over Wi-Fi/Ethernet/Cellular to The Things Network that is aciting as a Network Server (managing LoRaWAN).

+----------------+
|  End Device    |
| (LoRa Sensor)  |
+----------------+
        ⇅ LoRaWAN (RF)
+----------------+
|   LoRaWAN      |
|   Gateway      |
+----------------+
        ⇅ IP (Wi-Fi/Ethernet/Cellular)
+----------------------------+
| The Things Network (TTN)  |
|     Network Server        |
+----------------------------+

Now I would like to perform a FUOTA (Firmware Upgrade Over The Air) according to the LoRaWAN specification. The Things Network (TTN) doesn't support FUOTA fully, the missing puzzle is the application logic to synchronize time, schedule some downlink frames, schedule the update, chunk the data, sign the firmware etc. TTN provides integration with Azure Iot Hub/Central and also over MQTT. If possible I would like to leverage the Azure for this here are my questions:

  1. Is Azure Iot Hub fleixble enough to support custom OTA flow?
  2. Can I use Azure Device Update with my custom OTA?
Azure IoT Hub
Azure IoT Hub
An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.
{count} votes

Answer accepted by question author
  1. Alex Burlachenko 18,390 Reputation points Volunteer Moderator
    2025-09-29T10:11:33.96+00:00

    Karol hello,

    is azure iot hub flexible enough for a custom ota flow? the answer is a definite yes. iot hub is essentially a giant, secure message router. you can build a completely custom fuota manager application that runs in the cloud, perhaps as an azure function. this application of yours would use the iot hub device twins to set desired properties, like signaling the device that a new firmware is available. then, it would send the actual firmware chunks as cloud to device messages. you have full control over the entire sequence, the timing, the chunking, and the signing. it is a blank canvas for your custom protocol.

    now, can you use azure device update with your custom ota? this is a more nuanced one. azure device update is a fantastic service, but it is opinionated. it has its own defined way of handling the update process, from packaging to deployment. trying to force your custom lorawan fuota protocol into the azure device update model would be very difficult, like fitting a square peg into a round hole. it is designed for devices that can use its specific api and update manifest format.

    so here is my practical advice for you.

    forget about using the azure device update service for this specific task. it will likely cause more pain than it solves. instead, embrace the power of iot hub as your communication backbone.

    build your own 'fuota orchestration' service. this is a cloud application that you write. it will be the brain of the operation. this service will.

    prepare your firmware, chunking it and signing it according to the lorawan fuota spec.

    use the iot hub service sdk to communicate with your device through ttn.

    since your device is connected via ttn, you will use the ttn integration to connect it to iot hub. this makes iot hub think your device is directly connected, even though it is through the ttn network.

    your orchestration service will send commands via iot hub to tell the device a fuota session is starting. it will then send the firmware chunks one by one, carefully managing the timing and waiting for acknowledgements from the device.

    the device side code needs to be smart enough to handle these custom messages, reassemble the chunks, verify the signature, and then apply the update.

    this approach is vendor agnostic in its logic. the pattern of a custom cloud orchestrator managing a complex device workflow is used everywhere, on aws, google cloud, you name it. the core idea is the same, you are just using azure iot hub as your messaging pipe.

    so, in short. use a custom azure function or app service as your fuota boss. let it talk to your device through the flexible messaging system of iot hub. this gives you the total control you need for the precise lorawan fuota sequence.

    good luck with your project, it is a challenging but very rewarding thing to build )

    Best regards,

    Alex

    and "yes" if you would follow me at Q&A - personaly thx.
    P.S. If my answer help to you, please Accept my answer
    

    https://ctrlaltdel.blog/

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

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