RMK v0.7 is a major update that includes many changes. One notable change is that RMK switched the BLE stack to TrouBLE, a great BLE host implementation with async support and better compatibility.
Updating to TrouBLE brings lots of benefits, including:
esp-hal, making it possible to use USB on ESP32S3. Now you can build a dual-mode keyboard using ESP32S3, with all the features of RMK!The following is the step-by-step guide to update your project to v0.7.
The following guide is for local compilation. If you are using cloud compilation, you can skip the following steps and just rerun the github action.
rmkitMany dependencies are updated from v0.6 to v0.7.
The best updating approach is to copy the new Cargo.toml file from the examples to replace the old one, delete the old Cargo.lock file, adjust the RMK features used, and then rebuild the project using:
keyboard.toml to .cargo/config.tomlIn v0.7, RMK requires you to set the path of keyboard.toml in .cargo/config.toml. This makes the path of keyboard.toml configurable.
In versions before v0.7, keyboard.toml was located in the root directory of the project. So you will need to add the following to .cargo/config.toml after updating to v0.7:
For nRF chips, RMK now uses Nordic's latest SoftDevice Controller (SDC) in nrfxlib as the low-level BLE controller, bringing better performance and stability, but it's not compatible with the old SoftDevice stack.
For more details about the difference between SoftDevice Controller and the old SoftDevice, you can refer to this article.
The new Nordic SoftDevice Controller will be compiled into the firmware. Flashing the new firmware will clear the old pre-flashed SoftDevice stack, so if you want to roll back to v0.6 or switch to firmwares that use the SoftDevice stack (for example, ZMK), you will need to re-flash the bootloader.
The migration process is simple; you just need to:
Update the RMK version in Cargo.toml
Update your memory.x according to whether you are using the uf2 bootloader or not
Compile your firmware and flash it to your controller
Older versions of RMK use esp-idf-hal, which is now community-maintained. RMK v0.7 now uses Espressif's official esp-hal. Because the difference between esp-hal and esp-idf-hal is significant, the recommended way to migrate to v0.7 is to recreate your project from scratch and migrate your keymap and configuration to the new project.
RMK v0.7 brings many exciting features, making configuration easier and more flexible. Check out the CHANGELOG for more details.
BLE peripheral doesn't work
In the new version, RMK uses the nRF chip's unique address as the device address. If the BLE peripheral doesn't work after updating, it's likely that the old fixed device address is stored in the chip. You should clear the storage for both central and peripheral:
clear_storage to true for both peripheral & centralclear_storage back to false and compile