Installing QMK firmware on the AnnePro 2

I’ve had an Anne Pro 2 for the last few years and in the last couple months been wanting to make a change to a split keyboard. Turns out these are pretty expensive and hard to get where I live, so for now I have settled in trying to make the most of my Anne Pro.

Customizing and flashing the Anne Pro using QMK was not so straightforward for me, so this post aims to gather and document what I learned and hopefully help someone who wants to do the same.

A quick disclaimer, I did all that I am about to describe on an Arch Linux and I only use the Anne Pro 2 wired, so if you are on windows or need the bluetooth to work, there maybe more that needs to be done than what I will document here.

QMK Firmware

The Anne Pro 2 has its own customization and configuration software (ObinsKit), but in a quick search I found out that it lacks some features that I wanted to try out, like home row mods.

While I was searching for split keyboards, QMK always showed up as the firmware that powered these keyboards and that it could be heavily customized, so I wondered if I could use QMK with the Anne Pro 2, despise it not having official support, and a search led me to Open Anne Pro.

Open Anne Pro

As the name suggests Open Anne Pro is an open-source alternative that allows us to use the QMK firmware with the Anne Pro 2, we will be using the AnnePro2 Tools to flash our keyboard with the QMK firmware and our custom layout. I heavily advise that you read the how to install and customization sections of the Open Anne Pro page before continuing.

Doing it!

So here are the steps that we will need to do:

  1. Build AnnePro2 Tools
  2. Setup QMK environment
  3. Creating your keymap
  4. Compile the keymap
  5. Flash the keyboard

If you are not going to use a custom keymap for now, you can jump step 3 by just choosing a default keymap, these preserve the original layout and functions of the Anne Pro 2 and are a great starting point.

Building AnnePro2 Tools

This project is written in Rust so building it is as simple as running cargo build --release. But here I encountered the first problem, I was not able to build the project after cloning it, the build failed with the following error:

Build result

There seems to be some missing methods on “dev”, that comes from a package named hidapi, after seeing a commit that recently changed the hidapi and other packages versions I tried using some older version of hidapi and it worked!

I don’t really know if there were breaking changes in this package or if it is something with my setup, but if you are having problems with this step try to fix the hidapi package to version “1.2.3” in Cargo.toml file.

Cargo.toml with fixed version

The resulting executable should be in “./target/release/annepro2_tools”.

Setting up QMK environment

This step is perfectly explained at QMK docs just follow the steps presented there and it should work.

Creating your keymap

This step will vary according to your goals the main resource that helped me here was the QMK docs, mainly:

There is a list on Open Anne Pro docs with special keycodes that are specific to the Anne Pro 2.

The only thing I did different was using the keymaps from the QMK repo instead of using the Open Anne Pro fork as described in their tutorial, I was not able to make it work with their fork, but I may have messed something up as I’m very new to QMK.

My current keymap is on my fork of QMK if you want to take a look, the main modification is the addition of a layer with home row mods. If you are interested in learning more about home row mods this guide has pratically everything you need to get started.

Compiling your keymap

If you created your own keymap or is planning to use a default one, either way you will have to compile it. This process is very simple, just go to the QMK repo directory and run the following command:

1
make annepro2/c18:default

There is some details to cover here, first the c18 part, this indicates the hardware revision of the Anne Pro 2, to discover what revision you have is as simple as flipping your keyboard over, if you have “obinslab” engraved in the circle it is a C15, if you have “Anne Pro” engraved it is a C18, you can find more details here.

The default part indicates what keymap you will be compiling, so in case you want the “default-full-caps” keymap, the command would be:

1
make annepro2/c18:default-full-caps

If you encounter some error in this step odds are something went wrong when setting up the QMK environment.

Flashing the keyboard

Before flashing the keyboard we have to put the keyboard in DFU/IAP mode, you can do that unplugging the keyboard and holding the ESC key while you plug it back in and holding it for a few seconds.

Keep in mind that the keyboard will not be usable in DFU/IAP mode, so you will need a spare or a virtual keyboard so that you can input the necessary commands.

We will use AnnePro2 Tools to flash the keyboard, so we need to pass the .bin file that our compiling step created and pass it as a parameter to AnnePro2 Tools executable, so the command should look something like this

1
annepro2_tools annepro2_c18_default.bin

If you run the command and see the following error:

Unable to open device

Try running the command with sudo or as root, I lost a lot of time on this problem and just running it with sudo made it work. It can get tricky doing this without a spare keyboard, what I did was typing the command with sudo, typing my user password and only then putting the keyboard in DFU/IAP mode, and then only hitting enter in the virtual keyboard.

After running it you should see the bytes being written in your terminal, this is indicates that the flashing process is working, wait until you see the “Flash complete” message and we are all done!

Well, almost done, at this moment my keyboard had no light or RGB functionalities, if this does not bother you, you can stop here, but I wanted the RGB to work on mine so there is as extra step.

Anne Pro 2 Shine

So that our QMK-powered Anne Pro 2 can have RGB capabilities, we need to flash it with the custom LED firmware Anne Pro 2 Shine. This process is pretty much the same as the previous step so you can safely follow this part of the guide of the Open Anne Pro website.

The only thing I ended up doing differently from the guide was how to put the keyboard in DFU/IAP mode, the LSHIFT + RSHIFT + B combination did not work for me, so I just used the previous method of holding ESC while plugging the cable in.

Now I believe we are done! Enjoy your new and shiny QMK-powered Anne Pro 2! :)

@vncsb

Trying to blog about various tech things.


Installing QMK on an unsupported keyboard with open source tools

2023-08-23