Hi, I’m using ESP32 Dev Module with IoTaaP HAPI, and sometimes during publishing process my device hangs and then restarts. I’m publishing to Mosquitto MQTT server, and it works, but sometimes it just hangs.
This sounds really familiar to me! We experienced the same issue during some tests of our IoTaaP OS.
This issue goes way under the hood, all the way to the WiFiClientSecure library and ssl_client. The issue was originally mentioned on GitHub. In short, while loop was causing the system to hang and then WDT restarts the device.
As you can see, the code was merged, but it still didn’t reach the PlatformIO production which comes with previous version of Arduino framework for ESP32. As I can see, there were some updates on idf-release/v4.2 branch, so it might reach production soon and become available in platformio without workarounds.
In order to fix this issue you will have to use specific version of framework-arduinoespressif32. This can be configured in platformio.ini file:
platform_packages = platformio/framework-arduinoespressif32@https://github.com/espressif/arduino-esp32.git#d6b9187
This will use a specific commit that has a fix for this issue.
Exactly the same thing as described in the Github issue! Thanks for help!
this was solution for me!
Any ideas when this will reach stable branch? In Espressif and PlatformIO repository.
For now, this is the only workaround. But we are working on a stand-alone IoTaaP OS, that will be built on top of FreeRTOS and ESP-IDF and a customized application layer that will support the Arduino framework… this will give us more freedom for customization (on all layers) and help us by protecting from the issues like this.