prifak de2095943f Create test workflow
Maybe it will be release workflow
2025-06-16 14:13:35 +02:00
2025-06-16 14:13:35 +02:00
2025-06-10 14:19:36 +02:00
2025-06-10 09:57:29 +02:00
2025-06-11 15:26:02 +02:00
2025-06-10 17:10:29 +02:00

annepro2_flasher_c

This is cli utility for flash annepro2 keyboard, rewriten from existing one (from Rust to clear C)


Dependencies

To build this project externally, you only need hidapi — specifically the hidapi-hidraw variant (header files and linkable library).

Note:

  • In most cases, hidapi-hidraw is used by default.
  • If you specifically need hidapi-libusb, package names may differ.
  • On Debian 11+ and Ubuntu 20.04+, libhidapi-dev defaults to hidraw.

Installing hidapi development package

Distribution Install Command
Debian/Ubuntu sudo apt install libhidapi-dev
Fedora sudo dnf install hidapi-devel
CentOS/RHEL sudo yum install hidapi-devel
Arch Linux/Manjaro sudo pacman -S hidapi
Gentoo sudo emerge dev-libs/hidapi
Void Linux sudo xbps-install -S libhidapi-devel
Nix/NixOS nix-shell -p hidapi (or add hidapi to buildInputs)
Alpine Linux sudo apk add hidapi-dev
Slackware via SlackBuilds or sbopkg: sbopkg -i hidapi
Example `shell.nix` for Nix/NixOS
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
  buildInputs = [ pkgs.hidapi ];
}

Build instructions

  1. Install dependencies
  2. Do this in your terminal
git clone https://github.com/prifak/annepro2-tools-c.git
cd annepro2-tools-c
make
sudo make install

Usage

To flash firmware:

annepro2_flasher_c ./my_firmware.bin

To flash light processor:

annepro2_flasher_c -t led ./my_led_firmware.bin

To flash bluetooth firmware:

annepro2_flasher_c -t ble ./my_ble_firmware.bin

If you want auto reboot keyboard after flash just add --boot parameter:

annepro2_flasher_c --boot ./my_firmware.bin

If run without arguments, the tool displays a help message with all available options.

The tool will wait up to 10 seconds for the keyboard to enter IAP mode. To do this: unplug the keyboard, hold ESC, then plug it back in.

P.S.

I am not responsible for broken keyboards. Use this program at your own risk.

Description
Flasher for annepro2 keyboard rewritten from Rust to C
Readme GPL-3.0 52 KiB
Languages
C 92.7%
Makefile 7.3%