user62759: I am assigned on a project involving Arduino and Raspbery PI. I have plenty of experience with Arduino and 0 with Raspbery or Linux. Person working quit and there are some problems that need me to start debuging.
The project involves control of input and output by Arduino and a touch screen and SMS aplication in Raspbery. They comunicate with standard Serial port using USB.
I want to read that communication on my PC terminal. What would be the simplest way of inserting myself without modifying anything on Raspbery?

user4143: If all you want to do is monitor what is going on then you can take a pair of USB to UART adaptors and connect the RX pin of each to the Arduino - one to the RX pin to see what the Arduino is receiving, and one to the TX pin to see what the Arduino is transmitting.
You then have to open both COM ports in separate applications (unless you can find an application that will allow you to open both together) to see what each channel has going through it.

user7508: You may be able to sniff the communication from the Raspberry Pi itself,
with no extra hardware. Assuming the program on the Pi can be configured
to use a serial port other than /dev/ttyACM0, a sniffing
program could create a pseudo-terminal pair, then forward data back and
forth between /dev/ttyACM0 and the master pseudo-terminal, while
logging everything. If you point your Pi application to the slave
pseudo-terminal, you have your man-in-the-middle logger:
Arduino --(/dev/ttyACM0)-- logger --(pseudo-tty)-- application

The interesting thing about a slave pseudo-terminal is that, as far as
the application is concerned, it behaves exactly like a regular serial
port.
There seem to be quite a few implementations if this idea. C.f. the
answers to these other stack exchange questions:

How can I monitor serial port traffic?
Sniff serial port on Linux

Just as an example, the README of
interceptty states:

interceptty is designed to sit between a serial port (or other
  terminal device, or program, or socket, or something connected to a
  file descriptor) and a program which is communicating with that
  device, recording everything that goes back and forth between the two.
  It does this by opening the real device, creating a pseudo-tty, then
  forwarding everything between the two, recording whatever it sees.


62759: <p>I am assigned on a project involving Arduino and Raspbery PI. I have plenty of experience with Arduino and 0 with Raspbery or Linux. Person working quit and there are some problems that need me to start debuging.</p>

<p>The project involves control of input and output by Arduino and a touch screen and SMS aplication in Raspbery. They comunicate with standard Serial port using USB.</p>

<p>I want to read that communication on my PC terminal. What would be the simplest way of inserting myself without modifying anything on Raspbery?</p>
 4143: <p>If all you want to do is monitor what is going on then you can take a pair of USB to UART adaptors and connect the RX pin of each to the Arduino - one to the RX pin to see what the Arduino is receiving, and one to the TX pin to see what the Arduino is transmitting.</p>

<p>You then have to open both COM ports in separate applications (unless you can find an application that will allow you to open both together) to see what each channel has going through it.</p>
 7508: <p>You may be able to sniff the communication from the Raspberry Pi itself,
with no extra hardware. Assuming the program on the Pi can be configured
to use a serial port <em>other</em> than <code>/dev/ttyACM0</code>, a sniffing
program could create a pseudo-terminal pair, then forward data back and
forth between <code>/dev/ttyACM0</code> and the master pseudo-terminal, while
logging everything. If you point your Pi application to the slave
pseudo-terminal, you have your man-in-the-middle logger:</p>

<pre><code>Arduino --(/dev/ttyACM0)-- logger --(pseudo-tty)-- application
</code></pre>

<p>The interesting thing about a slave pseudo-terminal is that, as far as
the application is concerned, it behaves <em>exactly</em> like a regular serial
port.</p>

<p>There seem to be quite a few implementations if this idea. C.f. the
answers to these other stack exchange questions:</p>

<ul>
<li><a href="https://unix.stackexchange.com/questions/12359/how-can-i-monitor-serial-port-traffic">How can I monitor serial port traffic?</a></li>
<li><a href="https://serverfault.com/questions/112957/sniff-serial-port-on-linux">Sniff serial port on Linux</a></li>
</ul>

<p>Just as an example, the README of
<a href="https://github.com/geoffmeyers/interceptty" rel="nofollow noreferrer">interceptty</a> states:</p>

<blockquote>
  <p>interceptty is designed to sit between a serial port (or other
  terminal device, or program, or socket, or something connected to a
  file descriptor) and a program which is communicating with that
  device, recording everything that goes back and forth between the two.
  It does this by opening the real device, creating a pseudo-tty, then
  forwarding everything between the two, recording whatever it sees.</p>
</blockquote>
