networking - 50% udp packets lost -


i sending/receiving short udp packets between computer (c#) , microcontroller (c++). independently of speed, losing around 50% of udp packets, more, less.

in c# using udpclient sending ipendpoint (synchronous) , receiving asynchronously.

my buffers big enough , see losses produced in computer both sending , receiving (the micro send many packets receives). trying send/receive around 60 packets per second, can adjust , 10 packets per second have losses. example, sent 20 packets per second, micro receives , sends 15, , computer receives 10 packets per second.

we talking local wired ethernet connection of 1 gigabit, short (10ft maybe). sending unicast packets, although in network have multicast video (12 mbps). biggest packet 120 bytes, of them around 30-40 bytes

any advice how debug problem or can cause it?

thanks.

here things consider:

  • is wired connection or wireless connection? fifty percent udp packet loss of course more common in wireless case, though on poor link.

  • assuming wireless connection, signal strength reasonably high on both devices? can check various utilities, such iwconfig on *nix.

  • what actual bitrate of connection? mention transmitting @ various rates, assume refers how sending packets, rather actual bitrate of link. faster bitrate, higher expected packet loss. believe direct result of antenna physics, data can transmitted @ higher powers if transmitted @ lower bitrates.

  • are these packets being unicast or broadcast? broadcasting packets result in higher packet loss rates. due lack of retry mechanism in lower layers of networking stack in broadcast case.

  • though said packets small, factor affecting udp packet loss size of packets. 1 rather intuitive: larger packet is, less received intact.

hopefully these considerations @ least started in direction of answer.


Comments

Popular posts from this blog

c++ - No viable overloaded operator for references a map -

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - Cannot secure connection using TLS -