No internet connection
  1. Home
  2. General

No USB input

By Abhi @abj
    2021-03-13 20:00:46.435Z

    Hello,
    I setup TinyPilot for the first time. I'm using a Raspberry Pi 4 along with the TinyPilot Power Connector. The video works fine, but I have no USB input - keyboard (real or virtual) / mouse. I don't see a generic USB keyboard or mouse detected on the target device.

    I swapped out the USB data cable with multiple different ones, include ones that I use for data transfer on other devices. I also tried the USB 2 / 3 ports on the target device. I'm not sure what else to try.

    The logs are here: https://logs.tinypilotkvm.com/OkxTb4Dv

    Thanks for any help that you can provide.

    • 16 replies

    There are 16 replies. Estimated reading time: 14 minutes

    1. Thanks for reporting this!

      It could either be an incompatible USB-C to USB-A cable, an incomptabile microUSB to USB-A cable, or a defective power connector. Not all USB cables are able to work with USB OTG (what TinyPilot uses for data transfer).

      Could you try disconnecting the Power Connector and connecting the Pi directly to your target computer through the USB-C to USB-A connector and let me know if keyboard input works that way?

      1. AAbhi @abj
          2021-03-18 21:41:35.399Z

          Thanks for the suggestions. I did try using the the Pi directly plugged into a USB port onto the PC and had the same experience. I swapped on out the USB-C to USB-A cable with another one I had lying around, with no difference.

          This is the cable I was using: https://www.amazon.com/gp/product/B01GGKYKQM/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1

          Do you suggest getting a different one?

          Here are the logs in case they are of any help: https://logs.tinypilotkvm.com/VuPoQfND

          1. I believe the Amazon Basics one works, but I can't find my results for that one. These ones definitely work:

            1. AAbhi @abj
                2021-03-24 21:38:31.224Z

                I ordered the same USB-A to USB-C cable you linked to, but still no luck.

                This is the error I get when trying the echo commands
                bash: echo: write error: Cannot send after transport endpoint shutdown

                Logs are here: https://logs.tinypilotkvm.com/KOMKnVwi

                1. Hmm, this is a tough one.

                  Are you going directly from the Pi to the target computer via the USB-A to USB-C cable? Or is it through the Power Connector? To eliminate the chance of a defective power connector, connect directly to the computer.

                  Is there another computer you can try just to see if it's an issue with that particular target computer?

                  1. AAbhi @abj
                      2021-03-29 16:16:51.114Z

                      I'm going directly using the USB-A to USB-C cable you recommended. I did try another system as the target - a ThinkPad laptop, but same behavior. Video works fine, no mouse or keyboard input. Also, after the latest update I no longer see the keys I press using the physical or virtual keyboard, in the keyboard history. The history is enabled. Not sure if this is a symptom of my specific problem or an issue in general.

                      1. It sounds like the JavaScript connection to the TinyPilot is failing. Can you try opening up the JavaScript console in your browser and let me know if you see any errors there?

                        Can you also try SSHing into the device and pasting these commands while the TinyPilot device is connected to a target machine?

                        # Should type "Hi" on the remote screen
                        echo -ne "\x20\0\xb\0\0\0\0\0" > /dev/hidg0 && \
                          echo -ne "\0\0\xc\0\0\0\0\0" > /dev/hidg0 && \
                          echo -ne "\0\0\0\0\0\0\0\0" > /dev/hidg0
                        
            2. A
              In reply toabj:
              Abhi @abj
                2021-03-31 15:30:36.546Z

                This is the error in the browser console

                DevTools failed to load SourceMap: Could not load content for http://tinypilot/third-party/socket.io/3.1.3/socket.io.min.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE

                I tried different systems and multiple browsers - Chrome, Edge, Brave.

                Pasting the cmds over SSH generates this error:

                root@tinypilot:/home/pi# echo -ne "\x20\0\xb\0\0\0\0\0" > /dev/hidg0 && \

                echo -ne "\0\0\xc\0\0\0\0\0" > /dev/hidg0 &&
                echo -ne "\0\0\0\0\0\0\0\0" > /dev/hidg0
                bash: echo: write error: Cannot send after transport endpoint shutdown

                1. DevTools failed to load SourceMap: Could not load content for http://tinypilot/third-party/socket.io/3.1.3/socket.io.min.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE

                  Oh, this is just a warning, so it's not related to this issue. I just pushed a fix, but it shouldn't make a difference.

                  Honestly, I'm stumped. Can you confirm that my understanding is correct:

                  • You're using a Raspberry Pi 4B with Raspberry Pi OS
                  • You're using this USB-C to USB-A cable to connect directly between the Pi's USB-C port and a target computer's USB port
                  • You've tested against multiple target computers
                  • When you run the command below on multiple systems, it fails with Cannot send after transport endpoint shutdown
                  # Should type "Hi" on the remote screen
                  echo -ne "\x20\0\xb\0\0\0\0\0" > /dev/hidg0 && \
                    echo -ne "\0\0\xc\0\0\0\0\0" > /dev/hidg0 && \
                    echo -ne "\0\0\0\0\0\0\0\0" > /dev/hidg0
                  

                  Is that all correct?

                  My only other idea is that your USB gadget script somehow got corrupted. Can you share the output of these commands?

                  sudo cat /opt/tinypilot-privileged/init-usb-gadget | curl -F '_=<-' https://logs.tinypilotkvm.com
                  sudo journalctl -u usb-gadget | curl -F '_=<-' https://logs.tinypilotkvm.com
                  

                  If this doesn't identify the issue, I will of course refund your purchase, but I'd really love to get this working for you.

                  1. AAbhi @abj
                      2021-04-04 19:00:08.569Z

                      Yes, that's all correct. The update did resolve the console warning. I tried a 3rd system and it had the same issue including the usb error: -bash: echo: write error: Cannot send after transport endpoint shutdown

                      The logs are here:
                      http://logs.tinypilotkvm.com/nvcQPrvW
                      http://logs.tinypilotkvm.com/7jxkY7kT

                      I do see the key presses in the history, I didn't notice that they were moved to the bottom of the screen in an update.

                      I would love to get this working as well. I can try re-installing the OS and starting from scratch if you think that might help.

                      1. Sorry, I'm really stumped here. I can't think of anything that explains the behavior you're seeing. The files and logs you shared all show correct behavior.

                        The only thing I can think of is that the Pi 4B is defective, but I feel like that's unlikely. Do you happen to have another 4B on hand to test?

                        1. AAbhi @abj
                            2021-04-06 16:31:38.163Z

                            It was the Pi. A different Pi worked. Do you have idea of which component of the Pi might be defective that would cause it to behave like this?

                            1. It was the Pi. A different Pi worked.

                              Oh, wow! Thanks! I'm so relieved we finally reached an answer there.

                              Do you have idea of which component of the Pi might be defective that would cause it to behave like this?

                              It's hard to say. My guess would be that there's damage to one or more wires in the USB-C port, so the USB-C to USB-A cable was failing to make a full connection.

                              1. AAbhi @abj
                                  2021-04-07 21:54:40.456Z

                                  So it turns out, it's not the Pi but the case I was using. It was the Argon One: https://www.argon40.com/argon-one-m-2-case-for-raspberry-pi-4.html

                                  It has custom port headers so that must be causing some sort of issue. Is there a list of cases that you have tested that work well? Thanks.

                                  1. Oh, interesting. That makes more sense. I was so surprised to hear about a Pi failing on that specific port since I've found Pis to be incredibly reliable.

                                    I think it's going to be dicey with any case that doesn't give you direct access to the Pi's USB-C port. The Argon ONE is unusual in doing that, so most other cases should be fine.

                                    • The Argon NEO is what currently ships with the Hobbyist kit
                                    • This is a minimalist case that I used to ship with TinyPilot Hobbyist kits.
                      2. C
                        In reply toabj:
                        Gene Montgomery @Cthulhu7747
                          2022-01-06 03:50:56.176Z

                          I wish I had seen this thread sooner. :( I had the same issues with both PiKVM and TinyPilot.

                          I recently ordered an Argon One V2 case to replace the Retroflag Nespi 4 case I was using (it was too bulky for my needs and only left me with two USB ports). Along with that, I also ordered a 5.25V power supply with a micro USB connector, which solved a power issue I was having with the TinyPilot Power Connector. However, I still could not get the keyboard/mouse functionality to work with TinyPilot, even with the USB cable connected directly to a computer (I tried an OTG breakout cable + USB power blocker with PiKVM, and that also didn't work).

                          After reading this thread, I removed the Pi 4 from the Nespi 4 case and tested the keyboard/mouse functionality with the USB-C cable connected to the bare Pi 4... it worked, even through my Greathtek KVM switch.

                          I tested the Argon case before completely assembling it, and, of course, the keyboard/mouse functionality didn't work. I immediately ordered the Argon NEO case as recommended in this thread and submitted a return request for the Argon One V2.

                          5.25V power supply used: https://smile.amazon.com/gp/product/B07D8ZZSFT/

                          KVM switch used: https://smile.amazon.com/gp/product/B08J3W2JYZ/