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

User avatar
By rudy
#75520 If that was the cause then picking a different protocol would not make a difference. So look for a different WiFi channel with less traffic.

Another thing to consider is that once the UDP message is gone, and forgotten. And if the receiving device didn't get that packet then it has been missed. And the next scheduled send is when it would get new information. And that may be the delay that is seen. So send duplicate (or three) copies of the message with 5 millisecond delays (or whatever works) between the packets. Odds are that one will get through.
User avatar
By McChubby007
#75521 If all of what has been suggested so far doesn't work, then you might need to develop a fully handshaked protocol where the target/remote station sends an ack to an initial request, the master then calculates the round trip delay and then sends another message with a 'time offset to perform action'. This is not a guaranteed solution, especially if the network has peaks/troughs.
User avatar
By rudy
#75523 From what I have read, and partially from experience, broadcast is less reliable.

Broadcast also sends at the lowest transmission rate since everyone is supposed to hear it. Also while UDP is supposed to be unreliable, not guaranteed delivery, I have read that unicast does have delivery retries because the WiFi consortium wanted to have that reliability. Broadcast or multicast can't since the sender is not aware of receivers. All this is what I remember from reading on this late last year. I think it is mostly accurate.

In the end I think some tests need to be made with different methods and then decide what works the best.

Something I didn't suggest, but what I have thought of in the past, was to use a channel that is not congested because it is not to be used in most countries. If it is a network only of ESPs, and didn't have to work through a router, then it might be able to operate without interference. But as I said, that isn't allowed in many countries so it isn't a legal option.

I did a quick check and it seems that the frequency of channel 14 is used by Bluetooth. But I read that on the internet from only one source so I am not certain of that.