So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By Pkcorp
#74090 Hello,

I have two ESP8266-01 set up on two different MCUs in order to transfer some data between them.
I have set up a transparent transmission between them, and receive data correctly. However, I'm sending data every 20ms (to match the delay given in the ESP8266 documentation), but I measure data on the receiving ESP8266 (at the UART-TX line) every ~120ms. This delay stays the same with manually using CIPSEND=data, and is also independent of the distance between the two ESPs.

I configure my Server/AP-side with the following AT command order:

AT+CWMODE_DEF=2 // Set Access Point Mode
AT+CWSAP_DEF="SSID","123456789",12,4 // Config Access Point
AT+CIPAP_DEF="192.168.4.2" // Set static IP
AT+CIPMUX=1 // Allow multiple Connections
AT+CIPSERVER=1,1001 // Start TCP Server with port 1001

On the transmitting side, the following AT command order is used:

AT+CWMODE_DEF=1 // set Station Mode
AT+CWJAP_DEF="SSID","123456789" // connect to AP
AT+CIPSTART="TCP","192.168.4.2",1001 // establish TCP connection
AT+CIPMODE=1 // set transparent transmission mode
AT+CIPSEND // start transparent transmission


Why do I get 100ms of additional delay? Is there something in my setup which causes this? I already checked with a different pair of ESPs, but the same problem persists.

Thanks in advance,

best regards,

Pkcorp
User avatar
By Pkcorp
#74164 Sorry I did not realize there is a forum section better suited for this post.

I solved the issue, the problem was in the TCP/IP protocol itself. Since I have a real-time application with small data sizes, Nagles Algorithm was causing the delay. Since it is not possible to disable the algorithm via AT commands, one has to program the esp8266 directly. The corresponding function in the ESP arduino core is "setNoDelay(bool)".