Home

  • IOgear GCS1964 / ATEN CS1964 KVM RS232 Serial Control

    The IOgear GCS1964 (which is really a rebranded ATEN CS1964) is a 4-input / 3-output KVM switch that I’ve been using for my main work setup for most of the pandemic WFH fun. One neat thing about it is that it has a built-in RS232 serial port, intended to be used to “stack” multiple KVMs in a large A/V setup. I got the idea of using this to control the KVM from a Raspberry Pi, with the long-term goal of being able to switch inputs from my Stream Deck.

    Getting the serial port to communicate was surprisingly hard to figure out, because of some notable omissions from the documentation.

    Cabling

    The KVM switch has an RJ45 port on the back for serial communication. You need a standard RJ45-DB9 cable (32, 63, 55) to connect to your PC (or Pi). I used this one.

    Primary / Secondary Mode

    Here’s the key to getting things to work: the pinout for the RJ45 port changes depending on the mode the switch is in. There’s a small switch on the back of the KVM labeled “P/S” for “Primary” and “Secondary”. If the switch is in Primary mode, it sends commands. If it’s in Secondary mode, it receives commands. You want it in Secondary (S) mode to access the RS232 port, but be warned: setting the switch to S will disable the front panel buttons, so make sure you have a plan if you lose keyboard access to your PC through the KVM (and thus, serial access to the switch). You can always manually switch the P/S selector back to P to regain access to the front panel temporarily (not that this happened to me or anything).

    Using the Serial Console

    Set your terminal program (HyperTerm, PuTTY, etc.) to 19200 8N1 and no flow control. Once you open the connection, nothing will appear to happen, because “RS232 mode” on the switch isn’t “open” yet. If you try to send a command, you’ll get a beep and see:

    Please Open RS232 Function!

    To get access to the console, type “Open” (case sensitive). This will not be echoed back to your terminal (unless you enable “local echo” in your terminal software). After you press enter, you should then see:

    Open Command OK
    Welcome to ATEN GCS1964
    Copyright(C) 2019 ATEN International Co., Ltd

    Now you have full control of the switch! Refer to the RS232 Commands manual (available from IOgear.com or aten.com) for the full list of things you can do. At a minimum, you can switch ports on the KVM by typing swi0X where X is the number of the new port. For example, to switch to port 1, type

    sw01

    Remember that you won’t see the commands you send, but you get a “Command foo OK” or “Command foo incorrect” response. Hope this info is helpful to someone in the future. In my next post, I’ll talk about writing an API server to control the switch.

  • A Fresh Start
    I’m slowly rebuilding my personal site, using WordPress w/ the OceanWP theme and Elementor plugin. We’ll see how it goes.