Latency spikes when sending live remote data to client through virtual here

Hello,

I needed a way to connect to a USB over a long distance remotely. Virtual here seems like a great way to do just that.

I have tried many different ways of connecting the virtual here server and client, but they all seem to cause latency spikes. This is a problem because I am trying to view live ECG data that is being transmitted to the USB. The lag spikes mess up the data and make it unviewable.

First I tried to use easy find to connect the devices. This works great and instantly connects, but I need the connection to have a constantly low latency. Whenever I look at the virtual here latency, by looking at the properties, I see that there is a constant latency of 40 ms, which is good enough, because it doesn't seem to mess up the live data. But about every 30 seconds or so, the latency spikes up to 200, 300, or even 1000 ms. This causes the data coming through the USB to go away and then come back when the latency drops down again. I was wondering if there was a way to stop this.

The second thing I tried was to use tail scale to form a strong connection between the devices and then use virtual here. Whenever I tried this though, I got a similar result. I get a latency of about 40 ms, then here and there it spikes and ruins the live data that is being transmitted through the USB.

Both devices have a stable wifi connection, but for some reason are prone to consistent latency spikes.

The ECG data transmiting to the USB is crystal clear and not an issue because the spikes in the ECG data correlate directly to the spikes in the virtual here USB connection. This shows me that the connection between the devices through virtual here is the problem, so the question is, is there a way to eliminate these latency spikes completely?

I think the latency spikes cause some of the data to be lost, causing spikes in the ECG data.

Also, how can I lower latency if at all?

I have also been looking at changing ports and port forwarding as a possible solution. I know that easy find forms a UDP connection on port 443, while tail scale forms a TCP connection on port 7575. So another question is, would trying a connection through different ports affect or eliminate latency spikes?

#2

I think you should try to change the wifi channel of the router. That would be my first suggestion. It might be from some other network that is causing the spike and interference.

#3

I will definitely try changing the wifi channels and seeimg how it effects my data. I will get back with you with the results when I have tried this. In the mean time, I was wondering if you could help me with another question.

How does something like WhatsApp form a seamless connection between two devices using cellular data. And then it also transfers voice data between the devices seamlessly, live and without any issues. I can be anywhere in the world and connect to WhatsApp and talk to people all over the globe with clear and live voice data. What I am trying to achieve is something similar to this, but instead of voice data, I would like it to be my ECG data. So I am wondering, do you know anything about how WhatsApp works and transmits live voice data over a cellular connection?

#4

Its a quite technical but to summarize, whatsapp etc drops data from the voice signal if the latency is too high or throughput too low, whereas the USB signal that virtualhere transfers cannot drop data.

The human ear can tolerate a bit of dropped data so you don't notice but its there.

They work on different levels. USB is near the bottom and higher layers use the exact USB data to then transmit over the internet.