Skip to main content

Keyboard & Mouse Over Ethernet

SKAARHOJ Blue Pill products equipped with USB-A can function as a keyboard/mouse transmitter to hardware endpoints connected to one or more computers, allowing remote control via keyboard and mouse over ethernet. This setup is similar to a KVM (Keyboard, Video, Mouse) solution, but without the video component, which is assumed to be managed separately.

The goal is not to replace existing KVM solutions on the market, but rather to leverage the existing presence of a SKAARHOJ device with USB-A to potentially transmit keyboard and/or mouse inputs over a network to a server, a concept often contemplated by our users.

A key feature of this solution is that it requires a SKAARHOJ hardware device to be connected to the computer being controlled, eliminating the need for software installation on the target computer. Any device that accepts keyboard input will recognize the connected SKAARHOJ device as a keyboard and mouse, thus simplifying setup.

Each controlled computer requires its own hardware device. The solution here uses an existing SKAARHOJ product called "TCP Link for ATEM" loaded with an alternative firmware, available for free download. On the SKAARHOJ panel side, there are two methods: using the xpanel-hids application to connect a keyboard and/or mouse as Raw Panel devices for peer-to-peer configuration, or using the core-skaarhoj-kmserver device for enhanced performance and support for multiple destination channels. The latter allows for easy selection of channels via device parameters, enabling a SKAARHOJ panel to function as a central control panel for keyboard and mouse operations.

USBdrawing.jpg

Benefits:
  • Reduced clutter and fewer devices in your control room: simply connect the keyboard or mouse to your SKAARHOJ device.
  • No software installation required on the destination end: it utilizes a hardware-based solution.
  • Ability to send key presses and combinations from SKAARHOJ broadcast panels using the Raw Panel protocol.
  • Connect multiple destination endpoints using the high-performance, dedicated core-skaarhoj-kmserver device and select between them on your SKAARHOJ panel.
Limitations
  • All keyboard and mouse data is transmitted unencrypted over the network. It is assumed that the network is secure, such as a friendly network or a VPN that provides its own encryption. This is important since sensitive information, such as passwords, might be typed in.
  • Only "standard" keyboards and mice are supported, with HID reports of 8 and 4 bytes respectively. More complex HID reports, such as those from advanced gaming mice, may not be compatible.
  • It is recommended to test the compatibility of the keyboard and mouse you plan to use, as well as the acceptance of input at the destination endpoint, to ensure functionality.

Security

Once again, remember that

  • all data is transferred unencrypted on the network and therefore can be tapped for information such as passwords.
  • the TCP server is either a Raw Panel server or the Keyboard/Mouse server of core-skaarhoj-kmserver and in both cases, other clients can connect by default and listen to the traffic unless you set up limitations (such as allowed client IPs)

The SkaarhojKM firmware for TCP Link for ATEM will turn this device into a keyboard and mouse when you plug it into a computer. On the ethernet jack it will try to connect to one or two servers as a TCP Client. The servers can be a Raw Panel server that should identify as models XP_HIDS-GENERICKEYBOARD (or XP_CORE_GENERICKEYBOARD) or XP_HIDS-GENERICMOUSE (or XP_HIDS_GENERICMOUSE). This response is what determines if inputs are interpreted as mouse or keyboard commands.

If the server is a Keyboard Mouse server from the core-skaarhoj-kmserver device core, then the communication is set up a little differently and requires the set up of a channel on the device. The channel is used by the device to filter out keyboard/mouse commands intended for other end points and only accept those intended for itself.

Install alternative firmware

Download the binary hex file SkaarhojKM.hex from this page.

Use the SKAARHOJ Firmware Updater tool to upload the file to your TCP Link for ATEM, which is assumed connected via a Micro USB - USB-A cable to your computer. This follows the normal guidelines for updating SKAARHOJ stand alone firmwares (see the TCP Link for ATEM manual).

image.png

As it uploads, you should see a green progress bar moving:

image.png

Set IP addresses

After a successful upload or a power cycle, go immediately to the Serial Monitor of the SKAARHOJ firmware updater. You should see output like this:

image.png

You now need to manually set IP addresses up. Here is an example:

ip=192.168.10.21
subnet=255.255.254.0
server1=192.168.11.119:9963
server2=192.168.11.119:9964
reset

Each of these lines, one at a time, is typed into the input field at the bottom of the SKAARHOJ Updater Application window.

Eventually it will reset and in this case the servers connect and show that in the serial monitor:

image.png

Serial Monitor

The serial monitor is an important tool to check if everything is correctly set up. You can even monitor the incoming commands such as key presses and mouse movements. Here is an example:

image.png

The most important thing to look out for is errors. If one of the servers are not connected by set up with an IP address, you will experience heavy lagging for the other server. So watch out for such messages. They will look like this:

image.png

Command Description
ip=x.x.x.x
Sets the IP address of the TCP Link for ATEM device. Each x is an octet in the IP address, fx. "ip=192.168.10.21"
gateway=x.x.x.x
Sets the gateway of the device. Each x is an octet in the IP address, fx. "ip=192.168.10.1"
subnet=x.x.x.x
Sets the subnet of the device. Each x is an octet in the IP address, fx. "ip=255.255.254.0"
server1=x.x.x.x:port
server2=x.x.x.x:port

Sets the IP address of the Keyboard/Mouse server or Raw Panel device. Each x is an octet in the IP address and port is the port number, fx. "ip=192.168.11.119:9963"

The firmware supports two servers. If input is delivered from a Raw Panel device, one could be your keyboard, another could be your mouse.

Set the server to "0.0.0.0:0" if you want to disable it!

server1Channel=byte
server2Channel=byte

Sets the channel number to listen to when using the core-skaarhoj-kmserver device core which supports multiple end points.

Only packages tagged with this channel will be forwarded to the destination computer.

reset

Reboots the unit

newmac

Will generate a new MAC address for the unit in case there is a clash.

LED codes

During boot up you will see the status LED to the right of the Ethernet jack rotate colors through red, green, blue and finally white.

During boot up it will remain white.

As soon as the unit is in run mode, the led will start blinking:

  • Blinking Red: There is an issue. No connection is likely to be the problem. Check the serial monitor.
  • Blinking Green: All is good, connecting link place.

Approving keyboards on Mac

On Mac OS you will be prompted to identify your keyboard. This will work like any other keyboard you attach, so just press the button explained by the graphic. In terms of keyboard language, this solution is agnostic to that. It assumes a 105 key keyboard and faithfully transfers the keynumbers - not ASCII numbers - between the SKAARHOJ unit and the destination. It's in other words transparent. However a given keypress is interpreted on the destination system is up to that system and the language profile you have selected for the keyboard.

Screenshot 2024-04-30 at 08.34.35.png

Screenshot 2024-04-30 at 08.35.12.png

Screenshot 2024-04-30 at 08.35.46.png

Screenshot 2024-04-30 at 08.42.37.png

xpanel-hids as server

xpanel-hids allows you to convert various HID USB devices (Human Interface Devices) into ethernet enabled Raw Panels. If you do so with a generic keyboard or mouse the output commands are conveniently aligned with those expected by the SkaarhojKM firmware for TCP Link for ATEM. The hardware component numbers also corresponds directly to the official key numbers that are found in the HID report (modifier keys starting from 256 plus their bit number 0-7). Here is a picture of the keyboard and mouse layout and numbers for reference:

keyboard.png

mouse.png

xpanel-hids has it's own page on this wiki to explain it's functions and config. Please check that out too. Especially you are likely to have to work with injecting another vendor and product ID for your keyboard and mouse since yours are most likely not the same as the ones we have. Also, for a mouse, consider trying the "XYScaler" parameter for adjusting its sensitivity.

This is an example config (default):

image.png

If you restart the core and having a keyboard and mouse plugged into a USB hub, you will see output like this. The HID SCAN OVERVIEW shows all devices found on the bus and reveals the Vendor ID (VID) and Product ID (PID) for each device.

image.png

Reading on you can see how the keyboard and mouse gets found and associated with a TCP port. Here are lines related to the mouse:

image.png

The log reveals it's available on port 9964. It also shows that shortly after, it receives a connection from our TCP Link for ATEM with the SkaarhojKM firmware, namely from IP address 192.168.10.21.

xpanel-hids is a licensed application for the Blue Pill platform. Please visit the xpanel-hids page for more information.

Reactor and core-skaarhoj-rawpanel as server

Instead of having the SkaarhojKM firmware talk directly to a keyboard or mouse Raw Panel made by xpanel-hids, you can also set up a "partial" raw panel server as a device core and assign arbitrary keystrokes or combinations using Reactor. This approach would let you create a button on a regular SKAARHOJ panel for example to press a function key like "F5" or hold down shift and press "c" to copy the selected text.

First you must add the Raw Panel device core to Reactor:

image.png

Set it up like this:

image.png

In this case we have chosen to create a raw panel server on port 9963 - the same port as the xpanel-hids server for the keyboard before. Of course, they cannot co-exist in this way, so make sure you stop the xpanel-hids application first. 

Other than that, the most important thing is calling the variant "GENERICKEYBOARD" exactly like that since this will make the SkaarhojKM firmware identify this raw panel as a keyboard.

You could now set up buttons for keystrokes or combinations by adding a button press:

image.png

image.png

Setting the value to "4" as here corresponds to pressing the "a" key on a QWERTY keyboard.

More complex sequences can also be built manually in event handlers using sequences:

image.png

In this case, step 1-4 is:

  1. Hold down left GUI button (true)
  2. Hold down "c" (true)
  3. Release "c" (false)
  4. Relealse left GUI button (false)

The numbers for the GUI button is 259 and for "c" it's 6. This can be seen if you edit the parameter:

image.png

Reactor and the core-skaarhoj-rawpanel device core are free with most SKAARHOJ products

core-skaarhoj-kmserver as server

image.png

This device core will

  • Look for keyboards and mice and automatically connect them if found
  • Send both keyboards and mouse (mice!) from a single server
  • Send a more compact and higher performance message format to the SkaarhojKM end point
  • Incorporate a channel byte in the message so only SkaarhojKM end points listening to that channel reacts
  • Make available a device core for setting the channel

In this way, you can create a selector on your panel to select the destination for your keyboard/mouse.

image.png

This approach is the recommended approach if you want a serious full keyboard/mouse solution to Keyboard/Mouse over network.

Inside Reactor you set up the device core like this:

image.png

Settings include a server port (again, here it's the same as the one previously used for xpanel-hids and also core-skaarhoj-rawpanel, so only use one of those at a time unless you change ports).

Max Clients and especially Lock to IPs are the security measures you can use to secure that only expect SkaarhojKM units connect as clients and receive the data from the keyboard and mouse.

image.png

If you edit the device core inself, you can also preset how many channels you want the system to have:

image.png

The max would be 255 since it's a byte that is used for identifying channels.

When a core-skaarhoj-kmserver connects to the SkaarhojKM firmware on an TCP Link for ATEM, it will look like this in the serial monitor:

image.png

The serial monitor will also show the received HID reports forwarded. For a keyboard keypress it looks like this:

Server 1: #1:K:0,0,56,0,0,0,0,0
Server 1: #1:K:0,0,0,0,0,0,0,0

For moving a mouse it looks like this:

Server 1: #1:M:0,3,0,0
Server 1: #1:M:0,26,0,0
Server 1: #1:M:0,22,2,0
Server 1: #1:M:0,15,2,0
Server 1: #1:M:0,4,0,0
....

The number "#1" is the channel embedded in the message.

License

The core-skaarhoj-kmserver device core is a licensed application. Please reach out to our sales or support team for more information. It will have a limited function for 10 minutes.