carlossless / sinowealth-kb-tool Goto Github PK
View Code? Open in Web Editor NEWA utility for reading and writing flash contents on Sinowealth 8051-based HID devices through the commonly found ISP bootloader
License: MIT License
A utility for reading and writing flash contents on Sinowealth 8051-based HID devices through the commonly found ISP bootloader
License: MIT License
INFO [sinowealth_kb_tool::isp] Looking for vId:0x258a pId:0x00ea
INFO [sinowealth_kb_tool::isp] Found regular device. Entering ISP mode...
INFO [sinowealth_kb_tool::isp] Regular device not found. Trying ISP device...
INFO [sinowealth_kb_tool::isp] Retrying... Attempt 2/10
INFO [sinowealth_kb_tool::isp] Looking for vId:0x258a pId:0x00ea
INFO [sinowealth_kb_tool::isp] Regular device didn't come up...
INFO [sinowealth_kb_tool::isp] Regular device not found. Trying ISP device...
INFO [sinowealth_kb_tool::isp] Retrying... Attempt 3/10
INFO [sinowealth_kb_tool::isp] Looking for vId:0x258a pId:0x00ea
INFO [sinowealth_kb_tool::isp] Regular device didn't come up...
INFO [sinowealth_kb_tool::isp] Regular device not found. Trying ISP device...
INFO [sinowealth_kb_tool::isp] Retrying... Attempt 4/10
INFO [sinowealth_kb_tool::isp] Looking for vId:0x258a pId:0x00ea
INFO [sinowealth_kb_tool::isp] Regular device didn't come up...
INFO [sinowealth_kb_tool::isp] Regular device not found. Trying ISP device...
INFO [sinowealth_kb_tool::isp] Connected!
INFO [sinowealth_kb_tool::isp] Enabling firmware...
INFO [sinowealth_kb_tool::isp] Reading...
INFO [sinowealth_kb_tool] MD5: e5277ac8658db28e33b3542aa06e4136
not tested writing
TERPORT TR95 uses BYK916 chip, the ids are different from nuphy-air60
Bootloader MD5: 2d169670eae0d36eae8188562c1f66e8
I haven't tried writing the firmware
pub const PART_TERPORT_TR95: Part = Part {
flash_size: 61440, // 61440 until bootloader
bootloader_size: 4096,
page_size: 2048,
vendor_id: 0x258a,
product_id: 0x0049,
};
SH68F90?
BYK916
firmware_size: 61440
vendor_id: 0x258a
product_id: 0x00c7
bootloader_size: 4096 # necessary if not default
page_size: 2048 # necessary if not default
isp_usage_page and other isp options were not used
3e0ebd0c440af5236d7ff8872343f85d
0e2019195dac58e1463bf9c458db913a
A dump from usbhid-dump --model=0x258a
001:025:001:DESCRIPTOR 1704352530.015456
05 01 09 80 A1 01 85 01 19 81 29 83 15 00 25 01
75 01 95 03 81 02 95 05 81 01 C0 05 0C 09 01 A1
01 85 02 19 00 2A 3C 02 15 00 26 3C 02 75 10 95
01 81 02 C0 06 00 FF 09 01 A1 01 85 05 19 01 29
02 15 00 26 FF 00 75 08 95 05 81 02 C0 05 01 09
06 A1 01 85 06 05 07 19 04 29 70 15 00 25 01 75
01 95 78 81 02 C0
001:025:000:DESCRIPTOR 1704352530.026447
05 01 09 06 A1 01 05 07 19 E0 29 E7 15 00 25 01
75 01 95 08 81 02 75 08 95 01 81 01 05 07 19 00
29 FF 15 00 26 FF 00 75 08 95 06 81 00 05 08 19
01 29 05 15 00 25 01 75 01 95 05 91 02 75 03 95
01 91 01 C0
The Weikav Sugar65 is using a SinoWealth SH68F90S and use the same vendor_id and product_id as nuphy-air60
I got these md5s:
.\sinowealth-kb-tool-0.0.5.exe read -p nuphy-air60
MD5: ba3592aa17b5549f2bf72a06d902a764
-b MD5: 2d169670eae0d36eae8188562c1f66e8
--full MD5: e19cdb907ac25f825a7caf8f0f88a9f9
The 0.0.6 version didn't work for me on windows so I tried the 0.0.5 version which worked
0.0.6:
INFO [sinowealth_kb_tool::isp] Looking for vId:0x05ac pId:0x024f
INFO [sinowealth_kb_tool::isp] Found regular device. Entering ISP mode...
INFO [sinowealth_kb_tool::isp] Regular device not found. Trying ISP device...
INFO [sinowealth_kb_tool::isp] Retrying... Attempt 2/10
0.0.5:
INFO [sinowealth_kb_tool::isp] Looking for vId:0x05ac pId:0x024f
INFO [sinowealth_kb_tool::isp] Found regular device. Entering ISP mode...
INFO [sinowealth_kb_tool::isp] Waiting for ISP device...
INFO [sinowealth_kb_tool::isp] Connected!
Hello. I tried to read firmware from Redragon CASTOR PRO (K631RGB-PRO-BRW) and I got this error:
As you can see, my device was displayed in the "list" command, but when I tried to read it, it failed. I tried to use the "firmware-size" argument instead of the "part" argument, but it also failed. Can you give me advice on why it completed unsuccessfully and what the "firmware-size" argument means? Where can I get this value? Thanks.
Hello,
The tool can read and write the original firmware without reporting errors. But it reports an error on verification when writing a custom smk firmware:
> make flash
sinowealth-kb-tool write -p royalkludge-rk61-rgb-wired bin/main.hex
INFO [sinowealth_kb_tool::isp] Looking for vId:0x258a pId:0x00c7
INFO [sinowealth_kb_tool::isp] Found regular device. Entering ISP mode...
INFO [sinowealth_kb_tool::isp] Regular device not found. Trying ISP device...
INFO [sinowealth_kb_tool::isp] Retrying... Attempt 2/10
INFO [sinowealth_kb_tool::isp] Looking for vId:0x258a pId:0x00c7
INFO [sinowealth_kb_tool::isp] Regular device didn't come up...
INFO [sinowealth_kb_tool::isp] Regular device not found. Trying ISP device...
INFO [sinowealth_kb_tool::isp] Connected!
INFO [sinowealth_kb_tool::isp] Erasing...
INFO [sinowealth_kb_tool::isp] Writing...
INFO [sinowealth_kb_tool::isp] Reading...
INFO [sinowealth_kb_tool::isp] Verifying...
ERROR [sinowealth_kb_tool] Firmware Mismatch @ 0xeffb --- 0x02 != 0x00
make: *** [Makefile:59: flash] Error 1
If then I use the tool to read the flashed smk firmware from the keyboard and write it again then this verification error is not reported anymore... Anyway this doesn't seem to affect the programming, the smk custom firmware has been running happy. Let me know if you need more information about this or if this can be considered an expected no harmful behavior.
Thank you!
2023-08-13T21:16:57.963Z INFO [sinowealth_kb_tool::isp] Found Device. Entering ISP mode...
2023-08-13T21:16:57.965Z INFO [sinowealth_kb_tool::isp] Waiting for bootloader device...
2023-08-13T21:16:58.993Z INFO [sinowealth_kb_tool::isp] Device didn't come up...
2023-08-13T21:16:58.993Z INFO [sinowealth_kb_tool::isp] Retrying... Attempt 2/10
2023-08-13T21:16:59.016Z INFO [sinowealth_kb_tool::isp] Found Device. Entering ISP mode...
2023-08-13T21:16:59.016Z INFO [sinowealth_kb_tool::isp] Waiting for bootloader device...
2023-08-13T21:17:00.035Z INFO [sinowealth_kb_tool::isp] Device didn't come up...
2023-08-13T21:17:00.035Z INFO [sinowealth_kb_tool::isp] Retrying... Attempt 3/10
[and so on...]
When I use my tool to set it to ISP mode:
2023-08-13T21:17:33.342Z INFO [sinowealth_kb_tool::isp] No KB found. Trying bootloader directly...
2023-08-13T21:17:33.389Z INFO [sinowealth_kb_tool::isp] Connected!
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: InvalidParam', src/isp.rs:169:55
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
This is a Python version of the system from Nudelta to find the "channels" to communicate with the keyboard, in this case configured to set the device into ISP mode: https://gist.github.com/WinkelCode/e4e16dfed3ce6f146b5dcfad2943ff72
Original sources here: https://github.com/donn/nudelta/blob/main/lib/nuphy.cpp#L169
SH68F90A
BYK916
firmware_size: 61440
vendor_id: 0x258a
product_id: 0x0049
bootloader_size: 4096 # necessary if not default, otherwise remove this line
page_size: 2048 # necessary if not default, otherwise remove this line
isp_usage_page: 0xff00 # necessary if not default, otherwise remove this line
isp_usage: 0x0001 # necessary if not default, otherwise remove this line
isp_index: 0 # necessary if not default, otherwise remove this line
cfc8661da8c9d7e351b36c0a763426aa
9dc83b7be7eefd21418c20a129525e3e
without ISPA dump from usbhid-dump, win-hid-dump or mac-hid-dump
# Royal Kludge RK G68 using win-hid-dump
...
258A:0049: SINO WEALTH -
PATH:\\?\hid#vid_258a&pid_0049&mi_01&col03#8&269fe19f&0&0002#{4d1e55b2-f16f-11cf-88cb-001111000030}
DESCRIPTOR:
06 00 FF 09 01 A1 01 85 05 15 00 25 01 35 00 45
01 65 00 55 00 75 01 95 28 B1 03 C1 00
(29 bytes)
258A:0049: SINO WEALTH - RK Bluetooth Keyboard
PATH:\\?\hid#vid_258a&pid_0049&mi_01&col05#8&269fe19f&0&0004#{4d1e55b2-f16f-11cf-88cb-001111000030}
DESCRIPTOR:
06 00 FF 09 01 A1 01 85 0A 09 00 15 00 25 FF 35
00 45 00 65 00 55 00 75 08 95 40 B1 02 C1 00
(31 bytes)
...
@carlossless, I have been able to read without problems, now I want to flash the VIA firmware, there is one called rkg68_via.hex here: https://www.caniusevia.com/docs/download_firmware, I can use sinowealth-kb-tool to write this firmware? Do you think I can leave it like a brick? I would like to be able to use the entire VIA or QMK environment. But seeing that there are so many variants of Royal Kludge (68) I don't know if the firmware offered on the VIA website is suitable for my keyboard. Mine is RGB, ANSI layout with Bluetooth, 2.4Ghz and USB-C, in addition to having 2 USB ports. There is another version of this keyboard, the RK68 that does not have those 2 extra USB ports.
firmware_size: 61440
vendor_id: 0x258a
product_id: 0x010c
isp_index: 1
2d169670eae0d36eae8188562c1f66e8
189f254a5715fba9ccd610890f5b90fc
c6b1be8743ec87eb0c3aa630939c6e41
A dump from usbhid-dump, win-hid-dump or mac-hid-dump
# Xinmeng M71 using win-hid-dump
...
WinHIDdump:
...
258A:010C: BY Tech - Gaming Keyboard
PATH:\\?\hid#vid_258a&pid_010c&mi_00#a&9f2aaa&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}\kbd
DESCRIPTOR:
05 01 09 06 A1 01 05 07 19 E0 29 E7 15 00 25 01
35 00 45 01 65 00 55 00 75 01 95 08 81 02 95 38
81 03 05 08 19 01 29 05 95 05 91 02 95 03 91 03
C1 00
(50 bytes)
...
258A:010C: BY Tech - Gaming Keyboard
PATH:\\?\hid#vid_258a&pid_010c&mi_01&col05#a&2476686c&0&0004#{4d1e55b2-f16f-11cf-88cb-001111000030}
DESCRIPTOR:
06 00 FF 09 01 A1 01 85 05 15 00 25 01 35 00 45
01 65 00 55 00 75 01 95 28 B1 03 C1 00
(29 bytes)
Edit: Update winhiddump with direct cable plugged to mainboard.
I've opened up this issue to temporarily log various observed behavior that the ISP bootloader seems to exhibit. This mostly concerns ISP bootloader 3e0ebd0c440af5236d7ff8872343f85d
found on SH68F90A (BYK916))
When the device has firmware preloaded with no LJMP
instruction at 0xEFFB
, the first read cycle (magic_sauce) made through the ISP bootloader will cause it to add an LJMP 0x0000
at 0xEFFB
. This will only be visible through a separate programming device (as a sinolink) since reading firmware through ISP will blank out regions 0xEFFB - 0xEFFD
.
Writing the resulting dump from the read operation back without modification will cause the bootloader to overwrite the LJMP
at 0x0000
and most likely brick the device.
Interestingly the bootloader does seem to detect that an LJMP 0x0000
is not valid and replaces that address to point back to itself - 0xF000
. Unfortunately, this still causes the device to brick itself, because the bootloader code doesn't seem to have the necessary init routines. I have not verified this yet, but I assume it does not initialize the HRCLK/SYSCLK which should be necessary for USB peripheral operation.
SH68F90A
BYK916
firmware_size: 61440
vendor_id: 0x258a
product_id: 0x0049
2d169670eae0d36eae8188562c1f66e8
5a02eda2240f5532d2493c81a928c861
A dump from usbhid-dump, win-hid-dump or mac-hid-dump
# K500-B61 using usbhid-dump
...
001:008:001:DESCRIPTOR 1711664651.046945
06 01 00 09 80 A1 01 85 01 19 81 29 83 15 00 25
01 95 03 75 01 81 02 95 01 75 05 81 01 C0 05 0C
09 01 A1 01 85 02 19 00 2A FF 02 15 00 26 FF 7F
95 01 75 10 81 00 C0 06 00 FF 09 01 A1 01 85 03
15 00 26 FF 00 09 2F 75 08 95 03 81 02 C0 05 01
09 06 A1 01 85 04 05 07 19 04 29 70 15 00 25 01
75 01 95 78 81 02 C0 06 00 FF 09 01 A1 01 85 05
15 00 26 FF 00 19 01 29 02 75 08 95 05 B1 02 C0
06 00 FF 09 01 A1 01 85 06 15 00 26 FF 00 19 01
29 02 75 08 96 07 04 B1 02 C0 05 01 09 02 A1 01
85 07 09 01 A1 00 05 09 15 00 25 01 19 01 29 05
75 01 95 05 81 02 95 03 81 01 05 01 16 00 80 26
FF 7F 09 30 09 31 75 10 95 02 81 06 15 81 25 7F
09 38 75 08 95 01 81 06 05 0C 0A 38 02 95 01 81
06 C0 C0
001:008:000:DESCRIPTOR 1711664651.049886
05 01 09 06 A1 01 05 07 19 E0 29 E7 15 00 25 01
95 08 75 01 81 02 95 01 75 08 81 03 95 06 75 08
15 00 26 FF 00 05 07 19 00 2A FF 00 81 00 25 01
95 05 75 01 05 08 19 01 29 05 91 02 95 01 75 03
91 03 C0
...
unknown
BY8948-00006
firmware_size: 61440
vendor_id: 0x258a
product_id: 0x0036
bootloader_size: 4096 # necessary if not default
page_size: 2048 # necessary if not default
isp_usage_page: 0xff00 # necessary if not default
isp_usage: 0x0001 # necessary if not default
isp_index: 0 # necessary if not default
46459c31e58194fa076b8ce8fb1f3eaa
a16ac7d66d970b0c574870eaf7ba8302
A dump from usbhid-dump, win-hid-dump or mac-hid-dump
003:012:001:DESCRIPTOR 1711043772.918294
05 01 09 06 A1 01 85 01 05 07 19 E0 29 E7 15 00
25 01 75 01 95 08 81 02 95 06 75 08 15 00 26 FF
00 05 07 19 00 2A FF 00 81 00 C0 06 0C 00 09 01
A1 01 85 02 25 01 15 00 75 01 0A B5 00 0A B6 00
0A B7 00 0A CD 00 0A E2 00 0A A2 00 0A E9 00 0A
EA 00 95 08 81 03 0A 83 01 0A 94 01 0A 86 01 0A
88 01 0A 8A 01 0A 92 01 0A A8 02 0A 84 01 95 08
81 03 0A 21 02 0A 23 02 0A 24 02 0A 25 02 0A 26
02 0A 27 02 0A 2A 02 0A B1 02 95 08 81 03 C0 06
00 FF 09 01 A1 01 85 04 15 00 26 FF 00 09 00 75
08 96 07 02 B1 02 C0 06 00 FF 09 01 A1 01 85 07
15 00 26 FF 00 09 00 75 08 95 07 81 00 C0 06 00
FF 09 01 A1 01 85 05 15 00 26 FF 00 09 00 95 05
75 08 B1 02 C0
003:012:000:DESCRIPTOR 1711043772.921288
05 01 09 02 A1 01 09 01 A1 00 05 09 19 01 29 05
15 00 25 01 75 01 95 05 81 02 95 03 81 01 05 01
09 30 09 31 16 00 80 26 FF 7F 75 10 95 02 81 06
09 38 15 80 25 7F 75 08 95 01 81 06 05 0C 0A 38
02 95 01 81 06 C0 C0
Device seems to enter bootloader mode but fails to find device after. The mouse will enumerate as
0603:1021 Novatek Microelectronics Corp.
I ran
sudo ./sinowealth-kb-tool read \
--vendor_id 0x258A \
--product_id 0x0036 \
--firmware_size 61440 \
--bootloader_size 4096 \
--page_size 2048 \
--isp_iface_num 1 \
--isp_usage_page 0xff00 \
--isp_usage 0x0001 \
--isp_index 0 \
--reboot false \
ModelO.hex
with --isp_index 0, 1 or 2 same result.
firmware_size: 61440
vendor_id: 0x258a
product_id: 0x002a
3e0ebd0c440af5236d7ff8872343f85d
693cd148ec436131b6638fa42fc171d6
4d6bedef3ca9f2885fb5f8c7385075df
A dump from usbhid-dump, win-hid-dump or mac-hid-dump
# WINHIDDUMP E-yooso Z11
![20240427_202408](https://github.com/carlossless/sinowealth-kb-tool/assets/98485962/e1e55122-29cf-42fc-8815-e55e06dc3467)
...
WinHIDdump:
258A:002A: SINO WEALTH - Gaming KB
PATH:\\?\hid#vid_258a&pid_002a&mi_00#8&1da6645a&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}\kbd
DESCRIPTOR:
05 01 09 06 A1 01 05 07 19 E0 29 E7 15 00 25 01
35 00 45 01 65 00 55 00 75 01 95 08 81 02 95 38
81 03 05 08 19 01 29 05 95 05 91 02 95 03 91 03
C1 00
(50 bytes)
258A:002A: SINO WEALTH - Gaming KB
PATH:\\?\hid#vid_258a&pid_002a&mi_01&col04#8&5e2d815&0&0003#{4d1e55b2-f16f-11cf-88cb-001111000030}\kbd
DESCRIPTOR:
05 01 09 06 A1 01 85 06 05 07 19 04 29 70 15 00
25 01 35 00 45 01 65 00 55 00 75 01 95 6D 81 02
95 0B 81 03 C1 00
(38 bytes)
258A:002A: SINO WEALTH - Gaming KB
PATH:\\?\hid#vid_258a&pid_002a&mi_01&col06#8&5e2d815&0&0005#{4d1e55b2-f16f-11cf-88cb-001111000030}
DESCRIPTOR:
06 00 FF 09 01 A1 01 85 0A 09 00 15 00 25 FF 35
00 45 00 65 00 55 00 75 08 95 29 B1 02 C1 00
(31 bytes)
...
Sorry if I messed anything up I don't use these types of tools a lot lol, nor github a lot, ik there was a person who already did this kb but was just wondering if there was any difference lol
firmware_size: 61440
vendor_id: 0x258a
product_id: 0x002a
Hello,
I have two of these keyboards. One working and one semi-working. I believe the MCUs to be similar/identical to the Royal Kludge RK61 and RK100. In fact, the reason that one of my keyboards is "semi-working" is that I managed to "successfully" flash firmware from the RK100 onto my XM-RF68 using Royal Kludge's Windows customization/upgrade tool. Surprisingly the damage was only to about 5 keys which no longer function as expected.
I was hoping that I would be able to use your program to dump the firmware from the working XM-RF68 and write it to the "semi-working" one (currently with RK100 firmware).
The keyboards show up as "258a:002a SINO WEALTH Gaming KB" when plugged in.
Unfortunately the devices cannot be read using the following command:
# sinowealth-kb-tool read --vendor_id 0x258a --product_id 0x002a --firmware_size 61440 XM-RF68.hex
INFO [sinowealth_kb_tool::isp] Looking for vId:0x258a pId:0x002a
INFO [sinowealth_kb_tool::isp] Found regular device. Entering ISP mode...
INFO [sinowealth_kb_tool::isp] Regular device not found. Trying ISP device...
INFO [sinowealth_kb_tool::isp] Retrying... Attempt 2/10
INFO [sinowealth_kb_tool::isp] Looking for vId:0x258a pId:0x002a
INFO [sinowealth_kb_tool::isp] Found regular device. Entering ISP mode...
INFO [sinowealth_kb_tool::isp] Regular device not found. Trying ISP device...
...
INFO [sinowealth_kb_tool::isp] Retrying... Attempt 10/10
INFO [sinowealth_kb_tool::isp] Looking for vId:0x258a pId:0x002a
INFO [sinowealth_kb_tool::isp] Found regular device. Entering ISP mode...
INFO [sinowealth_kb_tool::isp] Regular device not found. Trying ISP device...
ERROR [sinowealth_kb_tool] Device not found
Thanks, Ivan.
SH68F90A
BYK916
firmware_size: 61440
vendor_id: 0x258a
product_id: 0x0049
bootloader_size: 4096 # necessary if not default
page_size: 2048 # necessary if not default
isp_usage_page: 0xff00 # necessary if not default
isp_usage: 0x0001 # necessary if not default
isp_index: 0 # necessary if not default
3e0ebd0c440af5236d7ff8872343f85d
c506173c042656d078dbaf54906ac44b
A dump from usbhid-dump, win-hid-dump or mac-hid-dump
# Redragon Shaco Pro using hid-dump
❯ sudo usbhid-dump -m 258a:0049
001:035:001:DESCRIPTOR 1710647674.196170
06 01 00 09 80 A1 01 85 01 19 81 29 83 15 00 25
01 95 03 75 01 81 02 95 01 75 05 81 01 C0 05 0C
09 01 A1 01 85 02 19 00 2A FF 02 15 00 26 FF 7F
95 01 75 10 81 00 C0 06 00 FF 09 01 A1 01 85 03
15 00 26 FF 00 09 2F 75 08 95 03 81 02 C0 05 01
09 06 A1 01 85 04 05 07 19 04 29 70 15 00 25 01
75 01 95 78 81 02 C0 06 00 FF 09 01 A1 01 85 05
15 00 26 FF 00 19 01 29 02 75 08 95 05 B1 02 C0
06 00 FF 09 01 A1 01 85 06 15 00 26 FF 00 19 01
29 02 75 08 96 07 04 B1 02 C0 05 01 09 02 A1 01
85 07 09 01 A1 00 05 09 15 00 25 01 19 01 29 05
75 01 95 05 81 02 95 03 81 01 05 01 16 00 80 26
FF 7F 09 30 09 31 75 10 95 02 81 06 15 81 25 7F
09 38 75 08 95 01 81 06 05 0C 0A 38 02 95 01 81
06 C0 C0 06 00 FF 09 01 A1 01 85 08 15 00 26 FF
00 09 00 75 08 96 7D 01 B1 02 C0
001:035:000:DESCRIPTOR 1710647674.199069
05 01 09 06 A1 01 05 07 19 E0 29 E7 15 00 25 01
95 08 75 01 81 02 95 01 75 08 81 03 95 06 75 08
15 00 26 FF 00 05 07 19 00 2A FF 00 81 00 25 01
95 05 75 01 05 08 19 01 29 05 91 02 95 01 75 03
91 03 C0
sinowealth-kb-tool-bin read --full \
--vendor_id 0x258a \
--product_id 0x0049 \
--firmware_size 61440 \
--bootloader_size 4096 \
--page_size 2048 \
--reboot false \
StockFW.hex
Most of the times it will give this error and leaves the keyboard in the bootloader mode with random rgb lights:
INFO [sinowealth_kb_tool::isp] Looking for vId:0x258a pId:0x0049
INFO [sinowealth_kb_tool::isp] Regular device didn't come up...
INFO [sinowealth_kb_tool::isp] Regular device not found. Trying ISP device...
INFO [sinowealth_kb_tool::isp] Retrying... Attempt 2/10
INFO [sinowealth_kb_tool::isp] Looking for vId:0x258a pId:0x0049
INFO [sinowealth_kb_tool::isp] Found regular device. Entering ISP mode...
INFO [sinowealth_kb_tool::isp] Regular device not found. Trying ISP device...
INFO [sinowealth_kb_tool::isp] Retrying... Attempt 3/10
INFO [sinowealth_kb_tool::isp] Looking for vId:0x258a pId:0x0049
thread 'main' panicked at src/isp.rs:242:64:
called `Result::unwrap()` on an `Err` value: HidApiError { message: "hid_error is not implemented yet" }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
But sometimes it will work just fine.
INFO [sinowealth_kb_tool::isp] Looking for vId:0x258a pId:0x0049
INFO [sinowealth_kb_tool::isp] Regular device didn't come up...
INFO [sinowealth_kb_tool::isp] Regular device not found. Trying ISP device...
INFO [sinowealth_kb_tool::isp] Retrying... Attempt 2/10
INFO [sinowealth_kb_tool::isp] Looking for vId:0x258a pId:0x0049
INFO [sinowealth_kb_tool::isp] Found regular device. Entering ISP mode...
INFO [sinowealth_kb_tool::isp] Regular device not found. Trying ISP device...
INFO [sinowealth_kb_tool::isp] Retrying... Attempt 3/10
INFO [sinowealth_kb_tool::isp] Looking for vId:0x258a pId:0x0049
INFO [sinowealth_kb_tool::isp] Regular device didn't come up...
INFO [sinowealth_kb_tool::isp] Regular device not found. Trying ISP device...
INFO [sinowealth_kb_tool::isp] Retrying... Attempt 4/10
INFO [sinowealth_kb_tool::isp] Looking for vId:0x258a pId:0x0049
INFO [sinowealth_kb_tool::isp] Regular device didn't come up...
INFO [sinowealth_kb_tool::isp] Regular device not found. Trying ISP device...
INFO [sinowealth_kb_tool::isp] Connected!
INFO [sinowealth_kb_tool::isp] Enabling firmware...
INFO [sinowealth_kb_tool::isp] Reading...
INFO [sinowealth_kb_tool] MD5: f885cbb3a33602ae52bae90d491e1303
Hi, @carlossless, just to add a note about report #58, yesterday I was testing sinowealth using the -p machenike-k500-b61
and the read
operation was successful but the write
was returning a mismatch firewall error, previous I was using the flag -p redragon-k617-fizz
and both operation succeed without problems.
Another detail, I verified another Machenike keyboard K500 B94, and it uses the same mcu (BYK916) and also has the idVendor and idProduct as 0x258a and 0x0049, but I couldn't test sinowealth-kb-tool
in them (keyboard isn't mine).
pub const PART_ROYALKLUDGE_RK100: Part = Part {
firmware_size: 61440, // 61440 until bootloader
bootloader_size: 4096,
page_size: 2048,
vendor_id: 0x258a,
product_id: 0x0056,
};
INFO [sinowealth_kb_tool::isp] Looking for vId:0x258a pId:0x0056
INFO [sinowealth_kb_tool::isp] Found regular device. Entering ISP mode...
INFO [sinowealth_kb_tool::isp] Regular device not found. Trying ISP device...
INFO [sinowealth_kb_tool::isp] Retrying... Attempt 2/10
INFO [sinowealth_kb_tool::isp] Looking for vId:0x258a pId:0x0056
INFO [sinowealth_kb_tool::isp] Regular device didn't come up...
INFO [sinowealth_kb_tool::isp] Regular device not found. Trying ISP device...
INFO [sinowealth_kb_tool::isp] Connected!
INFO [sinowealth_kb_tool::isp] Enabling firmware...
INFO [sinowealth_kb_tool::isp] Reading...
INFO [sinowealth_kb_tool] MD5: cfc8661da8c9d7e351b36c0a763426aa
Product URL: http://en.rkgaming.com/product/14/
This is the RGB variant of the product, but I suspect that the backlit and the Pro variants of the product are using the same mcu. (I'd have to check their firmware updaters to be sure)
I note that the bootloader md5 is the same as the Xinmeng K916, but I don't remember the precise label on the mcu at this time.
Side note: Couldn't put the keyboard into ISP mode while within Windows, the 05 75 ...
report would never get sent. USB captures in Wireshark seem to corroborate this. (The vendor's firmware updater binary wouldn't detect either)
Possibly similar issue to #15
Sorry if this is useless information
I think it can't go into isp mode for whatever reason.
Since I'm not really into all the stuff you did I have no idea what can be done😥
(I saw a few people wanting qmk on their rk keyboards with the BYK916 - including me - and I didn't find a way to do it so I thought your project is the closest there is to it, yet I'm stuck again)
I just want to have layers on my keyboard without needing any software
pub const PART_RK_68_ISO_RETURN: Part = Part {
flash_size: ?,
bootloader_size: ?,
page_size: ?,
vendor_id: 0x258a,
product_id: 0x00a9,
};
unknown
BY8801
firmware_size: 61440
vendor_id: 0x145f
product_id: 0x02b6
bootloader_size: 4096 # necessary if not default
page_size: 2048 # necessary if not default
isp_usage_page: 0xff00 # necessary if not default
isp_usage: 0x0001 # necessary if not default
isp_index: 0 # necessary if not default
620f0b67a91f7f74151bc5be745b7110
95fe8060ab83c8bf9eee6d5cbc86652d
A dump from usbhid-dump, win-hid-dump or mac-hid-dump
003:011:001:DESCRIPTOR 1711043111.675525
05 01 09 06 A1 01 85 01 05 07 19 E0 29 E7 15 00
25 01 75 01 95 08 81 02 95 06 75 08 15 00 26 FF
00 05 07 19 00 2A FF 00 81 00 C0 06 0C 00 09 01
A1 01 85 02 25 01 15 00 75 01 0A B5 00 0A B6 00
0A B7 00 0A CD 00 0A E2 00 0A A2 00 0A E9 00 0A
EA 00 95 08 81 03 0A 83 01 0A 94 01 0A 86 01 0A
88 01 0A 8A 01 0A 92 01 0A A8 02 0A 84 01 95 08
81 03 0A 21 02 0A 23 02 0A 24 02 0A 25 02 0A 26
02 0A 27 02 0A 2A 02 0A B1 02 95 08 81 03 C0 06
00 FF 09 01 A1 01 85 04 15 00 26 FF 00 09 00 75
08 96 07 02 B1 02 C0 06 00 FF 09 01 A1 01 85 07
15 00 26 FF 00 09 00 75 08 95 07 81 00 C0 06 00
FF 09 01 A1 01 85 05 15 00 26 FF 00 09 00 95 05
75 08 B1 02 C0
003:011:000:DESCRIPTOR 1711043111.678519
05 01 09 02 A1 01 09 01 A1 00 05 09 19 01 29 05
15 00 25 01 75 01 95 05 81 02 95 03 81 01 05 01
09 30 09 31 16 00 80 26 FF 7F 75 10 95 02 81 06
09 38 15 80 25 7F 75 08 95 01 81 06 05 0C 0A 38
02 95 01 81 06 C0 C0
I ran
sudo ./sinowealth-kb-tool read \
--vendor_id 0x145f \
--product_id 0x02b6 \
--firmware_size 61440 \
--bootloader_size 4096 \
--page_size 2048 \
--isp_iface_num 1 \
--isp_usage_page 0xff00 \
--isp_usage 0x0001 \
--isp_index 0 \
--reboot false \
foobar.hex
SH68F90?
BYK901
firmware_size: 168972
vendor_id: 0x258a
product_id: 0x002a
bootloader_size: 11276
3e0ebd0c440af5236d7ff8872343f85d
03205dbb8dc26354fe04786d0d7f7625
A dump from usbhid-dump, win-hid-dump or mac-hid-dump
sudo usbhid-dump --entity=all --model=258a
003:021:001:DESCRIPTOR 1712708430.881304
05 01 09 80 A1 01 85 01 19 81 29 83 15 00 25 01
75 01 95 03 81 02 95 05 81 01 C0 05 0C 09 01 A1
01 85 02 19 00 2A 3C 02 15 00 26 3C 02 95 01 75
10 81 00 C0 06 00 FF 09 01 A1 01 85 05 15 00 26
FF 00 19 01 29 02 75 08 95 05 B1 02 C0 05 01 09
06 A1 01 85 06 05 07 19 04 29 70 15 00 25 01 75
01 95 78 81 02 C0 06 00 FF 09 01 A1 01 85 09 15
00 26 FF 00 09 00 75 08 96 F8 01 B1 02 C0 06 00
FF 09 01 A1 01 85 0A 15 00 26 FF 00 09 00 75 08
95 29 B1 02 C0 06 00 FF 09 01 A1 01 85 0B 15 00
26 FF 00 09 00 75 08 95 7E B1 02 C0 05 01 09 02
A1 01 85 0D 09 01 A1 00 05 09 15 00 25 01 19 01
29 05 75 01 95 05 81 02 95 03 81 01 05 01 16 00
80 26 FF 7F 09 30 09 31 75 10 95 02 81 06 15 81
25 7F 09 38 75 08 95 01 81 06 05 0C 0A 38 02 95
01 81 06 C0 C0 06 00 FF 09 01 A1 01 85 0C 15 00
26 FF 00 09 00 75 08 96 80 07 B1 02 C0
003:021:000:DESCRIPTOR 1712708430.882968
05 01 09 06 A1 01 05 07 19 E0 29 E7 15 00 25 01
95 08 75 01 81 02 95 01 75 08 81 03 95 06 75 08
15 00 26 FF 00 05 07 19 00 2A FF 00 81 00 25 01
95 05 75 01 05 08 19 01 29 05 91 02 95 01 75 03
91 03 C0
[339005.632758] usb 3-3: new full-speed USB device number 22 using xhci_hcd
[339005.775552] usb 3-3: New USB device found, idVendor=258a, idProduct=002a, bcdDevice=12.10
[339005.775566] usb 3-3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[339005.775571] usb 3-3: Product: Gaming KB
[339005.775574] usb 3-3: Manufacturer: SINO WEALTH
[339005.778909] input: SINO WEALTH Gaming KB as /devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.0/0003:258A:002A.002C/input/input103
[339005.833222] hid-generic 0003:258A:002A.002C: input,hidraw0: USB HID v1.11 Keyboard [SINO WEALTH Gaming KB ] on usb-0000:00:14.0-3/input0
[339005.838636] input: SINO WEALTH Gaming KB System Control as /devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.1/0003:258A:002A.002D/input/input104
[339005.893098] input: SINO WEALTH Gaming KB Consumer Control as /devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.1/0003:258A:002A.002D/input/input105
[339005.893395] input: SINO WEALTH Gaming KB Keyboard as /devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.1/0003:258A:002A.002D/input/input106
[339005.893683] input: SINO WEALTH Gaming KB Mouse as /devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.1/0003:258A:002A.002D/input/input107
[339005.894348] hid-generic 0003:258A:002A.002D: input,hiddev96,hidraw1: USB HID v1.11 Keyboard [SINO WEALTH Gaming KB ] on usb-0000:00:14.0-3/input1
INFO [sinowealth_kb_tool::isp] Looking for vId:0x258a pId:0x002a
INFO [sinowealth_kb_tool::isp] Found regular device. Entering ISP mode...
INFO [sinowealth_kb_tool::isp] Regular device not found. Trying ISP device...
INFO [sinowealth_kb_tool::isp] Retrying... Attempt 2/10
INFO [sinowealth_kb_tool::isp] Looking for vId:0x258a pId:0x002a
INFO [sinowealth_kb_tool::isp] Regular device didn't come up...
INFO [sinowealth_kb_tool::isp] Regular device not found. Trying ISP device...
INFO [sinowealth_kb_tool::isp] Connected!
INFO [sinowealth_kb_tool::isp] Enabling firmware...
INFO [sinowealth_kb_tool::isp] Reading...
INFO [sinowealth_kb_tool::isp] Rebooting...
INFO [sinowealth_kb_tool] MD5: 03205dbb8dc26354fe04786d0d7f7625
INFO [sinowealth_kb_tool::isp] Looking for vId:0x258a pId:0x002a
INFO [sinowealth_kb_tool::isp] Found regular device. Entering ISP mode...
INFO [sinowealth_kb_tool::isp] Regular device not found. Trying ISP device...
INFO [sinowealth_kb_tool::isp] Retrying... Attempt 2/10
INFO [sinowealth_kb_tool::isp] Looking for vId:0x258a pId:0x002a
INFO [sinowealth_kb_tool::isp] Regular device didn't come up...
INFO [sinowealth_kb_tool::isp] Regular device not found. Trying ISP device...
INFO [sinowealth_kb_tool::isp] Connected!
INFO [sinowealth_kb_tool::isp] Enabling firmware...
INFO [sinowealth_kb_tool::isp] Reading...
INFO [sinowealth_kb_tool::isp] Rebooting...
INFO [sinowealth_kb_tool] MD5: 3e0ebd0c440af5236d7ff8872343f85d
I was wondering if someone could give me insights on what I should be watching out when flashing. I have a RK84 RGB ISO Return Keyboard and dumped both the isp and bootloader. I would like to try and flash smk onto it but worry something could go wrong. Does smk also change the bootloader? and if it doesnt and I still mess up is it then possible to enter bootloader and flash back the original firmware with this tool? or do I need to physically open the device and short the reset pins or something like that?
SH68F90A
BYK916
firmware_size: 61440
vendor_id: 0x258a
product_id: 0x010c
isp_index: 1
3e0ebd0c440af5236d7ff8872343f85d
22c29eba2ce0ab1cfba5101e4a8a841b
71c6416ad9f2a80920f9d59e5672893e
A dump from usbhid-dump, win-hid-dump or mac-hid-dump
# Leobog Hi75 using usbhid-dump
$ sudo usbhid-dump -m 258a:010c
001:006:001:DESCRIPTOR 1714081999.287219
06 01 00 09 80 A1 01 85 01 19 81 29 83 15 00 25
01 95 03 75 01 81 02 95 01 75 05 81 01 C0 05 0C
09 01 A1 01 85 02 19 00 2A FF 02 15 00 26 FF 7F
95 01 75 10 81 00 C0 06 00 FF 09 01 A1 01 85 03
15 00 26 FF 00 09 2F 75 08 95 03 81 02 C0 05 01
09 06 A1 01 85 04 05 07 19 04 29 70 15 00 25 01
75 01 95 78 81 02 C0 06 00 FF 09 01 A1 01 85 05
15 00 26 FF 00 19 01 29 02 75 08 95 05 B1 02 C0
06 00 FF 09 01 A1 01 85 06 15 00 26 FF 00 19 01
29 02 75 08 96 07 02 B1 02 C0 05 01 09 02 A1 01
85 07 09 01 A1 00 05 09 15 00 25 01 19 01 29 05
75 01 95 05 81 02 95 03 81 01 05 01 16 00 80 26
FF 7F 09 30 09 31 75 10 95 02 81 06 15 81 25 7F
09 38 75 08 95 01 81 06 05 0C 0A 38 02 95 01 81
06 C0 C0
001:006:000:DESCRIPTOR 1714081999.289246
05 01 09 06 A1 01 05 07 19 E0 29 E7 15 00 25 01
95 08 75 01 81 02 95 01 75 08 81 03 95 06 75 08
15 00 26 FF 00 05 07 19 00 2A FF 00 81 00 25 01
95 05 75 01 05 08 19 01 29 05 91 02 95 01 75 03
91 03 C0
Thanks for the nice work!
I was also able to flash smk on my Leobog Hi75 without bricking it, the firmware works but it's all over the place since I still need to figure out the layout, but the fact that works and I can revert by reflashing the backup is promising.
Hello,
I've forked this project to add my own keyboard which is a Digitial Alliance Meca Warrior X. It uses SH68F90S MCU as indicated in the chip marking below.
What I did is added this PART configuration
pub const PART_DA_WARRIOR_X: Part = Part {
flash_size: 61440, // 61440 until bootloader
bootloader_size: 4096,
page_size: 2048,
vendor_id: 0x258a,
product_id: 0x0090,
};
I got the Vendor ID and Product ID from Windows Device Manager, but I don't know about the flash_size, bootloader_size and page_size.
Anyway here's the log:
2023-11-14T16:52:41.155Z INFO [sinowealth_kb_tool::isp] Looking for vId:0x258a pId:0x0090
2023-11-14T16:52:41.155Z DEBUG [sinowealth_kb_tool::isp] Opening: "\\\\?\\HID#VID_258A&PID_0090&MI_01&Col05#8&2c5f1391&0&0004#{4d1e55b2-f16f-11cf-88cb-001111000030}"
2023-11-14T16:52:41.168Z INFO [sinowealth_kb_tool::isp] Found Regular device. Entering ISP mode...
2023-11-14T16:52:41.169Z INFO [sinowealth_kb_tool::isp] Regular device not found. Trying ISP device...
2023-11-14T16:52:41.861Z INFO [sinowealth_kb_tool::isp] Retrying... Attempt 2/10
I have little experience with embedded programming (mostly arduino).
If you able to assist me, I would love to help and get this tool working on this keyboard and hopefully able to flash QMK Firmware.
SH68F90A
BYK916
firmware_size: 61440
vendor_id: 0x258a
product_id: 0x0049
cfc8661da8c9d7e351b36c0a763426aa
ec9caa25d6979e18919725ba449b81a4
A dump from usbhid-dump, win-hid-dump or mac-hid-dump
# Redragon DRACONIC K530 PRO using linux usbhid-dump
...
❯ sudo usbhid-dump -m 258a:0049
001:035:001:DESCRIPTOR 1712170898.477694
05 01 09 80 A1 01 85 01 19 81 29 83 15 00 25 01
75 01 95 03 81 02 95 05 81 01 C0 05 0C 09 01 A1
01 85 02 19 00 2A 3C 02 15 00 26 3C 02 95 01 75
10 81 00 C0 06 00 FF 09 01 A1 01 85 05 15 00 26
FF 00 19 01 29 02 75 08 95 05 B1 02 C0 05 01 09
06 A1 01 85 06 05 07 19 04 29 70 15 00 25 01 75
01 95 78 81 02 C0 06 00 FF 09 01 A1 01 85 09 15
00 26 FF 00 09 00 75 08 96 F8 01 B1 02 C0 06 00
FF 09 01 A1 01 85 0A 15 00 26 FF 00 09 00 75 08
95 29 B1 02 C0 06 00 FF 09 01 A1 01 85 0B 15 00
26 FF 00 09 00 75 08 96 7A 01 B1 02 C0 05 01 09
02 A1 01 85 0D 09 01 A1 00 05 09 15 00 25 01 19
01 29 05 75 01 95 05 81 02 95 03 81 01 05 01 16
00 80 26 FF 7F 09 30 09 31 75 10 95 02 81 06 15
81 25 7F 09 38 75 08 95 01 81 06 05 0C 0A 38 02
95 01 81 06 C0 C0 06 00 FF 09 01 A1 01 85 0C 15
00 26 FF 00 09 00 75 08 96 80 07 B1 02 C0
001:035:000:DESCRIPTOR 1712170898.478814
05 01 09 06 A1 01 05 07 19 E0 29 E7 15 00 25 01
95 08 75 01 81 02 95 01 75 08 81 03 95 06 75 08
15 00 26 FF 00 05 07 19 00 2A FF 00 81 00 25 01
95 05 75 01 05 08 19 01 29 05 91 02 95 01 75 03
91 03 C0
Hi, I have got a bricked k530 and fixed it using my method that I used for my k641. This is the report of this tool. If you need any more info please let me know quickly because I have to return it in three days. Thx so much for the great tool.
firmware_size: 61440
vendor_id: 0x258a
product_id: 0x0049
bootloader_size: 4096 # necessary if not default
page_size: 2048 # necessary if not default
isp_usage_page: 0xff00 # necessary if not default
isp_usage: 0x0001 # necessary if not default
isp_index: 0 # necessary if not default
3e0ebd0c440af5236d7ff8872343f85d
idonthave
I don't have, But I have wireshark capture of changing the modes from the software before it bricked.
Hello. This is not an issue, I just have a question. Sorry if it is stupid. I have a redragon shaco pro (k641 pro) keyboard and while I was trying to reverse engineer the rgb protocol, I have bricked its firmware and it is not detected by linux or windows anymore. It says
device descriptor read/64, error -71.
I don't have any backups. Is there any way to put it into ISP Mode and flash smk on it with this tool? I tried using this tool
https://github.com/gashtaan/sinowealth-fw-disabler
But nothing happened. I tried to manually flash smk with arduino and jtag on it by modifying https://github.com/gashtaan/sinowealth-8051-bl-updater data and address but after I flashed it when I plugged it in, the leds just blinked for a moment and descriptor read error came. I got a dump with https://github.com/gashtaan/sinowealth-8051-dumper and it shows all zeros after 0x0fff until the last 4096 bytes which is the bootloader. My manual flash file and dump after flashing it are attached. It looked like that 0xeffd also was flashed wrong but when I tried to reflash that byte I somehow made it worse. Now the entire 0xeff0 - 0xefff looks like this
8093BA0108955D983AE03A97F1F700C0
But the bootloader is intact.
BTW, Thanks very much for the nice tool and nice firmware, I'm sure they are very useful.
SH68F90A
_SH68F90A
firmware_size: 61440
vendor_id: 0x258a
product_id: 0x0049
I have a keyboard with some special reason that use the chip with ek861's chip, but the keyboard model is ek871. The keyboard can be used well except the left key replace with fn key. So I want to flash the same vid and pid keyboard's hex files to make the key recovery normal.
Does anyone can help me? Please send me the hex file to my email [email protected]. Thx a lot!
I think the most fit keyboard is reddragon k641, the rk71 is the same layout,but the pid is not the same. I dont know may it will make bricked . Or someone can help me to compile a 71key layout with smk? When I try to make a smk. I meet the error.
![screenshot](https://github.com/carlossless/sinowealth-kb-tool/assets/26353584/f111f8d9-57fa-4477-bbfb-bac610512334)
I cant deal with it.
I also have the ek861's hex.If someone need it , can call me.
Thank you very much for your work. This is not a real issue, rather I just want to pass on to you the information that the utility works with Halo 65. Compiled and was able to dump the firmware using the nuphy-air60
part.
SH68F90A
BYK916
firmware_size: 61440
vendor_id: 0x258a
product_id: 0x0049
3e0ebd0c440af5236d7ff8872343f85d
da07d2bde42817f2c8ac51fdbe49c3d2
A dump from usbhid-dump, win-hid-dump or mac-hid-dump
# Redragon K658 Irelia Pro using usbhid-dump
...
001:010:001:DESCRIPTOR 1713041695.200599
06 01 00 09 80 A1 01 85 01 19 81 29 83 15 00 25
01 95 03 75 01 81 02 95 01 75 05 81 01 C0 05 0C
09 01 A1 01 85 02 19 00 2A FF 02 15 00 26 FF 7F
95 01 75 10 81 00 C0 06 00 FF 09 01 A1 01 85 03
15 00 26 FF 00 09 2F 75 08 95 03 81 02 C0 05 01
09 06 A1 01 85 04 05 07 19 04 29 70 15 00 25 01
75 01 95 78 81 02 C0 06 00 FF 09 01 A1 01 85 05
15 00 26 FF 00 19 01 29 02 75 08 95 05 B1 02 C0
06 00 FF 09 01 A1 01 85 06 15 00 26 FF 00 19 01
29 02 75 08 96 07 04 B1 02 C0 05 01 09 02 A1 01
85 07 09 01 A1 00 05 09 15 00 25 01 19 01 29 05
75 01 95 05 81 02 95 03 81 01 05 01 16 00 80 26
FF 7F 09 30 09 31 75 10 95 02 81 06 15 81 25 7F
09 38 75 08 95 01 81 06 05 0C 0A 38 02 95 01 81
06 C0 C0 06 00 FF 09 01 A1 01 85 08 15 00 26 FF
00 09 00 75 08 96 7D 01 B1 02 C0
001:010:000:DESCRIPTOR 1713041695.202649
05 01 09 06 A1 01 05 07 19 E0 29 E7 15 00 25 01
95 08 75 01 81 02 95 01 75 08 81 03 95 06 75 08
15 00 26 FF 00 05 07 19 00 2A FF 00 81 00 25 01
95 05 75 01 05 08 19 01 29 05 91 02 95 01 75 03
91 03 C0
...
Doesn't enumerate as ISP in dmesg. From HID descriptor it should work with usage_page == 0xff00 && usage == 0x0001
.
BYK903
BYK901
firmware_size: ?
vendor_id: 0x258a
product_id: 0x013b
bootloader_size: ? # necessary if not default, otherwise remove this line
page_size: ? # necessary if not default, otherwise remove this line
isp_usage_page: ? # necessary if not default, otherwise remove this line
isp_usage: ? # necessary if not default, otherwise remove this line
isp_index: ? # necessary if not default, otherwise remove this line
beefcafebeefcafebeefcafebeefcafe
deadbeefdeadbeefdeadbeefdeadbeef
A dump from usbhid-dump, win-hid-dump or mac-hid-dump
001:099:001:DESCRIPTOR 1712737273.934683
05 01 09 80 A1 01 85 01 19 81 29 83 15 00 25 01
75 01 95 03 81 02 95 05 81 01 C0 05 0C 09 01 A1
01 85 02 19 00 2A 3C 02 15 00 26 3C 02 95 01 75
10 81 00 C0 06 00 FF 09 01 A1 01 85 05 15 00 26
FF 00 19 01 29 02 75 08 95 05 B1 02 C0 05 01 09
06 A1 01 85 06 05 07 19 04 29 70 15 00 25 01 75
01 95 78 81 02 C0 06 00 FF 09 01 A1 01 85 09 15
00 26 FF 00 09 00 75 08 96 F8 01 B1 02 C0 06 00
FF 09 01 A1 01 85 0A 15 00 26 FF 00 09 00 75 08
95 29 B1 02 C0 06 00 FF 09 01 A1 01 85 0B 15 00
26 FF 00 09 00 75 08 95 7E B1 02 C0 05 01 09 02
A1 01 85 0D 09 01 A1 00 05 09 15 00 25 01 19 01
29 05 75 01 95 05 81 02 95 03 81 01 05 01 16 00
80 26 FF 7F 09 30 09 31 75 10 95 02 81 06 15 81
25 7F 09 38 75 08 95 01 81 06 05 0C 0A 38 02 95
01 81 06 C0 C0 06 00 FF 09 01 A1 01 85 0C 15 00
26 FF 00 09 00 75 08 96 80 07 B1 02 C0
001:099:000:DESCRIPTOR 1712737273.936511
05 01 09 06 A1 01 05 07 19 E0 29 E7 15 00 25 01
95 08 75 01 81 02 95 01 75 08 81 03 95 06 75 08
15 00 26 FF 00 05 07 19 00 2A FF 00 81 00 25 01
95 05 75 01 05 08 19 01 29 05 91 02 95 01 75 03
91 03 C0
The config is same as TERPORT_TR95 including VID and PID.
Even the Bootloader hash is also same.
pub const PART_FIZZ_K617: Part = Part {
flash_size: 61440, // 61440 until bootloader
bootloader_size: 4096,
page_size: 2048,
vendor_id: 0x258a,
product_id: 0x0049,
};
Bootloader MD5: 2d169670eae0d36eae8188562c1f66e8
I haven't tried write operations on the keyboard.
SH68F90A
BYK916
firmware_size: 61440
vendor_id: 0x258A
product_id: 0xF4
bootloader_size: 4096 # necessary if not default
page_size: 2048 # necessary if not default
isp_usage_page: 0xff00 # necessary if not default
isp_usage: 0x0001 # necessary if not default
isp_index: 0 # necessary if not default
Is firmware R/W ment? if so, no.
beefcafebeefcafebeefcafebeefcafe
deadbeefdeadbeefdeadbeefdeadbeef
A dump from usbhid-dump, win-hid-dump or mac-hid-dump
# RK84 ISO Layout using win-hid-dump
258A:00F4: SINO WEALTH - RK Bluetooth Keyboard
PATH:\\?\hid#vid_258a&pid_00f4&mi_01&col03#9&1c1eb664&0&0002#{4d1e55b2-f16f-11cf-88cb-001111000030}
DESCRIPTOR:
06 00 FF 09 01 A1 01 85 05 15 00 25 01 35 00 45
01 65 00 55 00 75 01 95 28 B1 03 C1 00
(29 bytes)
258A:00F4: SINO WEALTH - RK Bluetooth Keyboard
PATH:\\?\hid#vid_258a&pid_00f4&mi_01&col05#9&1c1eb664&0&0004#{4d1e55b2-f16f-11cf-88cb-001111000030}
DESCRIPTOR:
06 00 FF 09 01 A1 01 85 0A 09 00 15 00 25 FF 35
00 45 00 65 00 55 00 75 08 95 40 B1 02 C1 00
(31 bytes)
258A:00F4: SINO WEALTH - RK Bluetooth Keyboard
PATH:\\?\hid#vid_258a&pid_00f4&mi_01&col04#9&1c1eb664&0&0003#{4d1e55b2-f16f-11cf-88cb-001111000030}\kbd
DESCRIPTOR:
05 01 09 06 A1 01 85 06 05 07 19 04 29 70 15 00
25 01 35 00 45 01 65 00 55 00 75 01 95 6D 81 02
95 0B 81 03 C1 00
(38 bytes)
258A:00F4: SINO WEALTH - RK Bluetooth Keyboard
PATH:\\?\hid#vid_258a&pid_00f4&mi_00#9&8ee9a26&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}\kbd
DESCRIPTOR:
05 01 09 06 A1 01 05 07 19 E0 29 E7 15 00 25 01
35 00 45 01 65 00 55 00 75 01 95 08 81 02 95 38
81 03 05 08 19 01 29 05 95 05 91 02 95 03 91 03
C1 00
(50 bytes)
258A:00F4: SINO WEALTH - RK Bluetooth Keyboard
PATH:\\?\hid#vid_258a&pid_00f4&mi_01&col02#9&1c1eb664&0&0001#{4d1e55b2-f16f-11cf-88cb-001111000030}
DESCRIPTOR:
05 0C 09 01 A1 01 85 02 15 00 25 01 35 00 45 01
65 00 55 00 75 01 95 10 81 03 C1 00
(28 bytes)
258A:00F4: SINO WEALTH - RK Bluetooth Keyboard
PATH:\\?\hid#vid_258a&pid_00f4&mi_01&col01#9&1c1eb664&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
DESCRIPTOR:
05 01 09 80 A1 01 85 01 19 81 29 83 15 00 25 01
35 00 45 01 65 00 55 00 75 01 95 03 81 02 95 05
81 03 C1 00
(36 bytes)
Once again, bootloader MD5 as reported by the program is 3e0ebd0c440af5236d7ff8872343f85d
Side note: MD5s for the rest of the FW is different between BT/USB mode.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.