Home/Support/Support Forum/UDP Dropped/Missing Packets

UDP Dropped/Missing Packets

0 votes
I am prototyping a device controller using an Arudino Uno and an XBee S6B (latest firmware). My goal is to have a 110 byte UDP packet sent out every second. Part of the device interaction with the outside world is the duration of time that has past since the controller was turned on, so a packet every second is ideal.

I realize that occasionally packets may drop, so I actually send out a packet every 500ms, but what I see occasionally is that I have random times where out of nowhere the packets disappear for upwards of 10 seconds.

I ran a long test and while the delay varies from 2 seconds to 10 seconds, over the course of a half hour roughly 5 % of the packets I send get lost.

I've tried using different wifi networks, different send times, different baud rates, etc. I can't seem to find any consistent improvement.

Is there something I could check for to solve this mystery?

I don't mind losing an occasional packet but having the device not talking randomly for 5 to 10 seconds here and there is a big problem.
asked May 5, 2015 in IEEE 802.11 (Wi-Fi) by epinc New to the Community (0 points)

Please log in or register to answer this question.

2 Answers

0 votes
Have you tried using TCP instead of UDP? TCP has retries where as UDP is a broadcast.
answered May 13, 2015 by mvut Veteran of the Digi Community (11,302 points)
Thanks for taking the time to reply... the reason I am using UDP is so that I can use UDP broadcast on the xbee and have the an app on a mobile device be able to easily discover the ip address of the hardware we are developing by simply listening on a given udp port for data being transmitted from the xbee

Is there any way to accomplish something similar using TCP?
You can still run broadcast packets in TCP but in either case, you have timeouts within the protocols that you have to contended with.  Both of which can and will result in various times you will and can have data received.
How can I run broadcast packets in TCP? I thought this was not possible?
How can I broadcast packets in TCP? I thought this was not possible?
0 votes
If I recall you send to the IP address 252.
answered Jul 9, 2015 by mvut Veteran of the Digi Community (11,302 points)
...