jeelabs / el-client

Arduino client for esp-link's REST, MQTT, and command interface
BSD 2-Clause "Simplified" License
83 stars 46 forks source link

How to handle NEED_SYNC! #43

Closed Rotario closed 4 years ago

Rotario commented 6 years ago

Hi, I'm running this setup fine with a Teensy 3.6 and ESP07S (ESP8266). I'm sending large amounts of data over MQTT.

After a while Elclient and the esp lose sync and I get the NEED_SYNC! debug message in the Teensy serial.

How do I handle this error and call esp.sync? I could physically check each debug message for that string exactly but digging into the code for Elclient.cpp there's a resetCb, but I assume this is for internal use only.

Thanks