04f2:1670 Chicony Electronics Co., Ltd keyboard is broken by hidapi example (hidapi-libusb) #105
Labels
No labels
3rdparty
Android
API
Author does not respond
bsd
bug
build system/CI
ci-virtual-device
CMake
Contributions Welcome
Core
dependencies
device-specific
documentation
don't_merge
duplicate
enhancement
Example
Haiku
hidraw
hotplug
info required
invalid
libusb
macOS
Misc
Not an issue
question
Release
Test
Test GUI
Windows
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-libusb/hidapi#105
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hello. I'm trying to test hidapi and possibly use it to set fn_lock of my keyboard. I grabbed the example code and tried to see if it runs. https://github.com/libusb/hidapi#what-does-the-api-look-like
Then suddenly my keyboard stops responding,
lsusbdoesn't list it anymore. The id was0x17ef, 0x60b5now becomes0x04f2, 0x1670(I tested it while unplug and plug).Is there any way of restoring my keyboard? Thank you!
The device is very much broken
What backend are you using, hidraw or libusb?
libusb
-lhidapi-libusbSo re-plug doesn't help?
It doesn't
But what should I try? Rerun the example doesn't seem to be able to fix the keyboard
Is it appears broken when you plug it to a different PC / OS ?
(To identify is it host or dev issue.)
I tried plugging into windows 10 machine, doesn't work either. It's dev issue
So far I haven't heard of devices broken by
hidapi, and it (hidapi) definitely doesn't do anything that is out of spec from HID (or USB) perspective.What you experience is look like device's internal state (flash memory or smth.) has been changed in some weird way, and it is likely a vendor bug.
I'd suggest trying to contact your keyboard vendor support to identify what might went wrong.
Then I'm out of luck.
BTW: example from README uses device's specific control command, and it is not advisable to try it with the unknown device.
Looks like it worth explicitly adding it to the readme.
Exactly! I wish there is a WARNING SIGN.
So it seems that
17ef:60b5isLenovo ThinkPad X1 Tablet Thin Keyboard Gen 3, is that correct?Yes
Looks like these 2 writes (0x80, 0x81) changed state of your keyboard in a way that the firmware authors have not intercepted. Well, you should never run code from Internet if you don't fully understand it, but we can definitely put a warning before the code sample. @amosbird I hope you will be able to contact the vendor and fix the issue.
Opened https://github.com/libusb/hidapi/pull/106 to prevent problems like this.
Is it possible to extract the firmware from another working keyboard and flash it to this broken one?
That is a good question to a keyboard vendor.
There is no universal solution.
OK. Anyway, the tuition is 100$ and I've learned it hard.
Merged #106.