Skip to content

aaron-clovsky/ctrl_monoprice_4067

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Control Monoprice HDMI Switch #4067 via RS-232

MOTIVATION

The Monoprice HRM-2218F is an automatic HDMI switch that supports RS-232 based control. This program was written to simplify the process of automating the HRM-2218F on Linux.

CREDIT

The mono-switcher program by Anthony Mattera (KernelZechs) helped me to locate the binary protocol, originally reverse engineered by Josh in an Amazon review. I have included the CREDIT.md file (a copy of Josh's Amazon review) which was prepared by Anthony Mattera in this repo for reference.

BUILD INSTRUCTIONS

  • This program is intended to be built and run on Linux
  • Install a C compiler if one is not present (Run sudo apt install build-essential on Debian distros)
  • cd to this repo's directory
  • Run make

SYNOPSIS

ctrl_monoprice_4067 <DEVICE> [-i input] [-r retries] [-t ms] [-v]

DESCRIPTION

Simple terminal program to control the HRM-2218F.

DEVICE should be the RS-232 device connected to the HRM-2218F, it will likely be located at /dev/tty*.

This program may return one of three values:

  • 0 (Success)
  • 1 (Failure)
  • 2 (Invalid arguments)

On success this program will output (to stdout) the currently active HDMI input, or zero if no input is active.

Errors and verbose messages are output to stderr.

When changing inputs the currently active input will not change if that input is not currently active, for example:

  • Assuming HDMI 1 and 2 are active and the current input is 1 then running:
    ctrl_monoprice_4067 -i 2
    Will output: 2
    However, running:
    ctrl_monoprice_4067 -i 3
    Will output: 1

COMMAND-LINE OPTIONS

  • -i input
    Set the input, valid range is [1-8]
  • -r retries
    Set the number of retries before giving up, valid range is [0-99]
  • -t timeout
    Set the timeout (in milliseconds) for calls to read() and write(), valid range is [10-10000]
  • -v
    Enable verbose output

LICENSE

This software is licensed under the MIT License.

About

Control Monoprice HDMI Switch #4067

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published