Search code examples
linuxraspberry-piserial-portcat

Why does cat < /dev/ttyS0 send output to ttyS0?


When I use cat < /dev/ttyS0 and data is received, it doesn't display on the terminal that I typed the command into but instead gets sent back to to ttyS0 where it came from. How can I make it not do that?


Solution

  • It's not sent back but echoed, try

    stty -echo </dev/ttyS0
    cat </dev/ttyS0
    

    and echo should be suppressed.