Cellular Interface library - FreeRTOS
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Cellular Interface library


The content on this page may not be up-to-date. Please refer to the FreeRTOS.org library page for the latest update.


The Cellular Interface library implements a simple unified API that hides the complexity of the cellular modem-specific AT commands and exposes a socket-like interface to C programmers.

Most cellular modems implement more or less of the AT commands defined by the 3GPP TS v27.007 standard. This project provides an implementation of such standard AT commands in a reusable common component. The three Cellular Interface libraries in this project all take advantage of that common code. The library for each modem only implements the vendor-specific AT commands, then exposes the complete Cellular Interface library API.

The common component that implements the 3GPP TS v27.007 standard has been written in compliance with the following code quality criteria:

  • GNU Complexity scores are not over 8

  • MISRA C:2012 coding standard. Any deviations from the standard are documented in source code comments marked by "coverity".

Dependencies and requirements

There is no direct dependency for the Cellular Interface library. However, Ethernet, Wi-Fi and cellular cannot co-exist in the FreeRTOS network stack. Developers must choose one of the network interface to integrate with the Secure Sockets library.


For information about porting the Cellular Interface library to your platform, see Porting the Cellular Interface library in the FreeRTOS Porting Guide.

Memory use

Code Size of cellular interface library (example generated with GCC for ARM Cortex-M)
File With -O1 Optimization With -Os Optimization
cellular_3gpp_api.c 6.3K 5.7K
cellular_3gpp_urc_handler.c 0.9K 0.8K
cellular_at_core.c 1.4K 1.2K
cellular_common_api.c 0.5K 0.5K
cellular_common.c 1.6K 1.4K
cellular_pkthandler.c 1.4K 1.2K
cellular_pktio.c 1.8K 1.6K
Total estimates 13.9K 12.4K

Getting started

Download the source code

The source code can be downloaded as part of the FreeRTOS libraries or by itself.

To clone the library from Github using HTTPS:

git clone https://github.com/FreeRTOS/FreeRTOS-Cellular-Interface.git

Using SSH:

git clone git@github.com:FreeRTOS/FreeRTOS-Cellular-Interface.git

Folder structure

At the root of this repository you will see these folders:

  • source : reusable common code that implements the standard AT commands defined by 3GPP TS v27.007

  • doc : documentation

  • test : unit test and cbmc

  • tools : tools for Coverity static analysis and CMock

Configure and build the Library

The Cellular Interface library should be built as part of an application. In order to do this, you must provide certain configurations. The FreeRTOS_Cellular_Interface_Windows_Simulator project provides an example of how to configure the build. More information can be found in the Cellular API References.

Please refer to the Cellular Interface page for more information.

Integrate the Cellular Interface library with MCU platforms

The Cellular Interface library runs on MCUs using an abstracted interface, the Comm Interface, to communicate with cellular modems. A Comm Interface must be implemented on the MCU platform as well. The most common implementations of the Comm Interface communicate over UART hardware, but can be implemented over other physical interfaces, such as SPI, as well. The documentation for the Comm Interface can be found in the Cellular Library API References. The following example implementations of the Comm Interface are available: