Expanding Azure Support for Constrained Devices: Azure IoT middleware for FreeRTOS

This post has been republished via RSS; it originally appeared at: Microsoft Tech Community - Latest Blogs - .

Here is a new open-source middleware ready for production that makes connecting your FreeRTOS device to Azure IoT simpler.

 

We want to meet developers where they are, and many developers are using FreeRTOS. While it was already possible to connect FreeRTOS devices to Azure IoT, it became less challenging thanks to this new middleware.

 

The Azure IoT middleware for FreeRTOS provides fully tested APIs, documentation, and sample implementations on popular embedded platforms. Features provided by the middleware include establishing a secure MQTT connection to Azure IoT services, provisioning via the Device Provisioning Service, sending telemetry messages, receiving commands, and interacting as an IoT Plug and Play device.  You get both the benefits of open source – available on GitHub under the MIT license – and a set of libraries supported by Microsoft.

 

Some of the hardware platforms with out-of-box support include Espressif ESP32, STMicroelectronics STM32L475, STM32L4+, STM32H745; NXP1060 and simulators for both Linux and Windows.

 

If you’re a FreeRTOS developer connecting devices to Azure IoT, we look forward to supporting you with our middleware.

 

 

Middleware Layer

 

To optimize it for FreeRTOS and your embedded scenarios, we made specific architectural choices:

 

  • The Azure IoT middleware for FreeRTOS is non-allocating: You must allocate data structures and then pass them into the middleware functions. 
  • The middleware operates at the MQTT level: you can leverage the middleware APIs to establish MQTT connection and disconnection, subscribing and unsubscribing from topics, and sending and receiving of messages.
  • You are in control of the TLS/TCP connection to the endpoint: This allows for flexibility between software or hardware implementations of either.
  • There are no background threads created by the middleware: Messages are sent and received synchronously.

 

freertos-architecture.png

 

The diagram above shows the middleware components used in our samples for MQTT, TLS and TCP – which you can adapt and change to your own requirements. It also highlights that the Embedded C SDK, FreeRTOS middleware and MQTT abstraction (in green) is provided and supported by Microsoft. The remaining blocks (in blue) of the solution components are 3rd party and you are free to choose whichever works better with your platform.

 

How to get started?

 

We created samples to help you get started with the Azure IoT middleware for FreeRTOS, and they are divided into:

 

Azure IoT Central: These samples leverage Azure DPS (Device Provisioning Service), Azure IoT Central and, IoT Plug and Play. Azure subscription is not required during the initial 7 days of the IoT Central Free Trial.

 

Azure IoT Hub: These samples can connect directly to IoT Hub or connect first to DPS for provisioning and then connecting to IoT Hub (which is configurable)

 

Let us know what you think!

 

As we continue to work on improving the experience for IoT developers, we encourage you to join this open source project on GitHub , provide your feedback, file issues, contribute with your own pull requests and stay tuned on Azure Updates for any new Azure IoT SDK announcements.

 

Middleware samples repo: https://github.com/Azure-Samples/iot-middleware-freertos-samples

Middleware source code: https://github.com/Azure/azure-iot-middleware-freertos

Middleware source code documentation: https://azure.github.io/azure-iot-middleware-freertos/

REMEMBER: these articles are REPUBLISHED. Your best bet to get a reply is to follow the link at the top of the post to the ORIGINAL post! BUT you're more than welcome to start discussions here:

This site uses Akismet to reduce spam. Learn how your comment data is processed.