Issues uploading firmware to Model 100

I had some issues with updating the firmware, similar to those described at Model 100 Error Updating Firmware and Model 100 current default firmware might be buggy.

What worked was to hold the PROG key while plugging in the keyboard - the normal flash sequence would not work.

I wanted to play with a full set of SpaceCadet keys, so I set out to try some custom firmware. I started out with just the simplest example, and it uploaded fine (after doing the PROG while plugging-in, of course). However, I now couldn’t connect to the keyboard with Chrysalis. Expected, because the example doesn’t include that. I went back to the Model 100 firmware file from Devices/Keyboardio/Model100/Model100.ino — Kaleidoscope documentation and tried to upload that. The build completed OK, but the upload (again, PROG while plugging in) fails after trying to reboot the keyboard (possibly because of the hacky PROG while plugging in approach?) I’m not sure, because uploading other, simpler firmware images worked fine at this point.

The output is this:

Download done.
DFU state(7) = dfuMANIFEST, status(0) = No error condition is present
DFU state(2) = dfuIDLE, status(0) = No error condition is present
Done!
Resetting USB to switch back to Run-Time mode
Failed uploading: uploading error: exit status 251

The host computer is MacOS on M1.

The 251 exit code is expected in this case, and can safely be ignored (that’s what Chrysalis does). Unfortunately, I forgot why dfu-util exits with 251, and why is it okay to ignore it, and my quick searches turn up nothing useful.

Unfortunately, something more is going wrong. After the code 251 exit, I unplug and replug the keyboard. It is unresponsive. None of the keys work. I can restore it using Chrysalis, but I expected/hoped that this example .ino file from the docs would be identical to the stock firmware, and would be a starting point for customizing things.

I’ve been trying the stable url for the Arduino IDE. I’ll switch to the main one to see if it might work better.

EDIT: yes, using the “master” branch link behaves better.

I’m also trying to get the full set of SpaceCadet keys working. I cloned the Kaleidoscope project and I’m working from the command line on my Mac. I can compile without issue but I have issues flashing the keyboard. I can get it into DFU mode by holding down the Prog key while plugging it in but the information doesn’t seem to fully transfer. My custom settings to remap keys install but the SpaceCadet functionality does not. I get the following output on the command line.

DFU state(7) = dfuMANIFEST, status(0) = No error condition is present
DFU state(2) = dfuIDLE, status(0) = No error condition is present
Done!
Resetting USB to switch back to Run-Time mode
Error during Upload: Failed uploading: uploading error: exit status 251
make: *** [flash] Error 1

Did you use the master URL for the keyboard support in the arduino IDE? https://raw.githubusercontent.com/keyboardio/arduino-kaleidoscope-master/main/package_kaleidoscope_master_index.json

If I used the other URL, https://raw.githubusercontent.com/keyboardio/boardsmanager/master/package_keyboardio_index.json, then my builds would not work.

I also had to restart the IDE before it prompted me to download updated stuff.

I’m using the make commands from the command line. I wasn’t using the arduino IDE.

I think there are known problems with SpaceCadet functionality in the Model 100 default sketch, possibly related to plugin ordering. I think they’re under investigation.

1 Like

FWIW 0.90.2 of the firmware should have SpaceCadet working. We will be looking into fixing the arduino IDE & commandline issues soon, too.

I just ran into the problem OP reported, trying to flash from the command line over a 0.90.2 firmware (updated this morning). Trying to port over my Spacecadet-using model01 config.

Here is the config in case it could help diagnosing the issue.

Since make flash still doesn’t work, is there a way to upload a fw created by make compile through Chrysalis?

Edit: got it. I made make compile always print the build path then used the .bin file from that folder with Chrysalis’ custom firmware upload.

What was surprising at first is that the space cadet customizations went through almost fine but the keymap changes seemingly didn’t. I dug a bit here and there and realized EEPROM was messing with me and the keymap in there took priority over the hardcoded one so I ended up disabling EEPROM settings altogether.

Now it works just like my Model 01 :tada:

1 Like

Hi all, I also am having troubles with flashing my model 100. For the moment I’ve just tried flashing the
default firmware, either via Arduino (in Windows 10 and Linux Mint) or the command line (only in Linux Mint), and none of it worked.

Via Arduino I get the error

dfu-util: Warning: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release
dfu-util: No DFU capable USB device available
Failed uploading: uploading error: exit status 74

And this both under Windows and Linux. I tried to press the ‘prog’ key while plugging the keyboard in, but then Arduino does not detect it.

Via command line it works better, but in the end I get the same error mentioned in this thread:

Download done.
DFU state(7) = dfuMANIFEST, status(0) = No error condition is present
DFU state(2) = dfuIDLE, status(0) = No error condition is present
Done!
Resetting USB to switch back to Run-Time mode
Error during Upload: Failed uploading: uploading error: exit status 251
make: *** [/home/bastien/keyboard/Kaleidoscope/etc/makefiles/sketch.mk:206: flash] Error 1

I will try the solution proposed by ngetal, to upload the .bin via Chrysalis, but I would also like to understand what happens… Can anyone help?

Update the arduino package builder to default to dfu-util 0.11-arduino3, · keyboardio/Kaleidoscope@8da824a · GitHub fixed the 251 issue for me :tada: