Greetings,
I'm currently evaluating VirtualHere as a solution that allows to remotely connect via network a PC to a USB CDC device, but I'm experiencing a problem when the device is continuously transmitting data to the PC with an interval that is lower than the network latency between the PC and the device:
I was expecting VirtualHere to combine the USB bulk data received in the network latency timeframe but this is only occurring after precisely 25 bulk data packets coming from the device.
I've tried to represent the situation using a sequence diagram here:
Why is VirtualHere not immediately combining USB data from the device while is transmitting the previous one over the network? Is there any way to configure VirtualHere to make it do so?
This behaviour is causing added latency over the one already provided by the network:
For example, with device sending message every 8ms and network latency of 20ms the 25th message is received by the PC with a 420ms delay from when it has been sent by the device
Thank you
Additional details:
VirtualHere client 5.7.9 running on Windows 10 22H2 64bit
VirtualHere server 4.7.0 running on Windows 10 22H2 64bit
Size of data sent by the device via USB CDC is 65 bytes.
.
Virtualhere sends/receives USB signals exactly, it does not batch any transmissions because that is impossible in the USB protocol. The USB protocol is a state machine, the next message cannot be sent until the previous message is acknowledged.
So it really does get transmitted like that even if virtualhere is not in the picture
Its very likely waiting for a returning interrupt or bulk transmission to confirm the packet is received before the next one can be sent.
Hi Michael,thank you for…
Hi Michael,
thank you for your response!
I was also thinking about that but then I don't understand why after some packets the behaviour changes and I start to see data that the device is sending being combined into a single USB BULK transmission.
Maybe that is some kind of logic embedded into the CDC device class?
.
It could be your serial chip that is buffering the packets itself. So after 25 packets then it responds to the BULK request.
What serial device is it? Or is it a custom developed CDC device?
Most serial adapters have a small buffer for tx/rx serial data before its put onto the USB bus. E.g https://www.ftdichip.com/Documents/AppNotes/AN232B-04_DataLatencyFlow.p…