I’m developing a distributed sensor network using ESP32 modules for edge-based monitoring, where response time is critical (sub-300ms ideally). Each node sends real-time data (e.g., motion, temperature) over Wi-Fi to a central collector that triggers actions or logs events. I’ve optimised the firmware for minimal delay between sensor read and MQTT publish, but I’m still experiencing unpredictable spikes in latency sometimes from the ESP32 itself, seemingly from the network stack. I’ve disabled power-saving modes, tweaked buffer sizes, and tried using static IPs to reduce DHCP delays.
Has anyone here tackled similar latency issues with ESP32-based wireless sensor networks? Are there known tweaks at the ESP-IDF level, or should I explore hardware changes like external antennas or switching to ESP-NOW for peer-to-peer performance?