Model 100 firmware update to fix corruption issues

TLDR: There’s a bug in all Model 100 firmware versions prior to 0.90.1 which can - and will - lead to corrupted keymaps and colormaps when adjusting them with Chrysalis. Please upgrade to at least Chrysalis 0.11.5, and the new firmware. Details below.


The Bug

I have just released version 0.90.1 of the firmware, fixing a bug in all past firmwares for the Keyboardio Model 100. The bug in question is triggered almost every time data larger than 64 bytes is sent to the keyboard over its virtual serial port - something that happens when Chrysalis saves anything. It also happens during Chrysalis’ flashing process, because that involves restoring EEPROM from a backup made at the start of the process. Symptoms of the bug are most visible on the keymap, because it tends to result in corrupted keymaps being stored on the keyboard, usually not on the first layer, but on layers 1 or 2.

Since this bug renders Chrysalis practically useless, upgrading the firmware is very strongly recommended. Upgrading will not undo the corruption, unfortunately. I’d strongly recommend resetting to factory defaults, to make sure that the data saved on the keyboard is as one would expect.

Upgrade Instructions

To make sure the keyboard is in a known good state, the best way to approach the upgrade is to do not only a firmware update, but a factory reset too. At the moment - until Chrysalis is updated to allow doing this in one step - this is a two step process.

Flashing the new firmware

Unfortunately, the firmware version the Model 100 ships with has some stability issues when trying to use it with Chrysalis, so we’ll have to take a few extra steps to ensure the firmware is updated.

  1. First, unplug your Model 100. We’re going to put it into programmable mode first.
  2. Press and hold the Prog key while plugging the keyboard in. Once the keyboard is plugged in, the Prog key should be lit up red, and you can release it.
  3. Start up Chrysalis, and connect to the Model100:
  4. This will take you to a screen that says the firmware needs to be updated. Click the “Update firmware” button there:
  5. Arriving at the “Firmware Update” screen, press the “Update” button:

    Do not enable the factory reset switch here, it does not work (yet) when the keyboard is in programmable mode at the start.
  6. When the confirmation dialog pops up, just press “Continue”. You do not need to hold the Prog key, despite what the instructions say, because the keyboard is already in programmable mode.
  7. Once the flashing process completes, reconnect to your keyboard again, and visit the “Preferences” screen, and select “My Keyboard” there:
  8. Click the “Reset EEPROM to Factory Defaults” button, and confirm that you really do want to do that:

Once the EEPROM reset is complete (it should take about 10 seconds), your keyboard will be reset to factory defaults, running the latest firmware.

If you want to upgrade the firmware again in the future, you do not need to follow these steps anymore. You do not need to put your keyboard into programmable mode up front, you can just connect with Chrysalis, go to “Firmware updates”, and do the normal update procedure, without doing a factory reset. These steps are only required once, to go from the unfortunately buggy factory firmware to a fixed one.

10 Likes

Thank you for fixing this so quickly.

Last night while trying my new keyboard for the first time, I encountered this corruption bug. It was not a good first impression, to say the least.

I get stuck on “Reading data from device…” when trying to open Chrysalis. Are there instructions for getting around this?

I did some clicking and poking around and eventually it went through and I think everything is OK now.

I would suggest editing the instructions to more strongly recommend, up front, selecting “Factory reset” on the firmware update screen unless there are (unikely) somehow customizations the user has managed to apply that they want to keep.

1 Like

I updated the instructions, it now shows how to put the keyboard into programmable mode, then do a flash, and a separate EEPROM reset (because doing an eeprom reset during flash while the keyboard is in bootloader mode doesn’t work yet).

1 Like

It doesn’t work for me. My Model 100s arrived today and first I wanted to update their fw and sully them with my layout.
When I connect it to USB while pressing the prog key, in Chrysalis’ (0.11.5) “Select a keyboard” combobox it shows “Keyboardio Model 100\nUnknown” (“Unknown”, where it otherwise would say sth. like “/dev/ttyACM0”).
I select it, connect, click on “UPDATE FIRMWARE” then “UPDATE”, click “CONTINUE” at the confirmation dialogue, and immediately get “Error flashing the firmware”.

When I normally connect it physically and connect from Chrysalis, the latter pulls and displays the KB’s layout. Going to fw-update from there, going through the steps (this time holding the prog key) the same happens after saving the EEPROM. This happens for both Model 100s.

I tried on Devuan as well as on Artix. The same Chrysalis AppImage did manage to fw update my Model 01.

So I thought, I first should push the latest Kaleidoscope release via means of the Arduino IDE, but that fails stating:
“Invalid library found in /home//.arduino15/packages/keyboardio/hardware/gd32/1.99.6/libraries/Kaleidoscope-LEDControl: no headers files (.h) found in /home//.arduino15/packages/keyboardio/hardware/gd32/1.99.6/libraries/Kaleidoscope-LEDControl”.
In that directory there indeed is only a file “README.md”.

I don’t know what to try next. Any informed ideas?

Lets stick to Chrysalis for now.

Since you’re on Linux, can you try installing the udev rules at Chrysalis/60-kaleidoscope.rules at master · keyboardio/Chrysalis · GitHub ?

Just copy the contents of those to /etc/udev/rules.d/, and reload the rules with sudo udevadm control --reload-rules.

My suspicion is that you may have permissions to write to /dev/ttyACM*, but no permission to write to the DFU device when the keyboard is in bootloader mode.

3 Likes

Wow, you’re quick to answer.
I already had that rule file, a version from March '21, missing the model100 lines. Fixing that fixed the issue.
Thank you very much!

1 Like

This howto worked for me!

Sadly, this doesn’t work for me.

  1. I hold down ‘prog’.
  2. I insert the USB cable. The ‘prog’ key lights up red.
  3. I start up chrysalis (0.11.6-snapshot.141) . It has the 0.90.1 warning that directs me here.
  4. I connect to my Model 100 (on ‘unknown’ interface). It gives me the ‘Chrysalis…neds to update its firmware’ dialog.
  5. I follow through to the ‘Update your keyboard’s firmware’ page, leave the ‘Latest version’ (0.90.2) selected, no factory reset. I hit ‘Update’. I am not holding down any keys, and I do not press any keys on the Model100.

I just get a very fast ‘Error flashing the firmware’ in the bottom left corner. :frowning:

I have checked & reloaded the udev rules as suggested, to no avail.

Can you try it again, and create a debug bundle and share it? To create a debug bundle, go to “Report a Problem”, you can create and save the bundle from there. Additionally, if you could open the developer console (Control + Shift + I), see if there are any errors there (in red text), and if there are, take a screenshot of that too?

Well, in principle, yes: in practice, not so much.
The time delay was me going to bed. I’m sorry, I only tend to get time to look at nice things like this last thing at night.

Anyway, I got up, had a look, went through the process again to create the debug bundle and… it worked.

I can’t provide a good explanation why, I am 100% sure I followed the same procedure. I can only wave my hands and mutter about the keyboard being “a bit tired”, or something.

Anyway, all’s well that ends well; and I now have a shiny new Model100 with the keymap from one of my Model01s imported. I’m very happy .
:smiley:

Thanks as always for the product, the quick response, and for chrysalis.

Lord, I love these new keyswitches.

1 Like

I had the same problem and the proposed fix worked for me