How can i send a binary file via serial in linux?
<p>I want to control a hdmi matrix switch via serial connection.
In Windows i already tried it successful by the following steps:</p>

<p>Decode the necessary HEX from a simple textfile to a binary:</p>

<pre><code>certutil -decodehex on.txt on.bin
</code></pre>

<p>Then configure the mode for my comport:</p>

<pre><code>MODE COM1:19,n,8,1
copy on.bin \\.\com1 /b
</code></pre>

<p>Now i try to do the same in linux (debian). Since the files are binary i figured i can reuse them, so i transferred them to the linux system and tried the following to configure the comport:</p>

<pre><code>stty -F /dev/ttyUSB0 19200 cs8 -cstopb -parenb
</code></pre>

<p>And sending the binary:</p>

<pre><code>cat on.bin &gt; /dev/ttyUSB0
</code></pre>

<p>But that won't do anything.´</p>

<p>EDIT: </p>

<p>It's a different PC, but the USB2Serial Converter ist the same. 
<code>lsusb</code> gives me: </p>

<p><code>Bus 001 Device 003: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter</code></p>

<p>dmesg shows </p>

<p><code>
[    5.070075] usbserial: USB Serial support registered for generic
[    5.072824] usbserial: USB Serial support registered for ch341-uart
[    5.073476] usb 1-9: ch341-uart converter now attached to ttyUSB0</code></p>