Some info on HID packets
michaelmuggler opened this issue · comments
I started using this library but I made some modifications.
First, I switched to karalabe/hid
so I could use: SendFeatureReport()
and GetFeatureReport()
Second, the packet to control the brightness is as follows:
0x03, 0x08, perc, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30,
0x69, 0x92, 0x2a, 0xf8, 0x02, 0x00, 0x00,
Where perc
is some int between 0 - 100.
My device is a 15 key Streamdeck and the FW is 1.02.005
To get the firmware using GetFeatureReport
set the report ID to: 0x05
To get the SN the report ID is: 0x07
This was discovered by running the Elgato stream deck software along side Wireshark and USBpcap on Windows 10.
I have been using the following sources as reference (along with this library):
- https://github.com/Julusian/node-elgato-stream-deck/blob/master/packages/core/src/models/base.ts#L199
- https://github.com/abcminiuser/python-elgato-streamdeck/blob/dc94c1718cbb01391790ba09de4977e8fcc19b8a/src/StreamDeck/Devices/StreamDeckMini.py#L99
- https://gist.github.com/cliffrowley/d18a9c4569537b195f2b1eb6c68469e0
And these references seem to be for older firmware's, hence my reason for opening this issue which is more of an FYI.
Perhaps if I have time I can submit a PR, however as I only have the 15 key deck I do not know if this applies to the others.
If you want I forked this into https://github.com/KarpelesLab/streamdeck and made some changes, including breaking compatibility by using a hid lib that doesn't depend on cgo but only works on linux (because I only cared about linux). I'm open to suggestions, haven't tested the 15 keys version but would be happy to if I get my hands on one (or the 32 keys one too).
I didn't PR that fork because it breaks compatibility with OSes other than linux and is a large change in the way things work, I still have a lot of things I want to cleanup, and I might restore compatibility by keeping libusb for non-linux OSes, that should be fairly easy to implement. Eventually I'd like to avoid using cgo on any kind of OS because cgo makes cross-compiling a pain.