Need to Disable Keyboard for DVR
Thanks to David, I've now got my TinyPilot working great. However, the DVR it's connected to can only use a mouse input, and it appears the keyboard signal may be causing the mouse control to choke. Is there a simple way to disable the TinyPilot USB keyboard emulator?
Thanks,
--Kimberly
- David @david2022-09-14 12:01:25.726Z
Hi Kimberly, thanks for reaching out again! I've written a command for you to run.
You can disable the keyboard using the following command:
cd /opt/tinypilot-privileged && \ sudo cp -p init-usb-gadget init-usb-gadget.backup && \ sudo sed --in-place '/mkdir -p "$USB_KEYBOARD_FUNCTIONS_DIR"/ s/^/#/' init-usb-gadget && \ sudo sed --in-place '/{USB_KEYBOARD_FUNCTIONS_DIR}\/protocol/ s/^/#/' init-usb-gadget && \ sudo sed --in-place '/{USB_KEYBOARD_FUNCTIONS_DIR}\/subclass/ s/^/#/' init-usb-gadget && \ sudo sed --in-place '/{USB_KEYBOARD_FUNCTIONS_DIR}\/report_length/ s/^/#/' init-usb-gadget && \ cd /opt/tinypilot-privileged/lib && \ sudo cp -p usb-gadget.sh usb-gadget.sh.backup && \ sudo sed --in-place '/chmod 777 \/dev\/hidg0/ s/^/#/' usb-gadget.sh && \ sudo reboot
That command also creates a backup of each of the files we're editing. That just gives us a way to revert back later if you need to re-enable the keyboard input without re-installing the TinyPilot software.
If you want to re-enable the keyboard, you can use this command:
cd /opt/tinypilot-privileged && \ sudo cp -p init-usb-gadget.backup init-usb-gadget && \ cd /opt/tinypilot-privileged/lib && \ sudo cp -p usb-gadget.sh.backup usb-gadget.sh && \ sudo reboot
- K@KimberlyP
So glad I made an image of the SD card. After running the script, I'm back to "No Signal". Reverting with the second group of commands didn't restore it. I've kept all the steps that got me running, and will advise as soon as I have a little time to get it running again.
Thanks.
- David @david2022-09-16 18:40:04.280Z
Thanks for the update Kimberly. Let me know if there's anything I can do to help in the meantime!