ATmega2560+ESP8266 serial flow control

Hi All,

I have a project running on the ATmega2560+ESP8266 board from RobotDyn. (WeMos make one too).
RobotDyn
Everything works well, talking to the ESP wifi via serial to connect to and communicate with a back end server.

Periodically we get a serial clash between the Mega and the ESP with incoming vs outgoing data that gives us grief.

Ideally I'd like to implement serial flow control. There is no hardware ability on the board, does/has anybody dealt with this issue and could offer some pointers?

Thanks.
GT.

esp8266 has sketch or AT firmware?
what is " clash between the Mega and the ESP with incoming vs outgoing data"?

Hi, The ESP8266 has firmware.

gjt270:
Hi, The ESP8266 has firmware.

AT firmware?

esp8266 has hardware flow control even with the AT firmware.
but the RTS and CTS pins are not on the esp8266 header on your board.

ATmega has no hardware flow control support for UART and the Arduino core has no support to use some pins as RTS and/or CTS.

Yes, AT firmware, Sorry.

I'm under the impression hardware flow control is not really an option. Is software flow control achievable with this board?

gjt270:
Yes, AT firmware, Sorry.

I'm under the impression hardware flow control is not really an option. Is software flow control achievable with this board?

Juraj:
ATmega has no hardware flow control support for UART and the Arduino core has no support to use some pins as RTS and/or CTS.

AT firmware pushes to UART everything without control. without flow control any data could be lost in Serial buffer overflow.

the latest version of AT firmware (1.7 with SDK 3.0) has an improvement for TCP. it can be configured to not push data with +IPD. +IPD has only the size then and you can request this data in chunks. but in-between chunks, +IPD can occur. so if you request 64 bytes and it sends +IPD right after, part of +IPD information or UDP or TLS data are still lost in Serial buffer overflow.

This weekend I will continue (after some months) to work on a new WiFiEsp library build around the new feature of the AT 1.7. The library has as goal a stable TCP communication over esp8266 AT firmware. I hope I publish it on github next week as a beta version.