I have a problem which is, as I thought, related to Catalina, but now I am really not sure.
I have bought Model01 and flashed it one time via Chrysalis - everything went well and I forgot about it. Afterwards I was trying to flash it again, but it was after Catalina was released. It did not work, I’ve found a corresponding bug on Github and decided to wait. Now we have a new version of Chrysalis, the bug in Catalina is fixed, issue on Github is closed - but I still cannot flash my keyboard.
I try to flash the keyboard by pressing the “update” in Chrysalis or by pressing “Enter” in the console (arduino+sources from git). Even though I hold the PROG button, nothing happens. It never lights up red. After some seconds keyboard looses the connection and goes dead until I pull out the usb-cord and connect it again.
What I’ve tried:
- Connecting directly over usb-c to usb-c cable.
- Holding PROG button while connecting the keyboard - no effect.
- Testing the PROG button itself - button is apparently just fine.
What makes me suspicious is that in Chrysalis the PROG button is just blank. While I have no comparison to other Model01 to tell whether it is normal, I just assume that my PROG button got somehow reassigned. But I have no idea how I could solve it now…
P.S.: found a thread, I think it is the same problem: Can no longer flash: "programmer is not responding"
P.P.S.: I’ve also tried the solution in proposed in other threades:
- Download firmware as .hex
- Press ‘reset’ button
- Flash firmware with avrdude -patmega32u4 -cavr109 -D -P /dev/tty.usbmodemCkbio01E1 -b57600 -Uflash:w:atmega32u4_firmware.hex:i
This is what I get:
Connecting to programmer: .
avrdude: butterfly_recv(): programmer is not responding
Found programmer: Id = "
"; type =
. Software Version =
; Hardware Version = ..
avrdude: error: buffered memory access not supported. Maybe it isn't
a butterfly/AVR109 but a AVR910 device?
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
avrdude: error: programmer did not respond to command: leave prog mode
avrdude done. Thank you.
Nothing seems to work.
The way the Prog button works, Chrysalis woulldn’t show it. It’s a bootloader feature.
This command is, I believe, something that will list out what USB devices are attached.
ioreg -p IOUSB -l -w 0
Can you send the output of that command with the keyboard plugged in, both before and immediately after pressing the physical reset button on the left-side PCB?
Also, please make sure you’re running a current version of Catalina. Multiple releases broke flashing keyboards like ours before they finally got it right.
thank you for your time!
here is the output before I press the reset button:
before_reset.txt (74.7 KB)
And immediately after(as soon as keyboard is responsible again, ~1 sec.)
after_reset.txt (74.7 KB)
I am also running macOS 10.15.3. While I in general do not trust it’s USB stack too much, the bug preventing flashing of arduino was closed with 10.15.2 I believe, at least in Chrysalis bugtracker.
This looks a lot like a keyboard that has the wrong bootloader on it, which wouldn’t have happened with a keyboard that came from the factory. Are you set up to flash AVRs over the ICSP connector?
The left board on my keyboard did not came from the factory. Factory board was damaged so LEDs would not work. You have sent me another board afterwards. Even so, I am pretty sure that I’ve managed to flash it once with Chrysalis without any issues somewhere it High Sierra times.
Not yet, but Amazon here is pretty fast, I could get it within one day. It that the part I need?
Oh! I suspect I flashed the wrong bootloader onto your board. I’m so sorry about that. The solution is going to involve an AVR programmer. If you’re comfortable with such things, I can walk you through it. Otherwise, it’s probably sending the board back to us for re-flashing.
Sending the board seems to be too much trouble. I would buy an AVR programmer then - may need for another keyboard projects anyway. Can you confirm the one I shared is sufficient? (I suppose they are all +/- the same). I also assume, judged by pins on the Model01, that I need a 6-pin cable for flashing?
That one should indeed work!
I’ve ordered it, it should arrive on Thursday. Then I only need the some guide for flashing and a good portion of luck
My AVR programmer did arrive today - what would be the next step?
The easiest way to flash a new bootloader is likely to use the Arduino IDE’s “Burn bootloader” feature in their tools menu.
- Connect the programmer to your keyboard’s ATmega ICSP header.
- If it’s not already running, launch the the Arduino IDE
- Go into settings and enable verbose logging, just in case.
- Select “Keyboardio Model 01” from the “Boards” menu in the “tools” menu.
- Select your ICSP type from the “Programmer” menu in the “tools” menu. It’s probably a USBtiny or an AVRisp
- Select “Burn Bootloader” from the Tools menu.
- This should flash the bootloader onto your keyboard. After a minute or two, the Prog LED should start glowing red and you should be good to go.
If that doesn’t work, gimme a shout
after some trials it worked. The only problem was to choose the right programmer: it was ATMEL STK 500. Afterwards it worked like a charm and I was able to flash it with the new bootloader. Also, some details for people who may find this thread:
- the voltage on the programmer was set to 5V
- Keyboard does not need to be connected via usb port - I do not know whether it may be an issue.
Sorry for the slow reply. It’s been a busy week here.
You don’t need it plugged into USB.
You do want the ATMega port.
I don’t believe the programmer you want to choose is an stk500. In the Tools menu, I think you want to choose Programmer -> AVR ISP
I think my programmer was quite… exotic. I’ve tried both AVR ISP variants, but what worked for me was stk500. I assume it depends on the microcontroller the programmer is using. Not sure whether it has other impacts on the “target” - from my limited understanding it should not.