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
Simple MQTT with C++ and IDF
Re: Simple MQTT with C++ and IDF
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.
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.
Who is online
Users browsing this forum: No registered users and 96 guests