simonhuwiler/roccatvulcan

Media controls

Coding-Kiwi opened this issue · 2 comments

Hi,

I am trying around with the media controls in the top right corner. As you can see in my commit here: Coding-Kiwi@eb44f42 I added a second function called 'onWheel' which is called when the wheel is turned.

If the volume button is active it gets passed {type: "volume", state: 1 or -1} where state is -1 or 1 depending on the direction you are turning the wheel

if the fxbutton is active it gets passed {type: "fx", state: 1, percentage: 0} where state is a value between 1 and 69 and percentage is just for convenience (state - 1) / 68.
Note: the state is always reset to 69 on init

As you are more experienced in reverse engineering the data packets, is there any way to

  • to detect that the mute button is pressed
  • set the lighting of the mute button (roccat swarm lets it blink if muted)
  • set the state of the fx value? because it is always 69 after init
  • check if the fx or the volume button is active after init, as this is not being reset on startup

Thanks!

Update: the device on interface 1 and usagepage 12 sends the following packages

mute button down: [ 2, 226, 0 ]
mute button up: [ 2, 0, 0 ]

volume button active and wheel turn left: [ 2, 234, 0 ] [ 2, 0, 0 ]
volume button active and wheel turn right: [ 2, 233, 0 ] [ 2, 0, 0 ]

fx and volume button: nothing on any interface and usepage other than the main one
fx button active and wheel turn: nothing on any interface and usepage other than the main one

The only other interfaces that can be read are:

  • interface 1 usagepage 1 it is completely silent
  • interface 3 usagepage 1 it sends [ 3, 0, 255, 3, 0, 0, 0, ... , 0] after keyboard.render()

So from what I can tell the "solutions" available:

  1. to detect that the mute button is pressed

listen for data event on interface 1 usagepage 12
Coding-Kiwi@222cf8a

  1. set the lighting of the mute button (roccat swarm lets it blink if muted)

send [0x15, 0x01, 0x01] to let it blink, [0x15, 0x00, 0x01] to stop blinking
Coding-Kiwi@be4a53b

  1. set the state of the fx value? because it is always 69 after init

on init, the 7th byte determines the base value of the fx wheel
0x0d, 0xbb, 0x01, 0x00, 0x06, 0x0b, 0x05, 0x45 45 = 69
but the last two bytes are a checksum of some kind
Coding-Kiwi@0ac83ce

  1. check if the fx or the volume button is active after init, as this is not being reset on startup
    it seems like this is an operation happening on the keyboard, because no data is send whatsoever when pressing these buttons