Can no longer flash: "programmer is not responding"

Hey there – I was just flashing my PVT keyboard for the second time, and it failed like so:

Connecting to programmer: .avrdude: butterfly_recv(): programmer is not responding

avrdude: butterfly_recv(): programmer is not responding
avrdude: butterfly_recv(): programmer is not responding
avrdude: butterfly_recv(): programmer is not responding
avrdude: butterfly_recv(): programmer is not responding
avrdude: butterfly_recv(): programmer is not responding
Found programmer: Id = "��"; type = �
    Software Version = .; Hardware Version = �.
avrdude: butterfly_recv(): programmer is not responding
avrdude: butterfly_recv(): programmer is not responding
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
         this check.

avrdude: butterfly_recv(): programmer is not responding
avrdude: error: programmer did not respond to command: leave prog mode
avrdude: butterfly_recv(): programmer is not responding
avrdude: error: programmer did not respond to command: exit bootloader

Of note:

  • I’ve tried reflashing it with the stock, current firmware from two different machines (both of them OSX laptops) from both CLI and the GUI.
  • I’ve tried two different USB-C cables.
  • I’ve tried plugging the keyboard in while holding down the PROG key, allegedly to force it to listen a little more closely?
  • shortly after I run make flash and hold the PROG key down, I see the “LED” key do its “I just started up” blue breathing cycle (which is the default behavior, I believe)

At this point I’m out of ideas other than perhaps opening the enclosure and getting as close to a factory reset as possible? I can’t seem to get it to flash at all.

Adam

2 Likes

PVT units had a much shorter bootloader timeout.

There are a few things that might be going on. The first thing to check is whether the keyboard is actually getting into the bootloader.

When you plug the keyboard in while holding down PROG,

  1. does the PROG key light up red?
  2. what USB PID/VID does the keyboard report? On linux, this is lsusb
    I don’t have a Mac handy to test, but https://stackoverflow.com/questions/17058134/is-there-an-equivalent-of-lsusb-for-os-x may offer reasonable alternatives for lsusb.

If you’re not able to get into the bootloader, then popping the enclosure and using the hardware reset button is a great next debugging step.

If -that- doesn’t work, then something is really messed up. If you have an AVR programmer (or a spare Arduino) handy, you could possible replace the bootloader at home, but it might just be time to swap out your electronics. (At that point, this should move to help@keyboard.io)

1 Like

The PROG key does not light up red when I plug in holding it down. Breathing-blue LED key, but nothing else.

Keyboard shows up as as usb device like so:

+-o Model 01@14200000  <class AppleUSBDevice, id 0x100000f7f, registered, matched, active, busy 0 (89 ms), retain 19>
    {
      "sessionID" = 46509209532895
      "iManufacturer" = 1
      "bNumConfigurations" = 1
      "idProduct" = 8961
      "bcdDevice" = 256
      "Bus Power Available" = 250
      "USB Address" = 16
      "bMaxPacketSize0" = 64
      "iProduct" = 2
      "iSerialNumber" = 3
      "bDeviceClass" = 239
      "Built-In" = No
      "locationID" = 337641472
      "bDeviceSubClass" = 2
      "bcdUSB" = 512
      "USB Product Name" = "Model 01"
      "PortNum" = 2
      "non-removable" = "no"
      "IOCFPlugInTypes" = {"9dc7b780-9ec0-11d4-a54f-000a27052861"="IOUSBFamily.kext/Contents/PlugIns/IOUSBLib.bundle"}
      "bDeviceProtocol" = 1
      "IOUserClientClass" = "IOUSBDeviceUserClientV2"
      "IOPowerManagement" = {"DevicePowerState"=0,"CurrentPowerState"=3,"CapabilityFlags"=65536,"MaxPowerState"=4,"DriverPowerState"=3}
      "kUSBCurrentConfiguration" = 1
      "Device Speed" = 1
      "USB Vendor Name" = "Keyboardio"
      "idVendor" = 4617
      "IOGeneralInterest" = "IOCommand is not serializable"
      "USB Serial Number" = "CDkbio01"
      "IOClassNameOverride" = "IOUSBDevice"
    }

and in /dev as

crw-rw-rw-   1 root      wheel           20,  18 May 24 10:47 tty.usbmodemCDkbio01
crw-rw-rw-   1 root      wheel           20,  19 May 24 10:47 cu.usbmodemCDkbio01

I’ll pop the enclosure and hit the reset button over lunch, and report back. I do not, sadly, have a spare Arduino around. (Raspberry Pis we have in plenty.)

With the keyboard booted up normally, if you tap Prog + LED + Left Fn, the whole keyboard should enter test mode and light up red. If you wait a few seconds and tap the Left Fn, it should cycle through green, blue, white, rainbow and back to red.

Once it’s done that, tapping any key will turn green when pressed and blue when released. If you press “Prog” down slowly, does it flicker between blue and green?

If you can’t enter test mode at all, that points the finger at your Prog key. The problem might be something blocking the electrical contacts or poor soldering on the switch itself.

Nope, the PROG key seems nice and binary when pressed. No flickers.

Interestingly, pre-reset-switch, behavior during test mode was different: keys on the right half of the keyboard would turn blue when pressed, but then when I started pressing keys on the left half of the keyboard, keys on the right would start turning red again. Can’t replicate now.

I am getting a similar issue. I have tried from Arduino 1.8.10 using the 1.23 and 1.96 boards and from Chrysalis-0.6.2+126

I successfully flashed my newer board using Chrysalis on the same PC without issue. The Keyboardio causing the issue is the one that was sent to me as a refurbished warranty replacement for the switches issue I has last year.

I tired the LED test mode suggested above and it seemed to work correctly (prog switch lit correctly)

Where do I go from here @jesse

Arduino: 1.8.10 (Linux), Board: “Keyboardio Model 01”

Sketch uses 25010 bytes (87%) of program storage space. Maximum is 28672 bytes.
Global variables use 1338 bytes (52%) of dynamic memory, leaving 1222 bytes for local variables. Maximum is 2560 bytes.

avrdude: butterfly_recv(): programmer is not responding
avrdude: butterfly_recv(): programmer is not responding
avrdude: butterfly_recv(): programmer is not responding
avrdude: butterfly_recv(): programmer is not responding
avrdude: butterfly_recv(): programmer is not responding
Found programmer: Id = “”; type =
Software Version = .; Hardware Version = �.�
avrdude: butterfly_recv(): programmer is not responding
avrdude: butterfly_recv(): programmer is not responding
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
this check.

avrdude: butterfly_recv(): programmer is not responding
avrdude: error: programmer did not respond to command: leave prog mode
avrdude: butterfly_recv(): programmer is not responding
avrdude: error: programmer did not respond to command: exit bootloader
avrdude: error: programmer did not respond to command: exit bootloader

That sure looks like the keyboard isn’t entering the bootloader. If you hold the prog key in while you connect the keyboard to the computer, does it glow red?

No. The LED light goes blue, but there is no light on the Prog button if I press it down whilst plugging it in.

What next?

At this point, I’d recommend removing the enclosure from your left side to see if hitting the hardware reset button gets you that red LED on the Prog key.

Hi.

Got it working. Here is what I did (for future generations of my heirloom).

Mostly got the info from this post Arch Linux: Arduino: Flashing firmware: Unresponsive keyboard (SOLVED) - #16 by mikekuehn

  1. Load latest firmware into Arduino IDE and use Sketch > Export compiled binary to get the latest firmware (1.96 in my case).
  2. Open a terminal and go to the folder with the compiled hex code in it (exports to the same folder as the source is in)
  3. sudo apt install avrdude
  4. Write this command into the terminal, but don’t press return yet (changing the filename.hex to your firmware file and making sure /dev/ttyACM0 is correct:

avrdude -patmega32u4 -cavr109 -D -P /dev/ttyACM0 -b57600 -Uflash:w:filename.hex:i

  1. Tap the reset button on the inside of the keyboard…
  2. …hit return on in the terminal

I didn’t use the Prog key, just the 10 second window that the hardware reset button gives you.

After that I can load up Chrysalis without issue.

1 Like