UDP Broadcast/Multicast Reception Stops for Intervals

Our app receives real-time GPS and aircraft data from devices via UDP broadcast and/or multicast on a WiFi network created by the device.

We have identified that the iPhone or iPad will just stop receiving UDP broadcast/multicast data for an interval of time. In general, it appears after roughly every 128KB of data is received.

In the attached screenshot from Xcode instruments, you can see the data reception alternating on/off.

We have verified with Wireshark that the data is still flowing during that entire time period. And by tracking bytes received the app ultimately receives about 55% of the bytes, which tracks with the Network graph.

We have used different approaches to the network code, including GCDAsyncUdpSocket, BSD Sockets, and the Network framework. We've tried it on background threads and the main thread. Tested it on iPads and iPhones. All produce the same result. The data is just never reaching the app code.

Any insight on what may be temporarily disabling data reception?

There are many different potential causes for a problem like this. Let’s start with this:

Written by ifpdev in 775909021
We have verified with Wireshark that the data is still flowing during that entire time period.

Where did you check this? Using RVI?

With reference to the diagram in Investigating Network Latency Problems, my recommendation is that you use an RVI packet trace at point E to make sure that the data actually made it to the device correctly. If so, you’re dealing with an on-device problem. If not, you need to look at the network itself.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

UDP Broadcast/Multicast Reception Stops for Intervals
 
 
Q