carlossless / sinowealth-kb-tool

A utility for reading and writing flash contents on Sinowealth 8051-based HID devices through the commonly found ISP bootloader
MIT License
60 stars 18 forks source link

[Question] Redragon Shaco Pro (k641 pro) #49

Closed Danial-Movahed closed 6 months ago

Danial-Movahed commented 6 months ago

Device Info

Part Info

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

Operations Tested

Platforms Tested

Checksums

HID Dump

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.

Danial-Movahed commented 6 months ago

I was able to my keyboard with these steps, maybe it'll help someone. After some searching I found this: K916.998.NEW.B10.00.zip From https://github.com/swiftgeek/hykker-re/issues/4

I built the code in k916 repository and flashed it manually with arduino and jtag with 4096 bytes steps and it got detected by linux and then I used this tool to flash smk on it and it worked.