I have a serial port /dev/ttyS0 that keeps transmitting data.
I already have a running process P1 that listens to the serial port and processes the data. That process cannot be customized to listen to another serial port.
I am building a python script to only listen to the same data and store the output. If I directly connect to the serial port then P1 dies not get any data as my script has already read it.
How can I sniff the data without interrupting the transmission to P1?
Someone mentioned that o could use named pipes but I am not sure how.
Thanks to the link Marcos G. provided I looked into socat command and ended up with using https://github.com/danielinux/ttybus as descried in use case 1. It seems to be intended to resolve certain scenarios that can be resolved with socat but in a more straightforward way.