-
-
Notifications
You must be signed in to change notification settings - Fork 40.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider adding Keychron K* keyboards #7370
Comments
@mdreizin someone will need to do some reverse engineering and figure out the vendor and bootloader. |
@yanfali Do you know what questions should I ask Keychron (about vendor/hardware/etc)? I will try to send them directly (or their user group) and they would happy to answer/provide bootloader and other stuff. |
@yanfali I am looking forward to getting your reply 😀 |
Communication protocol in Chinese for keychron keyboards, released on the fb group. |
@yanfali, according to flashing tool in firmware upgrade package, it is using Cortex M0 Sonix SN32F260. On the other side, chips inside (at last in white-LED version) are HFD48KP500 and CYW20730. Flashing tool and firmware files can be found at https://drive.google.com/file/d/1F49mMZpGny9VWB-MmuwtZYJL-Soxhzc4/view?usp=sharing . |
So the issue will be this isn't supported by any of the HAL layers we use. Currently ChiBIOS and ATSAM for ARM platforms. Therefore this is going to be a lot of work to add support for. You're going to have to find someone with the hardware willing to do the work of porting and supporting this chip. That's about all the assistance I can offer at this time. |
Not knowing anything about ARM programming and the like, would you say it would probably take less effort to desolder the current ARM chip and put in a compatible one vs the reverse engineering of the current one? |
Actually, some of the CannonKeys boards (among others) run Cortex M0 chips currently, so I'm fairly sure ChibiOS could run this (supporting the chip being the barrier to entry, rather than the architecture). |
When it comes to ChibiOS, its less about the M0 part and more if there is a hardware port for it. A quick search for sonix support doesn't show much hope, and I would guess ending up something like qmk/ChibiOS-Contrib/pull/10. |
Not sure if this is off topic, but I’ve been looking into porting ChibiOS to the SN32F248B and it is possible that some of the work will carry over. I’m able to upload firmware and get into recovery mode. I would like to enable SWD on the current firmware to allow me to step through the code. Here is my progress so far. |
Did you ever get the st-link (clone?) working with it? I see there are configs for rpi and stlink, but I guess only the rpi one ended up working since that's what all the pictures show? |
@xyzz I did, i need to update the readme. I couldn't get the windows st-link to connect, but it did get it working with openocd. |
Would appreciate it, I have a keyboard with a similar chip and I couldn't get it working with blackmagic, haven't tried openocd though. |
Give OpenOCD a shot with the st-link config in my repo. Should work with Sonix and SMT32 MCUs |
Thanks, I got it working with both blackmagic and openocd now. Are you able to read memory/flash from gdb? |
I can read memory past 0xFFF0000 but nothing below that while in debug recovery mode. I have the firmware and I’m trying to find the bits to enable SWD so I can read everything else. |
I think this is a weird code protection function they use. Check the value of CS at 0x1FFF2000, it's probably going to be 0x5A5A (it was for me). Also, are you on discord? Can you add me, xyz#9668, so that we can iterate on it faster without having to spam the issue tracker. |
New Keychron K4 RGB user here. Is there any assistance that I could provide to this issue? I am semi competent with hardware hacking and willing to take an Attify badge to the onboard flash and assist in analysis to the best of my abilities. |
Hello @ByteWoofer, thank you for wanting to offer your assistance. With the help of @xyzz we were able to get chibios running with limited USB. I’m working on flushing out GPIO right now. You probably want to identify your chip and start setting up board and config files for your keyboard. Here are the repos we are currently working out of. QMK - https://github.com/smp4488/qmk-ChibiOS/tree/dk63?files=1 ChibiOS - https://github.com/smp4488/qmk_firmware/tree/chibios-upgrade?files=1 |
Hi Guys, another K2 user here. I stumbled on this issue and I remember that in facebook one of the core team members of keychron was actually asking what was needed to get the keyboard working with QMK. Maybe we can ask him to see if he can provide more information about the chips and the instruction set🤔 |
Hello. Redragon K585 DITI user here. it has a VS11K16A on board. |
For someone googling this. More info: https://www.reddit.com/r/olkb/comments/eqfa68/womier_k66_qmk_porting_possible_vs11k16avs12l03a/ |
Womier K66 is in fact one of the keyboards being working on in this branch at https://github.com/smp4488/qmk_firmware/tree/chibios-upgrade/keyboards/womier/k66 |
Just finally got a moment away from work to open up the keyboard. The chips inside are as follows: |
@ByteWoofer so I started looking for the HFD2201KBA and came across this interesting tweet https://twitter.com/pmg/status/1119008876240596992?lang=en. Your chip looks to be a rebranded STM32 chip. Mine is rebranded Sonix chip. I would start trying to identify some pins on your MCU and compare to some STM32 variant data sheets to find a match. You also appear to have a JTAG port on the bottom of the #2 picture. https://blog.senr.io/blog/jtag-explained |
How are you currently talking to the Womier K66? Did you find a way to use the USB Bootloader mentioned in the spec sheet. |
For flashing we're using the built-in bootloader which isn't ideal but works well enough. Getting into the bootloader is possible by shorting the boot pin to ground or sending a special hid command to the stock firmware. |
Here is some extra info if this helps the issue. Also just found out they are building a qmk keyboard. Might that firmware trickle down to the older models? |
Yes, most (all?) of the white-LED Keychron keyboards use a different chip and a PCB which doesn't have pads for the boot pin like the RGB models. |
Hi all, Just curious
|
Is it possible to improve scan rate of Keychron keyboard with custom firmware? Currently it's 125Hz, while cheap membrane keyboards have 1000Hz. |
Is the rgb version 1 |
Must be connected to ground. right? |
worked like a charm. thanks. |
Is there a difference between the k4 v1's firmware and k4 v2's? Or can I just flash the QMK that was mentioned before |
I have the v1 and worked withourvproblem. I think it should work |
We have merged support for both K4v1 and v2 RGB here. The differences are minor, you can crossflash and only lose status indicators(caps and num lock led) |
I have a K6, can I remap keys? |
Looks like a K2 Pro with qmk support is coming: https://twitter.com/keychronmk/status/1473213814896476165?s=21 |
The Pro series is probably stm32. However, we might be able to use some of that implementation for BT support. As a status update on this topic, SonixQMK now has support for most K* RGB boards ( excluding the K1 and K10, someone would have to give us a hand there with their wiring) and recently added a bunch of White boards, as well as the C* lineup. Optical switches support is in and working, as is VIA. Bluetooth support is next on the todo list |
@dexter93 Sounds good but I'm not sure how to interpret that. I have a K3 RGB rev 1 (two of them actually). Decent electronics and soldering knowledge I could try to improve, if it's not a huge time sink. If there is any way I can help then please let me know. |
Feel free to join up the SonixQMK discord for further discussion on the project status. |
I feel like this should be reopened as while there may be QMK versions of the ANSI layout K* series keyboards, there is still no QMK support on the ISO layouts. It seemed that by the end of 2021 some folks were getting pretty close to a usable implementation, and then this entire thread got dropped, seemingly because of a new keyboard release? |
I was considering to get the K3 Pro ISO, this issue is a bummer, I can't go with the default layout and I don't like software solutions, tbh. |
@martin-braun Keychron maintain support for the K3 Pro including the ISO variant in their own fork of QMK |
@casuanoob Thanks I'm good, I went with the K7 eventually and managed to configure it properly in VIA, because Keychron provides a layout file to import for it. I really appreciate you for trying to help me. :) |
Hey do you achieve it? |
It could be usual confusion between the K series and the K Pro series (two different things). Was the K series actually reverse engineered and QMK support added? That seems unlikely. |
Locking due to blurring of lines with old Sonix-based and current STM32-based boards, especially given that they're mainly implemented on the Keychron fork. |
I am a user of Keychron K2 keyboard I only know that it uses
ARM M0 MCU
. I am not an expert and it would be nice to know if it is possible to create QMK-based firmware for this keyboard or not?The text was updated successfully, but these errors were encountered: