Files
Chris Sutcliff cdf6375c71 fix(mqtt): 8 KB MQTT task stack when TLS verifies a CA certificate
On boards with PSRAM the MQTT client runs in its own task with a 5120
byte stack. Verifying an EC certificate chain against a CA, such as
Let's Encrypt ISRG Root X2, needs about 6 KB, so the task overflowed
and the board boot looped on every connect.

The espMqttClient constructors now take the stack size, and
startClient() passes EMSESP_MQTT_STACKSIZE_CA (8192) when TLS is on
with a CA, keeping the 5120 default for insecure TLS and plain MQTT.
The client is recreated when that changes. The stack usage log
reports against the size the task was created with.
2026-10-20 12:40:59 +01:00
..
2023-06-03 16:36:53 +02:00
2025-01-04 13:41:39 +01:00

espMqttClient

MQTT client library for the Espressif devices ESP8266 and ESP32 on the Arduino framework. Aims to be a non-blocking, fully compliant MQTT 3.1.1 client.

Copy of https://github.com/bertmelis/espMqttClient

Based on Version 1.7.0 - https://github.com/bertmelis/espMqttClient/tree/v1.7.0

with additional changes to support EMS-ESP such as compiling with Tasmota and not using SecureWifiClient in these two files:

 src/espMqttClient.cpp
 src/Transport/ClientSecureSync.h
 src/Config.h

License

This library is released under the MIT Licence. A copy is included in the repo. Parts of this library, most notably the API, are based on Async MQTT client for ESP8266 and ESP32.