Comments (3)
I have a modified version of the libusb-backend hidapi.c that compiles on Windows. It is able to control RGB lighting devices in keyboards and mice if the appropriate interfaces have the WinUSB driver with zadig. It's basically just a hack to remove the linux-specific stuff in the libusb backend and could use some cleanup, but this method does work if you wish to use the hidapi library in your code and still access these devices in Windows.
https://gitlab.com/CalcProgrammer1/OpenRGB/-/blob/master/dependencies/hidapi/hidapi.c
My OpenRGB project uses the Linux and MacOS native versions of hidapi just fine, but the Windows version does not work for whatever reason. It detects some devices but can't control them. If I use my hacked up libusb hidapi.c in place of the released library, it works just fine.
I was looking at the Redragon K556 keyboard software in API Monitor to see why that software has no problems controlling an RGB keyboard with the HID driver but my implementation requires WinUSB. This is what I'm seeing when I change settings:
I don't see an obvious call to any hid_write or hid_set_feature_report equivalent function in the Windows HID library. I am monitoring HID.dll and the wrapper DLL that the keyboard software uses.
from hidapi.
Actually I think it may not be a bad idea to have a libusb based Windows backend (using Zadig and WinUSB driver) to take away some of the limitations of the Windows HID driver. Some users may want to use that way.
from hidapi.
Agree, that would be a good option.
The usage of POSIX API would need to be replaced for libusb backend implementation of hidapi (preferably by C11 imho).
from hidapi.
Related Issues (20)
- Call to `hid_read_timeout` sometimes never returns on Windows HOT 1
- ImportError of usblib libraries HOT 3
- Why need sudo for libhidapi-libusb and not for libhidapi-hidraw? HOT 4
- Linux / hidraw flock support? HOT 1
- Meson build system cannot be used for cross builds HOT 4
- spacemouse
- [MacOS] Potential issues reported by clang (low to medium priority)
- Getting undefined reference to 'hid_get_report descriptor' and 'hid_get_device_info' when compiling/linking test.c HOT 1
- Potential solution to MacOS hid_init/hid_exit issue HOT 4
- Cannot compile hidapi 1.5.0 on macos HOT 3
- need longer timeout with send_feature_report() for libusb under Windows HOT 3
- Warnings HOT 3
- Consern regarding Hotplug callbacks implementation HOT 1
- warning: [email protected]: cc1: fatal error: etc/hidapi/linux/hid.c: No such file or directory HOT 1
- Hello, does hidapi currently support iPhone 15 devices with iOS system and iPad devices with USB interface HOT 1
- mistake in name HOT 3
- libusb backend: "hid_error is not implemented yet" HOT 2
- How to test it in Android with HIDAPI? HOT 1
- Windows&libusb: hid_write Issue: hid_write/WaitForSingleObject: (0x000003E5) Overlapped I/O operation is in progress. (Regression from signal11 version, 1 sec write timeout issue!) HOT 8
- Doesnt work properly on windows HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hidapi.