My ESP32 sketch uses the PubSubClient library to publish sensor data every 30 seconds. The serial log shows the connection dropping and being re-established again and again, sometimes every few seconds, and larger JSON messages never arrive at the broker at all. A second ESP32 with the same firmware makes it worse.
The broker is Mosquitto on a Raspberry Pi on the same network and works fine with desktop clients. What are the usual reasons for this behaviour on microcontroller clients?




