On Jun 17, 2013, at 9:54 PM, Philipp Hachtmann <hachti at hachti.de> wrote:
2. I am a Linux user. And I have encountered one big
problem with Linux and serial ports: If I send a file down the port via cat, the transfer
stops immediately when cat closes the port. The data in the FIFO or anywhere between the
application and the UART seem to be lost.
I have not always seen those problems. On my current Linux 3.4.5 box I can cat and
everything works fine.
One fix back when I had problems on my notebook was to disable the FIFO in the 8250
driver.
Another one is something like doing a
(cat <file>; sleep 0.1) > /dev/ttyXX
Then You open a subshell which has its output connected to the port. And the delay makes
it possible to drain all buffers before the port is closed.
How about with dd? Seems that would try to drain buffers before closing.
- Dave