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

User avatar
By Nosaer
#92488 Hello
Tandem ESP8266+STM32, Works as a wireless data transmitter between a device and a PC.
I use UDP protocol.
ESP8266 configured as (Station + AP)
If I use an algorithm like this, then everything works great:
- Send "AT+CIPSEND=255"
- I get "Ok >"
- I send all 255 bytes at a time
- I get "Recv 255 + Send Ok"
- The data on the PC came

If the data array is not sent immediately, but with small timeouts:
- Sent AT + CIPSEND = 255
- I get "Ok>"
- When data comes from another device, I send the same 255 bytes with small timeouts to ESP
In this case, "Recv 255 + Send Ok" no longer come

I tried to implement the same thing using CIPSENDEX. If you send everything at once, then the transfer is interrupted when you send "\0"
If the data is sent gradually, then ESP ignores "\0" and "Recv 255 + Send Ok" I again do not receive.

Timeouts are not big. If I transmit all 255 bytes at once in 1 mS, then the same 255 bytes with delays are transmitted in 2-2.5 mS.
I used to completely accumulate an array with data and then send it. Now you need to transmit immediately, as they arrive from the device.
Due to the fact that the UART speed of the device is lower than that of the ESP, these very pauses occur.
I first send whatever I have received while I waited for a response to the CIPSEND command, and then I send each byte as it arrives.

ESP firmware:
Code: Select allAT version:1.1.0.0(May 11 2016 18:09:56)
SDK version:1.5.4(baaeaebb)
Ai-Thinker Technology Co. Ltd.
Jun 13 2016 11:29:20

Now I plan to update the firmware in the ESP8266, perhaps there is no such problem in the latest versions.

Any help would be welcome.
I'm sorry for my bad english