Gadgetoid / pi400kb

Raw HID keyboard forwarder to turn the Pi 400 into a USB keyboard
MIT License
269 stars 36 forks source link

Error on run: usbg_init() no such file or directory. #15

Closed ArsenicBismuth closed 2 years ago

ArsenicBismuth commented 2 years ago

Happens on both mouse connected and disconnected.

The full message I got:

Found keyboard at: /dev/hidraw0
Failed to open mouse device
usbg_init()  No such file or directory: couldn't init gadget state

Error on usbg init
Error: USBG_ERROR_NOT_FOUND : Not found (file or directory removed)
ArsenicBismuth commented 2 years ago

Missed the step to run this:

sudo modprobe libcomposite

So, it seems like it needs to be done every time. The positioning on the instruction made me confusing it for one-time step.

Gadgetoid commented 2 years ago

Hmmm, pi400kb is supposed to do this for you!

https://github.com/Gadgetoid/pi400kb/blob/85aa4027cfd507ccd6f69a637b14183bb4970a56/pi400.c#L39-L51

You can also add it to modules_load or /etc/modules