Download FreeRTOS

Quality RTOS & Embedded Software

Introducing the FreeRTOS Cellular Library

We are happy to introduce a preview of a new FreeRTOS library designed to simplify the development of IoT applications that connect to the cloud using cellular LTE-M technology. LTE-M, also known as Cat-M1, is a low-cost LPWAN technology developed by 3GPP as part of Release 13 of the LTE standard, a component of the broad 5G technology umbrella. It is also a complementary technology to NB-IoT, but it's faster with 1Mbps upload and download speeds and has a lower latency which makes it ideal for many command and control applications. By default, all LTE-M cellular modems are also backward compatible with 4G technologies (such as CAT1) and will fall back to 3G and 2G as necessary to ensure connectivity.

Making Cellular IoT Applications Easier

Most cellular modules implement a standard (ASCII - AT command) interface, over a serial port, suitable for use with most microcontrollers and FreeRTOS applications. Each microcontroller vendor implements the serial interface (UART) slightly differently and each cellular module vendor has differentiated, if only slightly, the command set (originally defined by the 3GPP standard) to expose the best/unique capabilities of its product. As a result, there is no quick way for developers to adopt cellular technology without committing to a specific hardware implementation and a lot of effort goes wasted in re-implementing the serial interface for each microcontroller and module pair.

The FreeRTOS Cellular library comes to the rescue by separating the repetitive, undifferentiated code required to serialize the modules’ commands and to parse their replies, offering a simple unified Application Programming Interface (API). This common interface makes it possible for you, the developer, to focus exclusively on the application logic, expediting development and providing a clean and trusted foundation to build upon. Applications using the Cellular library API will be freely portable across a variety of cellular modem vendors and models. At present, the FreeRTOS cellular library provides support for the following popular cellular modems: Quectel BG96, Sierra Wireless HL7802, and U-Blox Sara-R4.

Building the IoT Stack

FreeRTOS offers a networking stack designed for IoT applications. Common connectivity technologies such as Ethernet, Wi-Fi and BLE have already been integrated with this stack, and a wide selection of boards featuring popular microcontrollers and wireless modules are supported in the FreeRTOS Reference Integrations. The new cellular library was designed to fit in this stack by providing the transport layer, so to be interchangeable with the other connectivity options built upon TCP sockets.

Figure 1 - A freeRTOS IoT application stack using the cellular library

Developing and Testing Cellular IoT Applications

Thanks to the common stack design and flexibility of the FreeRTOS IoT libraries (such as coreMQTT, coreHTTP, corePKCS11, ...) it is now possible to migrate IoT applications, originally designed for other wireless connectivity solutions, to the cellular technology quickly and with minimal effort. It is also possible to design and test brand new cellular IoT applications faster by using FreeRTOS Windows simulator and Linux (POSIX) simulator. In fact, we have created a new FreeRTOS Lab repository containing three (Visual Studio) projects, based on the FreeRTOS Windows simulator, requiring only a laptop and an evaluation kit for any of the three modems initially supported. You will find more information on how to setup the modems and build the demos in the FreeRTOS Cellular Demo Getting started Guide. Additionally, three new FreeRTOS reference integrations have been qualified based on the FreeRTOS release 202011.00 libraries and using the following kits: STM32L4+ Discovery board and STMODLTE , Sierra Wireless Sensor Hub AWS Kit (featuring the Sierra Wireless HL7802 module), Nuvoton - NuMaker IoT M487 board, and Quectel RFBG96 adapter. You will find them listed in the AWS Partners Device Catalog.

FreeRTOS Cellular Library Response

We are excited about the response to the new FreeRTOS Cellular library, which we built with feedback from the FreeRTOS community of partners, customers, and embedded developers. Here is what our partners had to say …

Integrating u-blox LTE-M and NB-IoT modules with the FreeRTOS cellular libraries further extends our commitment to our customers who develop secure IoT and edge devices that are connected to AWS Cloud services.” – Harald Kröll, Product Manager, u-blox
“We are delighted at the introduction of the FreeRTOS cellular library with STM32L4+ Discovery Kit IoT Node and Quectel BG96’s STEVAL-STMODLTE support because our customers will benefit from the great saving in time and effort when developing cellular enabled IoT applications.” – Andre Dostie, Director of IoT Applications – Microcontroller Division Americas, STMicroelectronics, Inc.
"We're delighted to continue our long collaboration with AWS," said Alexander Bufalino, VP Marketing, Quectel Wireless Solutions. "The BG96 cellular module, already AWS IoT Core qualified, featured on the AWS Partner Device Catalog and now integrated in the FreeRTOS cellular library, makes it even easier for our customers to quickly connect to AWS cloud".
“We are glad to see AWS launching the FreeRTOS cellular library with ready support for our HL7802 modules to address the needs of our mutual customers and expedite development of innovative IoT applications connected to AWS cloud.” – Ashish Syal, Chief Engineer, Sierra Wireless


You can find more information about the FreeRTOS cellular library here. We’ll keep adding implementations of the cellular interface for new and popular modems, but we welcome your contributions to expand the catalog of modems and to improve the functionality of the library. Refer to the Cellular Library Porting Guide for further details. Stay tuned... FreeRTOS is an MIT licensed open source, real-time operating system for microcontrollers that makes small, low-power edge devices easy to program, deploy, secure, connect, and manage. You can get started by downloading source code from or GitHub () and can find more information about the FreeRTOS, its libraries and demos on the FreeRTOS User Guide.

About the author

Lucio is a Product Manager at Amazon Web Services. He has held various technical and marketing roles in the semiconductor industry for the past 20 years. As an opinionated and prolific author he has published numerous articles and technical books on programming for embedded control applications. Following his passion for flying, he has achieved both FAA and EASA private pilot licenses.
View articles by this author
FreeRTOS forums Get industry-leading support from experts and collaborate with peers around the globe. View Forums
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.