hope you're having a good day.
I am using UDP to send packets of data from a microcontroller to a python server on my PC (I could not get the speeds I needed over TCP).
I want to send a repeat request to the microcontroller if a packet is dropped (assuming this is the easiest method for error correction over UDP)?
I am aware UDP uses checksum and if this is incorrect it will be dropped by the receiver. Is there a flag or equivalent in python socket so that when a packet is dropped, I can ask the microcontroller to send the packet again?
Thanks in advance for your time,
Will
UDP is an unreliable protocol. It has no mechanism to "ask for sending again" if a packet gets dropped because of the wrong checksum. It has also no mechanism to detect duplicate packets, reordering or lost packets. There is no kind of flag which could be switch on to get a reliable transport based on UDP.
If you need reliable transport either use TCP or implement you own custom reliability layer on top of UDP.
UDP Incorrect checksum triggers repeat request instead of dropping packet