1

I want to control a hdmi matrix switch via serial connection. In Windows i already tried it successful by the following steps:

Decode the necessary HEX from a simple textfile to a binary:

certutil -decodehex on.txt on.bin

Then configure the mode for my comport:

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

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:

stty -F /dev/ttyUSB0 19200 cs8 -cstopb -parenb

And sending the binary:

cat on.bin > /dev/ttyUSB0

But that won't do anything.´

EDIT:

It's a different PC, but the USB2Serial Converter ist the same. lsusb gives me:

Bus 001 Device 003: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter

dmesg shows

[ 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

Borbosch
  • 11
  • 2
  • 3
  • Try adding `raw` to your **stty** command line. BTW "*binary"* is an adjective, not a noun. So to be clear you should write that you are trying to send a binary file. – sawdust Jul 25 '16 at 22:21
  • Thanks for the heads up! I changed the title. I added the suggested `stty -F /dev/ttyUSB0 19200 cs8 -cstopb -parenb raw`. Unfortunately it didn't help. – Borbosch Jul 26 '16 at 10:44
  • The **cat** command works for me, so you have to provide a lot more info to determine why it isn't working for you. Is the Debian PC a different machine from the Windows PC? Same USB adapter? – sawdust Jul 26 '16 at 23:02
  • It's a different PC, but the USB2Serial Converter ist the same. `lsusb` gives me: `Bus 001 Device 003: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter` `dmesg` shows `[ 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` – Borbosch Jul 27 '16 at 09:17

0 Answers0