Simple MQTT with C++ and IDF

stubb0rn
Posts: 4
Joined: Fri Feb 16, 2018 6:05 pm

Re: Simple MQTT with C++ and IDF

Postby stubb0rn » Fri Feb 16, 2018 6:32 pm

A not complete solution is [this library](https://gitlab.lrz.de/pguenzel/MQTTpp) I started (for various reasons). It is a full C++ solution but so far only capable of publishing QoS0 messages (higher QoS should work but are not tested yet).
Even if it is not a full solution yet, you might find a few snippets for reuse.
Greets

Koulwa
Posts: 19
Joined: Wed Feb 07, 2018 11:12 pm

Re: Simple MQTT with C++ and IDF

Postby Koulwa » Thu May 31, 2018 9:11 pm

Thank you all for your help.

After trying out all solutions, i did make some progress with the ones posted. Ended up that the project if written in C++ was getting to be too large in code size to be able to handle a factory/OTA_1/OTA_2 since we're doing BLE/WiFi/OTA/MQTT and some other peripherals.

Ended up keeping everything in C. So, went the route of using the included Amazon IoT library, but pushing to my own Mosquito MQTT broker. It has the added benefit of working over SSL out of the box, which forced me to reconcile that as well.

All in all, it works really well handling connection issues/ reconnections/ and cleaning up sockets if disconnected properly. Using the Paho Library and the porting work done in ESP32_Snippets, i was having issues with re connections on WiFi loss.

I plan on doing a write up and maybe a short youtube clip about it. Will post that on this thread once that is done.
Hive.Tech :: www.hive.technology
Pure Engineering :: www.pureengineering.com

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 126 guests