Add support for VID 0c45 boards [RK68K/RK855 (0c45:8018), etc.]
Software link: https://drive.google.com/file/d/1sq4vglRZ-76aPoszcGp4_uBD27Kvu7Oo/view
Both keyboards are NOT RGB. Only blue backlight.
Here hidapitester output for RK855 from Windows:
PS C:\Users\abina59x\Downloads\hidapitester-windows-x86_64> .\hidapitester.exe --vidpid 0c45:8018 --list-detail
0C45/8018: SONiX - USB DEVICE
vendorId: 0x0C45
productId: 0x8018
usagePage: 0x000C
usage: 0x0001
serial_number: (null)
interface: 1
path: \\?\hid#vid_0c45&pid_8018&mi_01&col01#7&e9493c3&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
0C45/8018: SONiX - USB DEVICE
vendorId: 0x0C45
productId: 0x8018
usagePage: 0x0001
usage: 0x0080
serial_number: (null)
interface: 1
path: \\?\hid#vid_0c45&pid_8018&mi_01&col02#7&e9493c3&0&0001#{4d1e55b2-f16f-11cf-88cb-001111000030}
0C45/8018: SONiX - USB DEVICE
vendorId: 0x0C45
productId: 0x8018
usagePage: 0x0001
usage: 0x0002
serial_number: (null)
interface: 1
path: \\?\hid#vid_0c45&pid_8018&mi_01&col04#7&e9493c3&0&0003#{4d1e55b2-f16f-11cf-88cb-001111000030}
0C45/8018: SONiX - USB DEVICE
vendorId: 0x0C45
productId: 0x8018
usagePage: 0x0001
usage: 0x0006
serial_number: (null)
interface: 1
path: \\?\hid#vid_0c45&pid_8018&mi_01&col03#7&e9493c3&0&0002#{4d1e55b2-f16f-11cf-88cb-001111000030}\kbd
0C45/8018: SONiX - USB DEVICE
vendorId: 0x0C45
productId: 0x8018
usagePage: 0xFFFF
usage: 0x0001
serial_number: (null)
interface: 1
path: \\?\hid#vid_0c45&pid_8018&mi_01&col05#7&e9493c3&0&0004#{4d1e55b2-f16f-11cf-88cb-001111000030}
0C45/8018: SONiX - USB DEVICE
vendorId: 0x0C45
productId: 0x8018
usagePage: 0x0001
usage: 0x0006
serial_number: (null)
interface: 0
path: \\?\hid#vid_0c45&pid_8018&mi_00#7&30562c40&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}\kbd
Path output:
PS C:\Users\abina59x\Downloads\hidapitester-windows-x86_64> .\hidapitester.exe --open-path "\\?\hid#vid_0c45&pid_8018&mi_01&col01#7&e9493c3&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}" --length 65 --send-feature 0x0a,0x01,0x01,0x02,0x29,0x01,0x03,0x03,0x03,0,0,0,0x01,0x01
Opening device. path: \\?\hid#vid_0c45&pid_8018&mi_01&col01#7&e9493c3&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
Writing 65-byte feature report...wrote -1 bytes:
0A 01 01 02 29 01 03 03 03 00 00 00 01 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00
Closing device
PS C:\Users\abina59x\Downloads\hidapitester-windows-x86_64> .\hidapitester.exe --open-path "\\?\hid#vid_0c45&pid_8018&mi_01&col02#7&e9493c3&0&0001#{4d1e55b2-f16f-11cf-88cb-001111000030}" --length 65 --send-feature 0x0a,0x01,0x01,0x02,0x29,0x01,0x03,0x03,0x03,0,0,0,0x01,0x01
Opening device. path: \\?\hid#vid_0c45&pid_8018&mi_01&col02#7&e9493c3&0&0001#{4d1e55b2-f16f-11cf-88cb-001111000030}
Writing 65-byte feature report...wrote -1 bytes:
0A 01 01 02 29 01 03 03 03 00 00 00 01 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00
Closing device
PS C:\Users\abina59x\Downloads\hidapitester-windows-x86_64> .\hidapitester.exe --open-path "\\?\hid#vid_0c45&pid_8018&mi_01&col04#7&e9493c3&0&0003#{4d1e55b2-f16f-11cf-88cb-001111000030}" --length 65 --send-feature 0x0a,0x01,0x01,0x02,0x29,0x01,0x03,0x03,0x03,0,0,0,0x01,0x01
Opening device. path: \\?\hid#vid_0c45&pid_8018&mi_01&col04#7&e9493c3&0&0003#{4d1e55b2-f16f-11cf-88cb-001111000030}
Writing 65-byte feature report...wrote -1 bytes:
0A 01 01 02 29 01 03 03 03 00 00 00 01 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00
Closing device
PS C:\Users\abina59x\Downloads\hidapitester-windows-x86_64> .\hidapitester.exe --open-path "\\?\hid#vid_0c45&pid_8018&mi_01&col03#7&e9493c3&0&0002#{4d1e55b2-f16f-11cf-88cb-001111000030}\kbd" --length 65 --send-feature 0x0a,0x01,0x01,0x02,0x29,0x01,0x03,0x03,0x03,0,0,0,0x01,0x01
Opening device. path: \\?\hid#vid_0c45&pid_8018&mi_01&col03#7&e9493c3&0&0002#{4d1e55b2-f16f-11cf-88cb-001111000030}\kbd
Writing 65-byte feature report...wrote -1 bytes:
0A 01 01 02 29 01 03 03 03 00 00 00 01 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00
Closing device
PS C:\Users\abina59x\Downloads\hidapitester-windows-x86_64> .\hidapitester.exe --open-path "\\?\hid#vid_0c45&pid_8018&mi_01&col05#7&e9493c3&0&0004#{4d1e55b2-f16f-11cf-88cb-001111000030}" --length 65 --send-feature 0x0a,0x01,0x01,0x02,0x29,0x01,0x03,0x03,0x03,0,0,0,0x01,0x01
Opening device. path: \\?\hid#vid_0c45&pid_8018&mi_01&col05#7&e9493c3&0&0004#{4d1e55b2-f16f-11cf-88cb-001111000030}
Writing 65-byte feature report...wrote -1 bytes:
0A 01 01 02 29 01 03 03 03 00 00 00 01 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00
Closing device
PS C:\Users\abina59x\Downloads\hidapitester-windows-x86_64> .\hidapitester.exe --open-path "\\?\hid#vid_0c45&pid_8018&mi_00#7&30562c40&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}\kbd" --length 65 --send-feature 0x0a,0x01,0x01,0x02,0x29,0x01,0x03,0x03,0x03,0,0,0,0x01,0x01
Opening device. path: \\?\hid#vid_0c45&pid_8018&mi_00#7&30562c40&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}\kbd
Writing 65-byte feature report...wrote 65 bytes:
0A 01 01 02 29 01 03 03 03 00 00 00 01 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00
Closing device
Same as linux, I don’t see any changes on the keyboard.
Please attach screenshots of the RK Software. Note that I should be able to see the full list of lighting modes as well. That is very important.
It looks like the protocol is also different, so please do the following
You need to record some tests and send the output (.pcap) of the tests to me. You need to use Windows for this.
Setting up:
- install USBPCAP from https://desowin.org/usbpcap/
How to record:
- launch RK Keyboard Software
- launch USBPcapCMD.exe from C:\Program Files\USBPcap
- select the hub that you have connected your RK keyboard to. Generally it shows up as "HID Keyboard Device"
- enter file name as test_
.pcap. After you enter it will start recording. - proceed with the test steps.
- when test is done, do Ctrl+C to exit the program. The recording will stop.
- send over the .pcap files over
Note: Follow all the steps AT ONCE. For example, if you are asked to set x to 2 you should set x to 2 from the previous value AT ONCE, and not stopping midway at 3 or something.
Test 1
Before Recording, do the following:
- Open RK Software
- Select the first lighting mode (Mention the name as well from the screenshot)
- Set brightness to 5 (max)
- Set animation to 5 (max)
- Set sleep as No Sleep (max)
== Start Recording ==
Tests:
- Select explode light mode
- Select sleep at middle (3)
- Select Animation Speed as 2
- Select Sleep Time as 10 minutes
Test 2
BEFORE Testing, do the following:
- Select "Customize" Light effect mode.
- Turn off EVERY KEY
- Set sleep as 30 minutes
== Start Recording ==
- Select the custom lighting mode (Mention the name as well from the screenshot)
- Click on Q Key.
- Click on Esc Key.
- Click on Right Arrow Key.
- Set sleep to 20 minutes
- Select "Glittering" Light effect mode
- Select "Ripples" Light effect mode
After your tests are done, send me the 2 .pcap files. Also, send me the exact model name, Vendor ID and product ID of your keyboard.
Hi, RK855 doesn’t have red led, what should I use to test?
And where can I check the exact model name, vendor id & product id?
Below is the screenshot of the software:





Ignore the colour part, included it by mistake. Just set the keys ignoring specific color
Updated the tests, pls check again
Hi, here the requested files.
Here the USBPcap window, for select filter I choose 2:

Test 1
Before Recording, do the following:
Open RK Software: Done Select the first lighting mode: I choose static mode Set brightness to 5 (max): I set brightness to 15 Set animation to 5 (max): I skipped this, not available in RK software Set sleep as No Sleep (max): I skipped this, not available in RK software

== Start Recording ==
Tests:
Select explode light mode: Done Select sleep at middle (3): I choose 7, as shown in the screenshot Select Animation Speed as 2: I skipped this, not available in RK software Select Sleep Time as 10 minutes: I skipped this, not available in RK software

Test 2
BEFORE Testing, do the following:
Select "Customize" Light effect mode. : I skipped this, not available in RK software Turn off EVERY KEY : I skipped this, not available in RK software, but I choose “close backlight” mode, refer screenshot below Set sleep as 30 minutes : I skipped this, not available in RK software

== Start Recording ==
Select the custom lighting mode: I skipped this, not available in RK software Click on Q Key.: Done Click on Esc Key.: Done Click on Right Arrow Key.: Done Set sleep to 20 minutes: I skipped this, not available in RK software Select "Glittering" Light effect mode : Done, refer screenshot below

Select "Ripples" Light effect mode: Done, refer screenshot below

Refer the pcap files below:
It looks like these brands of keyboards use a totally different protocol 🥲
No issues, I am trying to make sense of it. Thanks for sending info, I may send some more tests (very simple), please be patient :)
Hi, can you do another test with the following?
Test 3
Before recording
- Open RK Software
Start Recording
Steps
- Exit the RK Software
Stop Recording
Test 4
Before recording
Do nothing
Start Recording
Steps
- Start RK Software
- Exit the RK Software
Stop Recording
Test 5
Before recording
- Start RK Software
Start Recording
Steps
Do nothing
Stop Recording
Test 6
Before recording
- Start RK Software
- Exit RK Software
Start Recording
Steps
Do nothing
Stop Recording
Hi, attach the test data. test_3-6.zip
The protocol looks very obfuscated and at the time of writing this I feel unmotivated to work on this. My initial aim was to be able to configure my keyboard on linux, which grew into a bigger project. However, it looks like there are models that totally have different vendor IDs and protocols but still are sold as royal kludge keyboards. Their official software is also different. The fact that I do not physically own a 0x0c45 board also makes it harder. Thankfully, most RK keyboard models use the 0x258a protocol.
Maybe someday I can look into it. It should not be that hard, and the .pcap files are already uploaded here. Anyone is free to examine them and report back.
I have found a GitHub project which has a similar function to this one, but seems to be intended for keyboards with VID 0x0c45:
Perhaps their code can be used or their approach might be able to be adapted? I haven't looked into their code/documentation properly yet but once I get a chance I will share some more details (unless you beat me to it!). Also, they cite this project as being helpful in helping them understand the protocol:
That could also be a good (possibly better) resource.
I don't have much knowledge in this area of software dev but I do have a small amount of relevant knowledge, so if I get time over the next month or two I might see if I can contribute some code also.