I needed a simple MQTT client for my embedded projects. I know that there are already many implementations available, but I wanted to learn also the protocol internals so I ended up in writing it from scratch (MQTT protocol is pretty well documented and the specification is available from mqtt.org).
Library contains two layers. Lower one is a MQTT packet reader/writer and the higher one is the actual client that application is supposed to be using. There is also a simple example for application main loop.
I didn’t have any needs for reliable delivery, so anything with QOS > 0 has been left out.
The Potato Bus library builds currently on picoos-lwip module as that is what I’m using for my current projects, but the code is pretty generic so it should be easy to adapt it to other environments too, as long as BSD sockets are available.