title: Linux command to send binary file to serial port with HW flow control?
body: <p>I need to send binary file <em>to rs232 device</em> (printer) which not always can accept data and so it has BUSY output signal, which i connect to CTS pin. </p>
  
  <p>I try to use it with <code>minicom</code>, and hardware flow control works just fine. But i can't send raw file using minicom, it works wrong ant i think minicom not loves zeroes in file.</p>
  
  <p>At other hand, i try to use <code>cat file &gt; /dev/ttyS5</code>, along with <code>stty -F /dev/ttyS5 clocal</code> or <code>stty -F /dev/ttyS5 crtscts</code>. None of this work: HW control not work at all, data transfer just stops (often at middle of byte when <strong>space</strong> state on TXD stucks!) and never continues after release of BUSY. Behavior not depends on <code>clocal</code> or <code>crtscts</code> i use.
  And also <code>cat file &gt; /dev/ttyS5</code> never wait, even if BUSY was active <em>before</em> this command.</p>
  
  <p>Please note, using minicom, i ensure that i have correct connections, support for RTS/CTS in kernel and in RS232 PCI-E board, etc.</p>
  
  <p>So the question is, how i can do correct binary file transfer from command line using HW flow control? Thanks.</p>