Twilio Microvisor Simplifies Low-Power IoT Device-to-Cloud Integration with Support for MQTT on FreeRTOS

March 08, 2023
Written by

MV MQTT Support

Twilio Microvisor now supports Message Queuing Telemetry Transport (MQTT), a lightweight messaging protocol that is widely used in IoT for data transfer and communication between connected devices, on the FreeRTOS real-time operating system.

If you're new to Microvisor, let's start with what it is. Microvisor is a device builder platform that addresses the challenge of achieving robust and secure connectivity for IoT devices at scale. It introduces a hardware-protected hypervisor for microcontrollers to provide reliable and secure remote operations such as unbrickable (!) over-the-air firmware updates, secure remote live (line-by-line!) debugging of connected devices in the field, as well as industry leading device-to-cloud security. Now, with Microvisor's support for MQTT on FreeRTOS along with sample libraries and application source code, developers can accelerate the building of secure MCU-powered IoT devices that utilize the MQTT protocol, e.g. for connecting with the AWS cloud.

We now have sample code and helpers on GitHub to help developers get started with an example application, and interested individuals can sign up for the Twilio Microvisor Beta Program to apply for a free development board to explore Microvisor on an STM32U585 MCU.

Microvisor provides a set of system calls which allow your application to communicate with MQTT brokers, while your application takes the role of an MQTT client.

MQTT Diagram

MQTT is a pub-sub protocol, short for ‘publish-subscribe’. The broker provides one or more topics to which clients may subscribe. Subscription to a topic allows clients to receive messages published by other clients to that topic. Clients may publish messages to any topic — these messages are then relayed to all of the topic’s other subscribers.

In our documentation, we have prepared a guide that will show you how your application works with Microvisor to connect to public and private MQTT brokers, to subscribe to topics, post messages to those topics, and to be notified of inbound messages. Your application will ask Microvisor to perform MQTT tasks on its behalf, and Microvisor will respond immediately to say it has accepted the command or to provide a reason why it is unable to do so. It will respond asynchronously with the outcome of accepted operations. Microvisor’s notification system is used to manage this asynchronicity.

Already have a dev board and ready to put the MQTT support to a test? Head over to our documentation: "How to Issue MQTT Requests Under Microvisor". You might need to first get an update of the Microvisor SDK on your board for this to work – please contact the Microvisor team if that is the case.

If you are completely new to Microvisor but would like to learn more, consider watching our recent webinar: "Unbrickable Remote Firmware Updates for Highly Secure MCUs with Twilio and ST".

And if you'd like to join our Beta Program and apply for receiving a free dev board, you can do so here.