No internet connection
  1. Home
  2. General

Keyboard + Mouse do not work

By Matthew McPeake @msmcpeake
    2021-04-05 22:42:08.402Z

    Hi, trying to use this in a non standard setup I would assume. I have my Raspberry Pi connected to a KVM switch I have. The video is being shown, but no keystrokes go through. I can take a picture of the connector if you want, but my assumption was this just sent keyboard/mouse signals over the USB A cables?

    Here are my logs with the errors I have been receiving. Let me know what information you need. Thanks!

    https://logs.tinypilotkvm.com/zucEhxjV

    • 9 replies
    1. Thanks for reporting this. What's the model of your KVM?

      KVM compatibility is spotty because the Pi only has one port capable of emulating USB devices. Instead of presenting itself to the target computer as a USB keyboard or a USB mouse, it presents itself as a USB hub with a USB keyboard and USB mouse attached. Most KVMs expect direct connections to the USB keyboard and mouse, so they won't accept a connection through a USB hub.

      This page lists compatibility with various models of KVMs based on user reports:

      https://github.com/mtlynch/tinypilot/wiki/KVM-compatibility

      over the USB A cables?

      Just want to verify, you mean USB-C to USB-A, right? The cable has to be connected to the Pi's USB-C port for it to emulate a keyboard and mouse.

      1. M
        In reply tomsmcpeake:
        Matthew McPeake @msmcpeake
          2021-04-06 22:49:35.443Z

          Hi Michael, thanks for the reply.

          I am using the IOGEAR GCS1808KIT.

          https://www.amazon.com/gp/product/B002MAPS9O/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&th=1

          I saw somewhere else I needed an OTG hub for the USB cables, so that's how I have two USB A cables going to each keyboard and mouse USB port on the console dongle from the hub.

          Hub is a AUKEY brand hub that says it supports OTG capability.
          https://www.amazon.com/gp/product/B08DXPXPLK/ref=ppx_yo_dt_b_asin_title_o06_s01?ie=UTF8&psc=1

          I have moderate experience with Linux, is there any way I can map the keyboard and mouse to separate USB ports? I'd really love this to work as it looked like an awesome solution. I used to have a KVM console, but had to sell it, so I wanted to network my KVM switch.

          1. Hub is a AUKEY brand hub that says it supports OTG capability.
            https://www.amazon.com/gp/product/B08DXPXPLK/ref=ppx_yo_dt_b_asin_title_o06_s01?ie=UTF8&psc=1

            One thing you should watch out for there is reverse current. I don't think the USB OTG hub expects to be connected to two different power sources (the Pi and the KVM both have their own power), so it likely doesn't mitigate reverse current. See this wiki page for more details:

            https://github.com/mtlynch/tinypilot/wiki/Powering-your-TinyPilot-safely

            I have moderate experience with Linux, is there any way I can map the keyboard and mouse to separate USB ports? I'd really love this to work as it looked like an awesome solution. I used to have a KVM console, but had to sell it, so I wanted to network my KVM switch.

            I don't think that's possible. The Pi only has one USB OTG port, so you'd need a separate Linux device with a USB input and two USB outputs.

            If you can live with keyboard-only or mouse-only, you could flatten the TinyPilot to just a single USB keyboard or USB mouse device. The relevant code is here, installed on the device at /opt/tinypilot-privileged.

            1. CComotai Sahata @Comotai
                2021-11-16 04:05:09.757Z

                I was experiencing the same issue with my KVM not recognizing the keyboard. I took your advice and flattened the setup to keyboard only and it's working now. I can even use the KVM hot keys (even though the KVM manual says it may not be possible with low bandwidth devices).

                For others that are looking to do this, I suggest reading up on using RPi Zero as a keyboard (https://www.rmedgar.com/blog/using-rpi-zero-as-keyboard-setup-and-device-definition/). It helped point to which config items (e.g. Mass storage and mouse) needed to be removed.

                I thought there may have been a hub device configured somewhere, but after removing the other entries, it seemed to self flatten.

                I suggest as a feature improvement, the tinypilot devs should create a button in the HTML5 client where users can config to "keyboard only" mode. That would probably help a large part of the user base and make the device more flexible. Seems like a very simple feature to add too. Many of us are using these as a way to turn a dumb KVM into an poor mans pseudo iKVM for machines that don't support IPMI or Intel AMT.

                1. In reply tomichael:
                  LIan @lfstudios10
                    2022-07-02 02:50:04.176Z

                    If I purchase two units can you link them so one acts as a keyboard and one as a mouse?

                    1. Diego @diego
                        2022-07-04 22:39:50.275Z

                        Hi @lfstudios10 - Thank you for posting your question here in the Forum.

                        You could make one act as a keyboard only and the other one as mouse only. But you won't be able to link them together to access the same target computer.

                        Can you explain in more detail what you are trying to accomplish?

                        1. LIan @lfstudios10
                            2022-07-04 22:50:10.830Z

                            I'm running into the same KVM issue as the OP. I'm hoping to purchase two of your units and use them in parallel, one to act as the mouse and the other as the keyboard to get around the limitation.

                            1. Diego @diego
                                2022-07-04 23:48:03.786Z

                                Unfortunately, what you are trying to do is not possible. Like I said, you could configure one TinyPilot to act as keyboard only and the other TinyPilot to act as mouse only, but you can not link the two TinyPilots together so that they access the same target computer. If, on the other hand, you wanted one target computer with keyboard only and another target computer with mouse only, then yes, that's possible.

                                1. LIan @lfstudios10
                                    2022-07-05 00:40:58.586Z

                                    That's disappointing. Feature request!