Open zapta opened 1 year ago
@zapta I was wondering if you found a solution for the latency.
I discovered the same ~15ms latency issue on a linux machine (RPi, FTDI USB/Serial). Even with setting USB Latency to 1 (see https://granitedevices.com/wiki/FTDI_Linux_USB_latency) I am still experiencing latency issues.
@maljac, I didn't find any solution, just living with it.
Your link is interesting. I will try it if I will find an equivalent configuration in Windows.
Does it affect only asyncio library? Did you try it with a base pyserial?
I am now deciding on whether to use pyserial_asyncio, and I'd rather not have this latency.
I am using a simple test program to measure the latency of asyncio-serial and the stack below it. The test program, in --no-master mode, sends back every data it receives, and I measure the time difference between the incoming and outgoing on the wire using a logic analyzer.
The latency I get is ~15ms on a Windows 10 with an FTDI USB/Serial interface. Is this reasonable?
BTW, If I use an Arduino echo program instead, I get latency of ~50us.