Based on rgoulter/ch592-ble-hid-keyboard-example and Suniasuta makefile template
The firmware can be compiled with the xpack riscv compiler: https://github.com/xpack-dev-tools/riscv-none-elf-gcc-xpack
The .bin
can be flashed to the CH592 using chprog. (Enter the CH592 bootloader by holding down BOOT when connecting it using USB).\
The SDK for CH592 from the openwch EVT is vendored under sdk/
. (Encoding has been changed from gbk to utf-8).
make
to compile \
make clean
to clean/remove the compiled stuff \
make flash
to flash \
I assume here you are already familiar with the FindMy scripts from biemster/FindMy
. If you're not, please refer to that repository for further info.
.keys
file with FindMy/generate_keys.py
prep_fw.py
script like this (adv-interval is optional, the broadcasting interval in seconds [allowed values are 2,3,5,10,20,30]):
./prep_fw.py --keyfile=<path to .keys file> --adv-interval=5
FindMy_XXXXXXX.bin
file using chprog FindMy_XXXXXXX
This is explained in more detail in the FindMy
repository, but boils down to running the request_reports.py
script in the same
directory as the .keys
file generated here.