USB Devices not created
I have just installed TinyPilot on a RPi Zero W, having made a clean (and updated) install of Raspian Lite.
The USB gadgets are not being created. init-usb-gadget fails on boot. *sudo journalctl -u usb-gadget *provides the following:
Jan 18 22:05:51 RPi9-keyboard init-usb-gadget: + echo 'Multifunction USB Device' Jan 18 22:05:51 RPi9-keyboard init-usb-gadget: + mkdir -p functions/hid.keyboard Jan 18 22:05:52 RPi9-keyboard init-usb-gadget: mkdir: cannot create directory ‘functions/hid.keyboard’: No such file or directory Jan 18 22:05:52 RPi9-keyboard systemd: usb-gadget.service: Main process exited, code=exited, status=1/FAILURE Jan 18 22:05:52 RPi9-keyboard systemd: usb-gadget.service: Failed with result 'exit-code'. Jan 18 22:05:52 RPi9-keyboard systemd: Failed to start Initialize USB gadgets.
And /dev/hidg0 and /dev/hidg1 have not been created.
On a clean RPi I can run init-usb-gadget, by itself, fine and the USB interface works fine for keyboard and mouse. It feels like there is something that happens during the install of TinyPilot that is preventing the gadget working properly.
Any suggestions as to what to try?
- 3 replies
My guess is that something is going wrong in the installation. Can you try installing again and sharing the full logs? It's likely that one of these steps is getting skipped incorrectly:
I have successfully installed TinyPilot on a Pi Zero @ but that was over a year ago, so I'm not sure if changes since then have affected things.
- In reply topointonn⬆:
Also, another user got this working recently, but we need to update the documentation:
- PNick Pointon @pointonn
So I did a clean install of Raspian Lite and updated it and then reinstalled TinyPilot from scratch and it works fine. I am only emulating the keyboard and mouse as I don't have another port to do the video as well, but it is working perfectly.
The only difference from the 2 previous times is that I watched the output of sudo apt-get -y update && sudo apt-get -y upgrade closely and noticed that one module failed to update, so I re-ran the update command to ensure that all the updates installed correctly (it did the 2nd time). After this TinyPilot installed fine (I logged in and noticed no errors) and the USB gadget was created successfully and it is all working fine.
Thanks for your help. I only wish I'd taken more notice of which package update failed to install the 1st time.