(2024-02-22, 02:10 AM)seandepagnier Wrote: I am developing wireless wind sensors using esp32. What I have is 2 esp32's. One of them at the sensors transmits the data using esp-now which is not wifi or bluetooth, but an esp specific protocol that has low latency. The other esp32 receives esp-now and can relay either via wifi, or more generally plug directly into pypilot via usb. The intention here is to eliminate the lag issues with tcp and even udp on both esp32, as well as linux, as I even find 500 millisecond hiccups on wifi data to be common and this is an issue when reacting to wind gusts.
I have not experienced major issues with esp32 udp. A lot of udp errors show up constantly, right now my nmea 2000 esp32 has 260h uptime and 8M (!) udp errors reported/counted, so reliable it is not. But then again, in my use case udp packet is sent over and over, so missing few makes little difference
I currently have two esp32s transmitting wind data wirelessly between each other. One is hooked to "old" wind display, direct to analog transduced, and sends the wind data over UDP, another is hooked to nmea 2000 bus and injects the received UDP data into NMEA 2000 PGNs.
Right now in quite a gusty wind the needles in analog wind display and NMEA 2000 hooked Furuno wind indicator are 100% perfectly synced. No way there can be more than few 10ms delay between those two, even 100ms would show up visually, I would argue.
But as I said, haven't measured these so no hard data, just an empirical observation. But my hunch is esp32 udp works fine, if not 100% reliably.
edit. Oh bollocks, just realized by looking at those numbers, it is almost 10 udp errors per second. Many hundreds are transmitter, but still it is very high even in percentage wise. Maybe I take half of my word back about esp32 udp stack. I wonder what is the underlying issue, as OSs like linux have had this sorted out for almost over a hundred years.

