You can chat about native SDK questions and issues here.

User avatar
By NodeMike
#88411 Hi!
Im using my ESP8266 with official rtos sdk, and Im experiencing some issue while doing constant UDP transmission. My target is to: read sensor each 5ms, and store it into circular buffer, then send this data via UDP (when there is more than 200 bytes of data in buffer). Every sensor read got its timestamp so I do know exactly when the readings were done (and how many of those get lost). My program worked very well, but I've noticed this "transmission" hickups which last 100-200ms every few seconds. So I've started investigating. I removed all unnecessary stuff from code, and the app was left with only one task that sends 200bytes over UDP in loop, with vTaskDelay(10) in it. After some tests with wireshark, the very same issue occurs! I know this is UDP, but the intervals of the hickups were very uniform, and I dont think that the packet loss is issue here... Im not sure if there is something i should config in sdk (via this "make menuconfig" tool)? Projekt started from UDP Client official example. Im not really sure, why is it so difficult, for it, but the speeds im trying to achieve are very low to be honest (its like 20 000 bytes per second). Worth to mention: all calls to UDP send function are successfull, and they are executed on planned times, without those delays observed on wireshark. Any idea what am I missing :) ?
User avatar
By Jeff Stuart
#88710 Don't know if I can help you much, but I'll try. I've got embedded ESP8266's sending unscheduled "bursty" status reports over UDP, alongside TCP/HTTP traffic. My peak UDP throughput is on par with yours. The good news, the ESP8266 RTOS (3.2) UDP protocol has worked flawlessly. I can't speak to timing, latency, etc., but I can say I've seen zero packet loss, which I find a little surprising.

To be clear, I'm not broadcasting. Packets are directed to a single IP/port.

Could you clarify, what do you mean by "hickup"? Delay? Loss?

Regards, Jeff