duncanthrax / roccat-vulcan

Linux RGB LED effect support for the Roccat Vulcan 100/120 Keyboard
GNU General Public License v3.0
79 stars 20 forks source link

Vulcan 80 support experiment #14

Open ghost opened 4 years ago

ghost commented 4 years ago

Roccat Vulcan 80 support experiment:

So, I have the Vulcan 80, which is more or less just a Vulcan 120, but only with blue LEDs and regular keys as volume and brightness controls.

I am very tired of the "Breathe" default effect, so I tried to find a linux driver that would work. But all of them are for the 100/120 or other models.

This project was promising, and the build files seemed easy to hack.

Results:

Let me start by listing my modifications: The device id is: 305c

99-roccat-vulcan.rules I added following line at the end:

ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="1e7d", ATTRS{idProduct}=="305c", MODE="660", TAG+="uaccess", GROUP="plugdev"

roccat-vucan.c I changed line 11 and 12 to include the Vulcan 80 device ID:

uint16_t rv_products[4]   = { 0x3098, 0x307a, 0x305c,  0x0000 };
char * rv_products_str[4] = { "3098", "307a", "305c",  NULL };

And then changed line 56 and 57 in roccat-vulcan.h to have matching number of array entries:

uint16_t rv_products[4];
char * rv_products_str[4];

Originally I used the fork @ < https://github.com/X3n0m0rph59/roccat-vulcan > since it is mirrored in AUR repository, but the issue is exactly the same when building from this git.

Here is the output from the console:

$ sudo roccat-vulcan -c 0:255,255,255 -v
ROCCAT Vulcan for Linux [github.com/duncanthrax/roccat-vulcan]
Color 0 set to 255,255,255
Effect Color Table (change these with -c option)
colorIdx    R      G      B  Desc
------------------------------------------------
0         255    255    255  Base keyboard color (dark blue)
1        2303      0   -255  Typing color, initial key (over-red, under-blue)
2        2303      0   -143  Typing color, first neighbor key
3        2303      0      0  Typing color, second neighbor key
4         187      0    204  Ghost typing color, initial key
5         153      0    187  Ghost typing color, first neighbor key
6          85      0    170  Ghost typing color, second neighbor key
7           0      0      0  (null)
8           0      0      0  (null)
9           0      0      0  (null)
open_device(1e7d, 3098): No LED device found
open_device(1e7d, 307a): No LED device found
open_device(1e7d, 305c): ignoring non-LED interface #0
open_device(1e7d, 305c): ignoring non-LED interface #1
open_device(1e7d, 305c): ignoring non-LED interface #2
open_device(1e7d, 305c): LED interface at USB path 0001:0005:03
open_device(1e7d, 305c): CTRL interface at /dev/hidraw4
rv_get_ctrl_report(0f): 0f 08 74 66 00 01 08 00 
rv_set_ctrl_report(15): 3 bytes sent
rv_wait_for_ctrl_device(): 04 01 00 00 
rv_set_ctrl_report(05): 4 bytes sent
rv_wait_for_ctrl_device(): 04 01 00 00 
rv_set_ctrl_report(07): 95 bytes sent
rv_wait_for_ctrl_device(): 04 01 00 00 
rv_set_ctrl_report(0a): 8 bytes sent
rv_wait_for_ctrl_device(): 04 01 00 00 
rv_set_ctrl_report(0b): 65 bytes sent
rv_wait_for_ctrl_device(): 04 01 00 00 
rv_set_ctrl_report(06): 133 bytes sent
rv_wait_for_ctrl_device(): 04 01 00 00 
rv_set_ctrl_report(09): 43 bytes sent
rv_wait_for_ctrl_device(): 04 01 00 00 
rv_set_ctrl_report(0d): 443 bytes sent
rv_wait_for_ctrl_device(): 04 02 00 00 
rv_wait_for_ctrl_device(): 04 02 00 00 
rv_wait_for_ctrl_device(): 04 02 00 00 
rv_wait_for_ctrl_device(): 04 02 00 00 
rv_wait_for_ctrl_device(): 04 02 00 00 
rv_wait_for_ctrl_device(): 04 02 00 00 
rv_wait_for_ctrl_device(): 04 02 00 00 
rv_wait_for_ctrl_device(): 04 02 00 00 
rv_wait_for_ctrl_device(): 04 02 00 00 
rv_wait_for_ctrl_device(): 04 02 00 00 
rv_wait_for_ctrl_device(): 04 02 00 00 
rv_wait_for_ctrl_device(): 04 02 00 00 

Nothing happens at the keyboard, and if I understand the console output correctly, it isn't getting a response from the keyboard.

Now, I am not expecting this to be patched if it is something that requires a lot of modification. However, I thought it fitting to detail my experiment, in case it is a quick patch to include the Vulcan 80 into this very nice driver. If you aren't interested in patching it in, I would appreciate advice on what I could do, to further hack Vulcan 80 support in, or at least get a solid backlight going on this thing.

At the very least: I hope this is of any use to you all.

Thank you.

And if you want to know: Keyboard firmware updated 28 Nov 2019. Driver tested on Manjaro Openbox distro; Linux kernel 5.4-RC7.

duncanthrax commented 4 years ago

Hi, thanks for the effort so far. I guess the 80 model needs different HID setup sequences. I have lifted those from the windows driver by listening to its HID comms with the keyboard by dumping USB traffic with Wireshark. I was using windows 10 running in a VM, with Wireshark running on the Linux host. You will need to dump the keyboard effect initialization sequence (happens when you launch the Roccat Software). If you can do that, go ahead and we can patch in support. However the required effect code may be complete different since the 80 has only one colour channel.

ghost commented 4 years ago

Interesting. I did not think to dump the USB traffic with wireshark. I must do that. Also, I contacted Roccat with a request to get some information, and it has been forwarded to the Roccat devs, so here's hoping to get a reply on that. Specifically, if the 80 is more similar to one of the other non-AIMO Roccat keyboards.

I will get back to this when I have dumped the initialization and hopefully got a response form a Roccat dev. Customer support seem very open to helping.

cpw commented 4 years ago

I have just acquired the vulcan 100 - i see the same behaviour when trying to init the "impact" format. Note that wave works fine. I'll be trying to sniff the USB from the windows app in a bit.