My experience trying out the CH552 on Windows (e.g. with the CH552-48 keyboard) was that the bootloader doesn't work well with Windows' USB driver, which the open source WCH ISP flashing tools use. (Device manager shows the device fails to connect).
The official WCHISPTool worked on Windows.
For users with only a Windows computer who want to use open source software, it's going to be much easier to flash fak firmware from Linux. Setting up a Linux installation alongside Windows is not trivial. An easier option is to run Linux from a bootable USB drive, and use this to flash fak firmware.
To follow the steps in this guide, you need:
- Two USB thumb drives.
- One for booting the ISO.
- One for storing your
fak/
firmware keymap.
-
First, download an ISO for the Live USB.
e.g. the
keyboard-labs-offline.iso
here comes with the dependencies already installed, as well as with VSCode with Nickel syntax highlighting already set up: https://github.com/rgoulter/keyboard-labs/releases/tag/iso-linux-environment -
Create a bootable USB from the ISO.
I used Ventoy. Ventoy installs itself as a bootable USB to a thumbdrive, and then whatever ISOs you want can be copied to it, and you can then boot to those ISOs.
-
On another thumbdrive, clone or otherwise copy
fak
.e.g. firmware for the CH552-48 can be found in rgoulter's fork of fak. e.g. click "<> Code", then "Download ZIP", and unzip this into the thumbdrive.
We're using a different thumbdrive from the one for booting the ISO so that we can save the changes we make between boots.
-
Boot into the bootable USB.
With the USB plugged in, open the boot menu, and select the bootable USB from earlier. (On my computer, I hit F2 and/or Del). -
Using the ISO downloaded from the above link, you should eventually see the Gnome desktop:
-
Open VSCode, and then open the
fak/
directory in the other thumbdrive.In order to get syntax highlighting for the
.ncl
files, VS Code requires you to "trust" the workspace. -
Edit the fak keyboard/keymap. Open
keymap.ncl
andkeyboard.ncl
in thencl/
directory. -
Compile and Flash the firmware from the terminal.
e.g. in VS Code, select "Terminal" -> "New Terminal".
Then run:
python fak.py compile
and if that succeeds, run:
python fak.py flash
and put the CH552 keyboard in bootloader mode:
-
on keyboards with Fak firmware, by tapping the
tap.custom.fak.BOOT
key. -
on the CH552-44: by holding down the P36 button when connecting the keyboard.
-
on the CH552-48: by holding shorting the
FLASH
pads when connecting the keyboard.
-