Skip to content
Paho MQTT C client library for embedded systems. Paho is an Eclipse IoT project (https://iot.eclipse.org/)
C C++ Python CMake HTML Makefile Shell
Branch: master
Clone or download

Latest commit

Latest commit 29ab2aa Mar 5, 2018

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.settings Add CDT language settings file Oct 4, 2017
Debug Move current source to the MQTTPacket subdirectory - other sub-projec… May 13, 2014
MQTTClient-C Merge pull request #124 from tjdai/master Mar 5, 2018
MQTTClient Merge branch 'master' of github.com:eclipse/paho.mqtt.embedded-c Dec 8, 2017
MQTTPacket Add connack rc definitions Sep 30, 2017
doc Add more doc, README and API Jul 14, 2017
test Add test proxy Jul 13, 2017
.cproject Move current source to the MQTTPacket subdirectory - other sub-projec… May 13, 2014
.gitignore Add more doc, README and API Jul 14, 2017
.project Initial starting point Jan 22, 2014
.travis.yml Run travis-install in Travis build May 15, 2017
CMakeLists.txt Improve CMake build and test Jul 5, 2017
CONTRIBUTING.md Update contributing guidelines for ECA Mar 5, 2018
Makefile Makefile: Structurate correctly for Arduino and PlatformIO Dec 17, 2016
README.md Add more doc, README and API Jul 14, 2017
about.html Add EDL to the about file Oct 31, 2014
edl-v10 Initial starting point Jan 22, 2014
epl-v10 Initial starting point Jan 22, 2014
library.properties Makefile: Structurate correctly for Arduino and PlatformIO Dec 17, 2016
notice.html Initial starting point Jan 22, 2014
travis-build.sh Add session state tests and correct behaviour for C++ Jul 12, 2017
travis-env-vars Enable Travis build and test May 15, 2017
travis-install.sh Add session state tests and correct behaviour for C++ Jul 12, 2017

README.md

Eclipse Paho MQTT C/C++ client for Embedded platforms

This repository contains the source code for the Eclipse Paho MQTT C/C++ client library for Embedded platorms.

It is dual licensed under the EPL and EDL (see about.html and notice.html for more details). You can choose which of these licenses you want to use the code under. The EDL allows you to embed the code into your application, and distribute your application in binary or source form without contributing any of your code, or any changes you make back to Paho. See the EDL for the exact conditions.

There are three sub-projects:

  1. MQTTPacket - simple de/serialization of MQTT packets, plus helper functions
  2. MQTTClient - high(er) level C++ client, plus
  3. MQTTClient-C - high(er) level C client (pretty much a clone of the C++ client)

The MQTTPacket directory contains the lowest level C library with the smallest requirements. This supplies simple serialization and deserialization routines. They serve as a base for the higher level libraries, but can also be used on their own It is mainly up to you to write and read to and from the network.

The MQTTClient directory contains the next level C++ library. This networking code is contained in separate classes so that you can plugin the network of your choice. Currently there are implementations for Linux, Arduino and mbed. ARM mbed was the first platform for which this was written, where the conventional language choice is C++, which explains the language choice. I have written a starter Porting Guide.

The MQTTClient-C directory contains a C equivalent of MQTTClient, for those platforms where C++ is not supported or the convention. As far as possible it is a direct translation from MQTTClient.

Build requirements / compilation

CMake builds for the various packages have been introduced, along with Travis-CI configuration for automated build & testing. The basic method of building on Linux is:

mkdir build.paho
cd build.paho
cmake ..
make

The travis-build.sh file has the full build and test sequence for Linux.

Usage and API

See the samples directories for examples of intended use. Doxygen config files for each package are available in the doc directory.

Runtime tracing

The MQTTClient API has debug tracing for MQTT packets sent and received - turn this on by setting the MQTT_DEBUG preprocessor definition.

Reporting bugs

This project uses GitHub Issues here: github.com/eclipse/paho.mqtt.embedded-c/issues to track ongoing development and issues.

More information

Discussion of the Paho clients takes place on the Eclipse Mattermost Paho channel and the Eclipse paho-dev mailing list.

General questions about the MQTT protocol are discussed in the MQTT Google Group.

More information is available via the MQTT community.

You can’t perform that action at this time.