How to pass Hexadecimal commands via Serial control.

I’m trying to control an MX0404 HDMI Matrix controller via a USB to Serial cable.
The matrix controller has routing buttons on it, but I need it to be very quick, hence the app.
I can open the serial device, and can see return codes from the device when I use it manually.

The documentation (such as it is) gives the commands I need to send and specifies that they should be in Hex.
for example:
0x05 0x55 0x19 0x1D 0x77
should switch output 1 to input 2.

The Serial control seems to be set up correctly (I can see return codes) but specifies that anything transmitted by Serial.Write must be in a string.
It doesn’t seem to work using Serial1.Write (“0x05 0x55 0x19 0x1D 0x77”)

Am I dense, or am I overlooking something?

If you need to send Hex strings (as Hex) to a device don’t include spaces try:

Serial1.Write ("0x050x550x190x1D0x77")

Also try to send characters (i bet for this). as:

Serial1.Write chr(&h05)+chr(&h55)+chr(&h19)+chr(&h1D)+chr(&h77)

Also check the serial parameters (speed, parity, stop bits, protocol (hard/soft), cabling…)

Jose… brilliant! That works wonderfully.
Thanks for setting me straight so quickly.
I appreciate the effort.
Peter T

Glad to help. Many years talking to printers/modems :slight_smile:

Which one worked? The chr(&h) one?