Unfortunately UDP over WiFi is not always reliable. There’s no guarantee of the packet ordering. The transmitter might queue a few packets up and transmit them together. Things seem a lot more reliable and consistent on ethernet, even though the “U” in “UDP” stands for “unreliable.”
Yes, except that it is actually commonly referred to as unreliable datagram protocol in industry (the RFC notwithstanding). This is to help describe how it differs from TCP/IP. Of course “unreliable” needs to be defined. In this case it means no guarantees about delivery, other than if it does arrive, the packet will checksum, or else it will be discarded. But there are no guarantees about timing, no connection framework, no retransmission, no guarantees about order. It’s a simple protocol with little overhead. It works well for streaming data because often it doesn’t matter if you lose some of it, and if the odd packet is out of order usually you can discard it. And being connectionless, it works if a device simply shows up on the network, and has no problem if an end point disappears for a while (packets simply are dropped).
In the meantime I located the error in the source code UPDDesigner.cs:
As you can see in the wireshark log, packet will be fragmented, may be caused by performance of c099. So packets with 1 byte lenght will be received sometimes and causing this error.
I’d tried following code changes to prevent the error and reading the fragmented packets into AOG: