-
Notifications
You must be signed in to change notification settings - Fork 397
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HIDAPI testing device with known good firmware, including using Virtual HID device for CI Testing #591
Comments
For CI, it is good to use uhid. From Youw:
|
I tend to think the two examples from hidapitester can be of good use to hidapi project testing.
Reference: the library is said to support USB AVR and SAMD21.
Reference:
|
For HID over I2C/SPI, I tend to think it is difficult to do under Windows as a driver may be needed. There are some examples of HID over I2C for Linux (using things as Raspberry Pi 4/400 as Linux host) For HID over SPI, it seems to me the support under Linux is quite new. |
For libusb, here is the reference, it can be the same for USB HID device development. But for Bluetooth/BLE and even I2C/SPI HID device, we need different tools. https://github.com/libusb/libusb/wiki/FAQ#do-you-have-a-list-of-known-good-devices-to-test-libusb
Other than vendor provided USB stacks (sometimes with proprietary licenses), there are also Opensource MCU USB stacks.
For me I usually use whatever HID device I have with me like the following for general test using hidtest.
For more real tests with hidapitester or simple test codes. I do not know much about the FW development other than simple modifications of the USB PIC USB codes and maybe a little bit with USB AVRs.
Then I use some HID devices to test hidapi indirectly using avrdude and OpenOCD (CMSIS DAP v1 compliant adapters). |
A very good input from @JoergAtGithub in the #590 discussion
I think typical MCU development boards can do the above. However, I have not seen many examples for Physical Descritors and complex HID Report Descriptors. |
For virtual HID device, Linux has uhid, FreeBSD has uhidd. There is a project which deals with virtual HID device under macOS here: Windows has the Virtual HID Framework (VHF) as well but I guess it is not easy to have someone to help out writing one for testing. |
Linux uhid documentation Linux uhid examples: Kernel uhid example rust Virtual Bluetooth HID device |
hid-tool project is also interesting with hid-record and hid-replay. |
This is a clean-up of #590.
It will be good to have a list of known-good firmware to test hidapi. It is also good to have virtual HID device for CI.
The text was updated successfully, but these errors were encountered: