1

I have a serial device under /dev/ttyS0 and an application that is reading from the serial device (but not writing to it). I wanted to listen in to the data that is coming in on the serial device but I believe the cat /dev/ttyS0 won't work becuase it is already opened by the application.

I can find the file descriptor in /proc/pid##/fd to /dev/ttyS0. Is there a way to tap into the data coming in on the serial line? I have root access if needed. I don't have the ability to modify the application.

  • You might be able to strace the program and just look at the read() calls – Stephen Harris Feb 5 at 20:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.