1

I was working with the Rpi and i was trying to transfer some data from my wifi enabled device to Rpi over UDP. But i often experience packet loss. I don't know why, packet loss still present for smaller distances (eg 5meter).

I am in a building which have lot of wifi APs. I think the packet loss is due to the effect of interference, am i right?

Will you please help me to understand the cause of packet loss? I have search over internet, but almost articles says packet loss is due to network congestion, multipath fading, hardware problem or software problem.

What are the main causes of packet loss in wifi with UDP.?

1

UDP does not provide reliable transfer of data. You may loose UDP packets sent over wire as well, even directly connected to the host.

Packets sent over WiFi are subject to interferences that increase the chances of it getting lost, but it is only another factor to consider. UDP packets can get lost by a lot of reasons, for example: a checksum check that fails, a queue buffer that drops it (because it is full or due to policies for example RED, ...), QoS policy that is prioritizing other traffic, maybe the OS decides to drop it because it prioritizes other traffic, ...

EDIT:

Interference is a big factor in wireless networks but it is not the only one, for instance, it also depends on the rate your device is transferring: is it sending packets at a near constant rate? are they bursty? or is it sporadically sending a couple of packets then waiting?

You could try to determine where the packets are getting dropped by running tcpdump in both ends --in the sender to make sure the packets are getting sent and in the receiver to check that they reach the host at least. You should monitor the receivers NIC counters to see if there is high packet error/dropped count. If you have a router that is running a Linux (e.g. dd-wrt or openWRT) or has some sort of busybox that you can ssh into, you could also run tcpdump in the router to try to see if the packets are getting dropped between the router and the destination host.

2
  • i don't have much more device connected. Data transfer takes place between Rpi and a device sensor. In this, i think buffer overflow is not a matter and also the network congestion. Important factors are interference and faulty hardwares right? – mcv Feb 1 '18 at 6:03
  • @mcvishnu see updated answer – miravalls Feb 1 '18 at 7:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.