adafruit / adafruit/Adafruit_CircuitPython_USB_Host_Mouse
Blinka Compatibility
- Dominant language
- Python
- Stars
- 1
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
Continuing discussion on https://github.com/adafruit/Adafruit_CircuitPython_USB_Host_Mouse/pull/17, I'd love to see Blinka compatibility with this library in some shape or fashion. We've determined it's best to continue using PyUsb as the core of interfacing with USB devices rather than another 3rd party mouse-specific library. This will enable native testing and reduce the need for additional code.
Here is a basic test to validate the library within Blinka:
``` python3
import adafruit_usb_host_mouse
mouse = adafruit_usb_host_mouse.find_and_init_boot_mouse()
if mouse is not None:
while True:
if (pressed_btns := mouse.update()) is not None and len(pressed_btns) > 0:
print(f"{mouse.x},{mouse.y} {" ".join(pressed_btns)}")
else:
print("mouse not located")
```
The USB mouse I have connected has been proven to work on CircuitPython devices as a boot mouse, but currently, it is not able to be recognized. The output of the above program is as follows:
```
scanning usb (boot)
05ac:0304
Mitsumi Electric Apple Optical USB Mouse
bytearray(b'')
was not a boot mouse
mouse not located
```
It appears that the configuration descriptor isn't working. So, there is likely a issue with `adafruit_usb_host_descriptors` and Blinka.
https://github.com/adafruit/Adafruit_CircuitPython_USB_Host_Mouse/blob/f86a9ed09fc82ee5994f94f3074e903edc8c7fa2/adafruit_usb_host_mouse/__init__.py#L88-L91
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the basic Blinka test in the issue and inspect adafruit_usb_host_mouse/__init__.py around lines 88-91, where the configuration descriptor is used. Compare the descriptor behavior on Blinka with the reported Apple mouse output; done means the mouse is recognized and find_and_init_boot_mouse() returns a usable device.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- embedded-iot
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100