Hi all,
Lately I’ve been cobbling together a few bits and pieces into something silly, but I’m running into an issue with a KB2040 “KeyBoar” that’s interfacing to a button matrix.
The setup is:
Buttons → KB2040 running CircuitPython -USB-> 4-port USB hat for Pi Zero → Pi Zero 2W running Raspbian -HDMI+USB-> 5" LCD touchscreen
The problem I’m having is the KB2040 isn’t detected as a keyboard on boot; if I unplug and replug after boot it works fine, but that’s not going to be possible for my project. I know the USB connections and power are good because Raspbian mounts the CircuitPy directory as a USB drive, and I can even view the source code that’s running on the KB2040.
Running lsusb in the console shows that it is detected as a keyboard HID on boot, but oddly it also enumerates as a separate mouse device; not sure how to stop that as it’s not part of my code (don’t think it’s mentioned in the KB2040 docs either, it would be really handy if it could run a mouse and keyboard!). There’s no keyboard hardware config options I could find in Raspbian either, unless I’m missing something really fundamental. The touchscreen from the LCD works on boot without issue, through the same hub hat, so I think it’s got to be something with the KB2040?
So far I’ve tried every USB port on the Pi and Hat, including connecting through an external hub, I’ve even tried a couple different OS’s for the Zero but they had the same issue.
Does anyone have any ideas? I was thinking of programmatically rescanning the USB bus after boot but wasn’t sure how to actually do that in Raspbian, Linux is yet another of my weak points 😁