2 Replies Latest reply on Mar 20, 2016 7:28 PM by johnhimself

    Controlling HDMI Switch via RS232/UART




      • I have an HDMI switch that is controllable via RS232


      • Scenario 1: 
        • Setup: PC connected to HDMI switch using USB -> serial adapter 
        • Test: Opening PuTTY on COM port and sending command "sw i01" from my PC
        • Results: HDMI switch input changes to port 1 [Good]
      • Scenario 2:
        • Setup: Galileo/Arduino UART port connected to TTL->RS232 adapter connected to serial->USB adapter connected to PC with PuTTY program open on COM port
        • Test: Sending command "sw i01" from Arduino to PC using code below
        • Results: "sw i01" prints repeatedly on the Putty terminal [Good]
      • Scenario 3:
        • Setup: Galileo/Arduino UART port connected to TTL->RS232 adapter connected to HDMI switch serial port
        • Test: Sending "sw i01" from Arduino repeatedly to HDMI switch using code below
        • Results: HDMI port does not switch from port2 to port1 [Bad]





      [Note: Galileo Gen 2 requires Serial1 for UART communication]

      void setup() {

      Serial1.begin(19200); }


      void loop() {

      Serial1.print("sw i01");

      Serial1.write(13); // CR

      Serial1.write(10); // LF

      delay(1000); }




      It seems like Scenario 1 and 2 confirm that the Galileo/Arduino->HDMI switch communication should work, but it doesn't.


      • Am I missing something regarding physical connectivity?
      • Does manually typing "sw i01" in PuTTY send different commands than I have in the Arduino code?
      • Do I need to send any additional commands from the Arduino code to ensure it meets the HDMI switch serial requirements of baud rate: 19200, data bits: 8, parity: none, stop bits: 1, flow control: none?
        • 1. Re: Controlling HDMI Switch via RS232/UART

          Hello johnhimself,


          I believe the issue might be related to the physical connection, it would be of great help if you could add a schematic and pictures of how you are connecting the three parts. I doubt this is related to the sketch part but if you had access to a logic analyzer, it would be great to check the outputs of all the stages of the "translation".



          • 2. Re: Controlling HDMI Switch via RS232/UART

            Yes, I found it is was related to the physical connection!


            In Scenario 3, I originally had the Sparkfun TTL/RS232 adapter that had a female DB9 connector wired to the HDMI switch female DB9 connector using a male/male serial cable. The serial cable I bought was a straight through cable.


            I swapped it out with a null modem cable and it worked right away.


            Looking at the wiring diagram, I thought swapping the Tx/Rx pins on the Sparkfun adapter would have achieved the same result as the null modem cable, but apparently not.


            If anybody can point out why the null modem cable made the difference, that would be something good to know for the future.

            1 of 1 people found this helpful