Closed sticilface closed 6 years ago
I've found that if i completely disable the RX buffer then things are a lot more stable. Seeing as I do not need to RX in this sketch, my short term solution is to enable serial like this when I'm not using my Adalight implementation.
Serial.begin(115200, SERIAL_8N1, SERIAL_TX_ONLY, 1);
I'm suspecting that as my computer sends data constantly is causes problems when the UART buffer is not cleared by calling available() or flush().
OTA in IDE has received a small fix, could you try again without your TX-only fix ?
Closing via #4328 .
This bug has taken my a long time to track down. One of my usages of the ESP is to take data streamed over serial and pipe it to WS2812 LEDs. This is my adalight implementation, and one of the first things that I wrote. It has worked fine, at baud rates up to 2,000,000 for over a year, until the introduction of https://github.com/esp8266/Arduino/commit/f8a8a2a3595751c39ec8604ab21fdfbd7daccad6.
My main sketch is very complex with asyncwebserver, asyncmqtt, some UDP libs of my own, neopixelbus... but i have now excluded all of these things.
To reproduce the bug, use the sketch below with the python script. This sketch contains the shell of my ada light sketch but only containing the serial receive components and the wifi/OTA stuff. use master, or any commit after https://github.com/esp8266/Arduino/commit/f8a8a2a3595751c39ec8604ab21fdfbd7daccad6. configure sketch to join wifi, then run the python sketch making sure to configure the right serial port. you should see serial output from the esp... Ada..Ada... now you know that the ESP will be receiving the serial data... Now perform an OTA... you should get a wdt fairly quickly.. Revert back to stable 2.3.0. and the OTA will work fine during serial data being streamed.
For me this error is very sporadic (unless using this example), and probably to do with interrupts and wifi, something similar to the neopixelbus and biting methods. Performing and OTA gives enough network traffic to generate the wdt. I stress that this occurs with normal usage in a sketch that has been working for a long time without problems..
sketch
python script
I'd like to suggest that the RX buffer be made optional