Post

i haven't posted about this here so here it goes. Last month i bought a used keyboard, thinking i could use one when sitting at my desk paired to my laptop. It was a keychron k3 v2 and cost me around 30 eur, it has a low-profile which is nice for travel, backlight and bluetooth. ....

I don't know what possessed me, but after testing it and playing around with the settings for a bit i decided to try updating its firmware. Keychron warns against doing this, but i went ahead and tried anyway. At the time i didn't know, but my mistake was picking the mechanical sw. download. ...

Their warning is quite clear, but the software doesn't even attempt to warn you or check the model it's uploading firmware to. This obviously ended up bricking it. So after realizing what was going on, i tried entering "bootloader mode". ...

On some models this can be achieved by holding escape while plugging it in, or pressing keys for a certain amount of time. On others the method is via test pads, and they're easily accessible beneath the spacebar. Unfortunately i was cursed with a model that has none of these options, ...

I had to disassemble my keyboard, without too much effort i was in. And i could clearly see the header pads i needed to short, for some god-forsaken reason this only worked once and never again. Everything went downhill from here, the keyboard wouldn't respond to anything ...

So as a last-ditch effort i tried looking into the microcontroller, to see if i could attach a debugger and program it directly. I left the job to an LLM to disassemble the stock firmware, and in the meanwhile looked at various custom firmware projects supporting this keyboard. ...

i found github.com/SonixQMK, which confirmed my idea of this chip being a chinese stm clone. And later confirmed when the LLM came up with a model nr: SN32F268 by Sonix. Unfortunately, no matter what i tried, i couldn't get debugging to work. So i moved onto a more insane solution (see pic) ...

At this time i still didn't know i was dealing with optical switches, so any attempt at writing firmware failed. At some point i had a hunch, and looked up images of the switches which finally revealed what i was dealing with. And just to be sure, i checked the board using my modified DSLR ...

The video clearly shows it has infrared lights, which confirmed my theory! Here i moved on to figuring out how to implement this in RMK (the custom firmware i decided to use for this board). My first tests were using a pi pico board, but this lacked IO/bluetooth, so i bought an NRF devboard ...

0 reposts3 likes

To wrap up the posts, i took the first image when doing the last firmware test runs. The second image is the keyboard finally back in its case and with the keycaps swapped. Everything works just fine as of today, i had a lot to figure out but i would have to write a blog post to include everything