On Wed, Feb 24, 2021 at 09:23:45AM -0500, Michael G. Katzmann wrote: > I've noticed that when the serial device is closed, the USB serial > device dumps any buffered data. Is this expected behavior? > > i.e ls -l >/dev/ttyUSB0 will not print everything (I'm missing some at > the end) but > > (ls -l; sleep 30) >/de/ttyUSB0 will print everything. > > (this is at 110bd so it's probably longer than most people will see to > drain the buffer) Depends on the driver unfortunately. I guess this is with your PL2303 for which we don't know how to determine when the FIFO has emptied. For speeds >1200 Bd we instead wait for the full 256 bytes to clear, but we don't add 23 seconds to every close at 110 Bd for example and instead cap the drain delay at 2 s (see tty_port_drain_delay()). Johan