Timeline for How do I use a serial port on Linux like a pipe or netcat?
Current License: CC BY-SA 3.0
6 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Oct 10, 2022 at 4:57 | comment | added | Gabriel Staples | @sawdust, I added an answer here: unix.stackexchange.com/a/720397/114401 | |
| Feb 16, 2022 at 0:47 | comment | added | sawdust |
This answer is wrong, and doesn't answer the question. The Linux kernel driver for the UART does buffer all received data for the termios subsystem. See Linux serial drivers. Additionally, the command cat < /dev/ttyS0 would create a "client app to receive the bytes landing on the serial port". A real reason for the hang could be misuse of canonical mode.
|
|
| Aug 22, 2017 at 17:58 | comment | added | thom_nic |
so if you were to run cat /dev/ttyS0 & or cat /dev/ttyS0 > somefile & and then echo/pipe to the device, you will see the data come out the other side. I suspect one could also use mkfifo, pipe from the serial port to the fifo buffer then read off the fifo as desired.
|
|
| Sep 22, 2014 at 7:40 | vote | accept | user3243135 | ||
| Oct 19, 2013 at 8:49 | review | First posts | |||
| Oct 19, 2013 at 10:31 | |||||
| Oct 19, 2013 at 8:33 | history | answered | ewhac | CC BY-SA 3.0 |