coreMQTT library
Note
The content on this page may not be up-to-date. Please refer to the
FreeRTOS.org library page
Introduction
The coreMQTT library is a client implementation of the MQTT
The coreMQTT library is compliant with the
MQTT 3.1.1
The library is written in C and designed to be
compliant with ISO C90
The standard C library
A customer-implemented network transport interface
(Optional) A user-implemented platform time function
The library is decoupled from the underlying network drivers through the provision of a simple send and receive transport interface specification. The application writer can select an existing transport interface, or implement their own as appropriate for their application.
The library provides a high-level API to connect to an MQTT broker, subscribe/unsubscribe to a topic, publish a message to a topic and receive incoming messages. This API takes the transport interface described above as a parameter and uses that to send and receive messages to and from the MQTT broker.
The library also exposes low level serializer/deserializer API. This API can be used to build a simple IoT application consisting of only the required a subset of MQTT functionality, without any other overhead. The serializer/deserializer API can be used in conjunction with any available transport layer API, like sockets, to send and receive messages to and from the broker.
When using MQTT connections in IoT applications, we recommended that you use a secure transport interface, such as one that uses the TLS protocol.
This MQTT library doesn't have platform dependencies, such as threading or synchronization. This library does have
proofs
Code Size of coreMQTT (example generated with GCC for ARM Cortex-M) | ||
---|---|---|
File | With -O1 Optimization | With -Os Optimization |
core_mqtt.c | 4.0K | 3.4K |
core_mqtt_state.c | 1.7K | 1.3K |
core_mqtt_serializer.c | 2.8K | 2.2K |
Total estimates | 8.5K | 6.9K |