castleberrysam / byk870-fw

Reverse engineering the firmware for BYK800/BYK801/BYK870 based mechanical keyboards
2 stars 1 forks source link

Is there a way to restore the keyboard? #2

Closed FeeeeK closed 3 years ago

FeeeeK commented 3 years ago

After launching the wrong executable, I got an endless message waiting and code version 3011. I have a motospeed ck104 on a byk870 chip, is there a way to restore it?

FeeeeK commented 3 years ago

IMG_20210416_041156_761

FeeeeK commented 3 years ago

@castleberrysam, do you know how to fix it?

castleberrysam commented 3 years ago

Yes, I emailed someone in the past who had the same problem, he was able to fix this by opening the case and shorting two of the microcontroller pins together.

castleberrysam commented 3 years ago

how to reset Pins

castleberrysam commented 3 years ago

You should be able to identify the orientation of the chip by the round mark as shown in the second image.

FeeeeK commented 3 years ago

yes, I already tried this, but it didn't help in my case

castleberrysam commented 3 years ago

From the emails:

At first, I tested the first firmware, this is where the BYK800 is written. The keyboard was flashed but became inoperative. Then I decided to flash the second firmware that should have been suitable. It was the firmware BYK870 RGB. After that, the keyboard came to life and began to work correctly. It became interesting to me, I decided to flash the third firmware, after that the keyboard again became inoperative, and the native firmware did not help. When I started the native flash driver, I received the code 3011 and the repeated keyboard reconnections in Windows 10. If you close the flash driver, the keyboard lights up red but is incomplete and does not work, the keys are confused, some of them do not work at all.

I also started looking for datasheets on the original chip and I found it. I will attach it with a PDF file to the letter. This file describes the process of resetting the chip by closing certain contacts. Well, I started trying. I launched the desired flasher of those three, connected the disassembled keyboard to the PC, closed the necessary contacts and the keyboard was identified as an input device in the system. The firmware passed and the keyboard worked.

Can you try to do it again in exactly the way that he describes?

FeeeeK commented 3 years ago

No, it didn't help, but I found two reasons for this

  1. second pin is not GND
  2. изображение_2021-04-17_011638 image

FeeeeK commented 3 years ago

But to be honest, I don't know what these codes are

castleberrysam commented 3 years ago

The second pin is not GND? You mean it does not measure as 0V? If this is the same chip, that's not possible...

castleberrysam commented 3 years ago

The original guy also had a motospeed ck104 keyboard, so it seems really likely that you have the same chip.

FeeeeK commented 3 years ago

I mean, pin 11 needs to be closed not with 12

castleberrysam commented 3 years ago

For the codes, I'm also not sure. It's probably some parameters configurable by the JTAG programmer, which I have done some research on in the past, but we don't have access to it. In any case, I don't believe this pin is used as GPIO or Timer4 output in the code so hopefully it's already configured in the correct mode for RST operation.

castleberrysam commented 3 years ago

You should be connecting pins 11 and 12 together (but maybe that's what you mean).

FeeeeK commented 3 years ago

And the pdf that he sent is in the repository? I just couldn't find anything about pin closure there.

castleberrysam commented 3 years ago

Yeah it's the same pdf. This is what refers to the pin closure: "The device will be reset by a low voltage on this pin longer than 10us."

FeeeeK commented 3 years ago

There is no way to do it using the program?

castleberrysam commented 3 years ago

The program is what has stopped working correctly in this case, so the hardware reset acts as a backup. I'm unable to give you any other advice since I don't have access to the device to look at it.

castleberrysam commented 3 years ago

I believe that you have the same issue as the other guy, though, so it should somehow be possible for you to recover the device as he did.