I am trying to continuously send small UDP packets (containing only couple of bytes) from Hololens 2 to a computer over wifi. In my case it is necessary to transfer these data at a stable rate of 60fps - without any dropouts. This works as expected, but I have encountered a strange problem - incoming data start "lagging" heavily every 5 minutes. This lagging happens for a couple of seconds and then it reverts back to stable and continuous stream. Unfortunately this is unacceptable for my use-case and I am hoping to get rid of this issue. This gif shows lagging of incoming udp data in real-time (each datagram contains frame number that is visualized in graph).
I have been trying to analyze this problem for quite some time, but so far I haven't figured out what is causing it. Nevertheless, I can provide these conclusions from my tests:
Wifi signal isn't a problem. I have a wifi access point placed directly next to a Hololens 2 - providing excellent signal. Whole setup consists of my laptop that is connected directly to Cisco access point (through ethernet connection) and Hololens 2 which is connected to its wifi. There is no internet access on this network - it is used just for local networking. Also there isn't any network interference playing a role in this problem as I have tried this at various locations with the same results. I have also tried adding one more computer onto this wifi to see if I could get a stable stream from it - both Hololens 2 and this computer were streaming similar data to my laptop. During the phases where Hololens data were lagging, data from this computer were stable without any issue.
Application itself running on Hololens 2 has a stable rate of 60fps without any frame drops. I run tests with simple app created using Unity and also with native UWP app (both behaved the same in terms of networking). I have also observed the same results with different socket implementations - both
System.Net.Sockets
andWindows.Networking.Sockets
performed the same.Interestingly, this problem doesn't occur when I connect to Hololens 2 directly through ethernet. I have successfully tested this with usb-c to ethernet adapter which provided stable data transfer (without any lagging). Therefore it is clear that lagging is present only when using wireless network adapter on Hololens 2.
I am definitely no network specialist, but I have tried to examine packets coming in to my laptop network interface through Wireshark, but there wasn't any "suspicious" activity happening during these lagging periods. Out of curiosity I have also captured packets directly on Cisco access point and have created following graphs in order to visualize what was happening there.
This graph shows arrival time of all packets (y axis represents time in seconds, x is packet id). The middle area is clearly suffering from mentioned lagging.
This graph shows only filtered packets that belong to my udp communication - all other packets are displayed with 0 time in order to visually identify packets used for different (unknown) communication. You can clearly tell that majority of other requests happened exactly in those problematic areas. Unfortunately I don't know what those requests are as the capture output from Cisco access point seemed rather cryptic to me. All I could tell is that majority of those requests were sent from Hololens 2 to Cisco access point.
Based on these observations I would say that every 5 minutes is Hololens 2 doing something in the background that causes these network problems. It influences only wifi network interface. Even though I haven't tried holographic remoting or spectator view, I believe they must suffer from same lagging. Please does anyone how to resolve this problem? Since Hololens 2 doesn't have control over firewall or services, I am feeling kind of stuck here and was hoping that some Hololens developer could help me. Thanks.