Hacker News new | past | comments | ask | show | jobs | submit login
Libg203lightsync: Lib for interacting with the Logitech G203 LS mouse (github.com/carlos-menezes)
23 points by carlos-menezes 10 months ago | hide | past | favorite | 7 comments



Consider turning this into a driver for libratbag if it's not supported by the hidpp one already: https://github.com/libratbag/libratbag


Fantastic! I resorted to coloring in the light parts with a permanent marker once another library written in python stopped working to turn the damn things off. Will give this a go.

Note the link to the examples folder is broken. There appears to be no examples folder on the github.


Thank you! Fixed!


Cool! Could it work with WebHID instead?


Wouldn’t WebHID only help for getting input from the device and for connect and disconnect events?

Whereas for controlling the lights of the mouse with a browser I would think WebUSB would be used for that?


No, Logitech mice and keyboards generally use Logitech's proprietary HID++ protocol which is built on top of standard HID. WebUSB considers HID a "protected interface class" and blocks access to USB HID interfaces. USB HID devices are protected because they include devices like keyboards which handle sensitive user data, such as passwords.

https://wicg.github.io/webusb/#has-a-protected-interface-cla...

WebHID also restricts access to mice and keyboards, but it uses information available at the HID protocol level to selectively block access to sensitive capabilities while leaving other capabilities unblocked. So, you can't implement an input logger but you can configure LEDs and other device behavior.

In general, WebUSB isn't useful for devices that already have some system-level support. If there's a driver, it will have already claimed the USB interface and needs to release it before the browser can access it. Even if the HID interface class were not protected, you still wouldn't be able to claim it because the USB HID interface is already claimed by the system's generic HID driver. The generic HID driver exposes a non-exclusive "raw" HID interface to applications. WebHID uses this non-exclusive interface which is why it doesn't have the same limitation as WebUSB.


WebHID allows sending/receiving feature reports via HIDDevice, which is what almost all of these devices use for configuration




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: