title: 'screen /dev/ttyUSB0' with different options such as databit, parity, etc
body: <p>I am trying to use</p>
  <pre class="lang-none prettyprint-override"><code>screen /dev/ttyUSB0
  </code></pre>
  <p>to connect to a old computer(s) through a USB-serial interface.</p>
  <p>I have not figured out to put the correct options in my command line to get a non-gibberish feedback from my computer (the text received is all screwed up).</p>
  <p>My operating system is <a href="https://en.wikipedia.org/wiki/CentOS" rel="nofollow noreferrer">CentOS</a>, with <a href="https://en.wikipedia.org/wiki/GNOME" rel="nofollow noreferrer">GNOME</a> 2.16.0.</p>
  <p>I see that there is a program called KPPP which has a &quot;Terminal...&quot;, but I haven't figured that one out either. So I am trying to use CLI with 'screen', but I am having trouble setting the correct parameters (obviously, I do not understand how to put these parameters to use with stty). It is not an option installing applications or doing anything with this computer, so I have to use what's already there. 'screen' seems to do the job, but the text received is gibberish as mentioned earlier (&quot;$$@%idj ldj&quot;, etc.)</p>
  <p>I need these parameters for computer one:</p>
  <pre class="lang-none prettyprint-override"><code>Baud: 9600 Databit: 8 Parity: No Stopbit: 2 Flow control: Hardware.
  </code></pre>
  <p>For computer two I need:</p>
  <pre class="lang-none prettyprint-override"><code>Baud: 9600 Databit: 7 Parity: Even Stopbit: 1 Flow control: Hardware
  </code></pre>
  <p>The baud rate is easy;</p>
  <pre class="lang-none prettyprint-override"><code>screen /dev/ttyUSB0 9600
  </code></pre>
  <p>But what to do with the rest, I do not know. I have found the option for stop bits:</p>
  <blockquote>
  <p>cstopb (use two stop bits)</p>
  </blockquote>
  <blockquote>
  <p>-cstopb (use one stop bits)</p>
  </blockquote>
  <p>But how do I use it correctly?</p>
  <pre class="lang-none prettyprint-override"><code>screen /dev/ttyUSB0 9600 -cstopb
  </code></pre>
  <p>or</p>
  <pre class="lang-none prettyprint-override"><code>screen /dev/ttyUSB0 9600,-cstopb
  </code></pre>
  <p>How can I connect to the other computer through serial interface with all of the listed parameters?</p>
  <p>I have found this <a href="http://osr507doc.sco.com/man/html.C/stty.C.html" rel="nofollow noreferrer">manual for stty</a>.</p>
  <p>Is databit the same as this option?</p>
  <pre class="lang-none prettyprint-override"><code>cs5 cs6 cs7 cs8
      Select character size (see termio(M)).
  </code></pre>
  <p>Parity:</p>
  <pre class="lang-none prettyprint-override"><code>parodd (-parodd)
      Select odd (even) parity.
  </code></pre>
  <p>Stopbit:</p>
  <pre class="lang-none prettyprint-override"><code>cstopb (-cstopb)
      Use two (one) stop bits per character.
  </code></pre>
  <p>But what about hardware control?</p>
  <p>Anyway; this is still not working;</p>
  <pre><code>screen /dev/ttyUSB0 9600 cs8 oddp cstop
  </code></pre>
  <p>or</p>
  <pre><code>screen /dev/ttyUSB0 9600 cs7 evenp -cstop
  </code></pre>