After flashing on os x, no keypresses sent

I had been happily updating my keyboard using my programmer dvorak layout at https://gist.github.com/benshine/64ecb605bc822bd90ac686e66a02b3d4 , and then I just tried flashing @algernon’s rad layout https://github.com/algernon/Model01-sketch … That put the keyboard into a weird state (one half white, the other half no LEDs, no keypresses sent) so I tried to get back to either my layout or the default, using the Arduino UI. I can’t get it back to generating any keypresses at all.

The one thing that works right now, afaict, is the LED button – it changes the LED mode. That’s the only sign of life.

When I flash using Ardunio UI, I get this message:

Archiving built core (caching) in: /var/folders/2b/p4bk_ptx31n2578xq79ktnzc0000gn/T/arduino_cache_253323/core/core_keyboardio_avr_model01_51f02b7210b938436b779d1c032618e1.a
Sketch uses 18914 bytes (65%) of program storage space. Maximum is 28672 bytes.
Global variables use 1940 bytes (75%) of dynamic memory, leaving 620 bytes for local variables. Maximum is 2560 bytes.
Low memory available, stability problems may occur.

I tried rebooting my mac to make sure it wasn’t talking about low memory on the host OS; no joy.

I had to hard-reset it once already; I think I’m about ready to do that again.

Any suggestions here? I’ve already asked @algernon :slight_smile:
I’ll update this thread after I reset the board & confirm that it’s happy again.

1 Like

Here’s output from the upload:

Sketch uses 20888 bytes (72%) of program storage space. Maximum is 28672 bytes.
Global variables use 1988 bytes (77%) of dynamic memory, leaving 572 bytes for local variables. Maximum is 2560 bytes.
Low memory available, stability problems may occur.
Forcing reset using 1200bps open/close on port /dev/cu.usbmodemCkbio01
PORTS {/dev/cu.Bluetooth-Incoming-Port, /dev/cu.usbmodemCkbio01, /dev/tty.Bluetooth-Incoming-Port, /dev/tty.usbmodemCkbio01, } / {/dev/cu.Bluetooth-Incoming-Port, /dev/cu.usbmodemCkbio01, /dev/tty.Bluetooth-Incoming-Port, /dev/tty.usbmodemCkbio01, } => {}
PORTS {/dev/cu.Bluetooth-Incoming-Port, /dev/cu.usbmodemCkbio01, /dev/tty.Bluetooth-Incoming-Port, /dev/tty.usbmodemCkbio01, } / {/dev/cu.Bluetooth-Incoming-Port, /dev/tty.Bluetooth-Incoming-Port, } => {}
PORTS {/dev/cu.Bluetooth-Incoming-Port, /dev/tty.Bluetooth-Incoming-Port, } / {/dev/cu.Bluetooth-Incoming-Port, /dev/cu.usbmodemkbio01, /dev/tty.Bluetooth-Incoming-Port, /dev/tty.usbmodemkbio01, } => {/dev/cu.usbmodemkbio01, /dev/tty.usbmodemkbio01, }
Found upload port: /dev/cu.usbmodemkbio01
/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avrdude -C/Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf -v -patmega32u4 -cavr109 -P/dev/cu.usbmodemkbio01 -b57600 -D -Uflash:w:/var/folders/2b/p4bk_ptx31n2578xq79ktnzc0000gn/T/arduino_build_602119/Model01-programmer-dvorak.ino.hex:i 

avrdude: Version 6.3, compiled on Jan 17 2017 at 12:01:35
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf"
         User configuration file is "/Users/ben/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/cu.usbmodemkbio01
         Using Programmer              : avr109
         Overriding Baud Rate          : 57600
         AVR Part                      : ATmega32U4
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PA0
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     4    0 no       1024    4      0  9000  9000 0x00 0x00
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0x00 0x00
           lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : butterfly
         Description     : Atmel AppNote AVR109 Boot Loader

Connecting to programmer: .
Found programmer: Id = "CATERIN"; type = S
    Software Version = 1.0; No Hardware Version given.
Programmer supports auto addr increment.
Programmer supports buffered memory access with buffersize=128 bytes.

Programmer supports the following devices:
    Device code: 0x44

avrdude: devcode selected: 0x44
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e9587 (probably m32u4)
avrdude: reading input file "/var/folders/2b/p4bk_ptx31n2578xq79ktnzc0000gn/T/arduino_build_602119/Model01-programmer-dvorak.ino.hex"
avrdude: writing flash (20888 bytes):

Writing | ################################################## | 100% 2.74s

avrdude: 20888 bytes of flash written
avrdude: verifying flash memory against /var/folders/2b/p4bk_ptx31n2578xq79ktnzc0000gn/T/arduino_build_602119/Model01-programmer-dvorak.ino.hex:
avrdude: load data flash data from input file /var/folders/2b/p4bk_ptx31n2578xq79ktnzc0000gn/T/arduino_build_602119/Model01-programmer-dvorak.ino.hex:
avrdude: input file /var/folders/2b/p4bk_ptx31n2578xq79ktnzc0000gn/T/arduino_build_602119/Model01-programmer-dvorak.ino.hex contains 20888 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 1.31s

avrdude: verifying ...
avrdude: 20888 bytes of flash verified

avrdude done.  Thank you.

Well, dang. I took the left enclosure off, and I’m pressing the reset button, but I can’t get my keyboard to work again at all. I’ve tried several different orders of operation for hitting the reset button, hitting the upload button, and hitting the prog button – it all comes to naught though.

Procedure:

  1. in Arduino GUI, go to File => Examples => Keyboard IO => Model 01 Firmware
  2. With left enclosure removed, depress then release the little white button. The red light behind the prog button comes on.
  3. Hit the right-arrow in arduino UI that means 'upload’
    The red light for the prog key goes out; the blue light under the LED key goes on briefly, then goes off.
    about another 1min goes by, ending with the selected serial port does not exist or your board is not connected.

Complete output from upload:

Sketch uses 18972 bytes (66%) of program storage space. Maximum is 28672 bytes.
Global variables use 1941 bytes (75%) of dynamic memory, leaving 619 bytes for local variables. Maximum is 2560 bytes.
Low memory available, stability problems may occur.
Forcing reset using 1200bps open/close on port /dev/cu.usbmodemCkbio01
PORTS {/dev/cu.Bluetooth-Incoming-Port, /dev/cu.usbmodemCkbio01, /dev/tty.Bluetooth-Incoming-Port, /dev/tty.usbmodemCkbio01, } / {/dev/cu.Bluetooth-Incoming-Port, /dev/cu.usbmodemCkbio01, /dev/tty.Bluetooth-Incoming-Port, /dev/tty.usbmodemCkbio01, } => {}
PORTS {/dev/cu.Bluetooth-Incoming-Port, /dev/cu.usbmodemCkbio01, /dev/tty.Bluetooth-Incoming-Port, /dev/tty.usbmodemCkbio01, } / {/dev/cu.Bluetooth-Incoming-Port, /dev/tty.Bluetooth-Incoming-Port, } => {}
PORTS {/dev/cu.Bluetooth-Incoming-Port, /dev/tty.Bluetooth-Incoming-Port, } / {/dev/cu.Bluetooth-Incoming-Port, /dev/cu.usbmodemCkbio01, /dev/tty.Bluetooth-Incoming-Port, /dev/tty.usbmodemCkbio01, } => {/dev/cu.usbmodemCkbio01, /dev/tty.usbmodemCkbio01, }
Found upload port: /dev/cu.usbmodemCkbio01
/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avrdude -C/Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf -v -patmega32u4 -cavr109 -P/dev/cu.usbmodemCkbio01 -b57600 -D -Uflash:w:/var/folders/2b/p4bk_ptx31n2578xq79ktnzc0000gn/T/arduino_build_182967/Model01-Firmware.ino.hex:i 

avrdude: Version 6.3, compiled on Jan 17 2017 at 12:01:35
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf"
         User configuration file is "/Users/ben/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/cu.usbmodemCkbio01
         Using Programmer              : avr109
         Overriding Baud Rate          : 57600
         AVR Part                      : ATmega32U4
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PA0
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     4    0 no       1024    4      0  9000  9000 0x00 0x00
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0x00 0x00
           lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : butterfly
         Description     : Atmel AppNote AVR109 Boot Loader

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

avrdude done.  Thank you.

the selected serial port 
 does not exist or your board is not connected

and yet, i can’t send keypresses; the one thing that seems to work is changing LED mode.

How can I get back to factory state? I saw @jesse’s thread Flashing problem on Ubuntu (SOLVED) but that is both off the cuff and perhaps linux specific.

I’m using OS X 10.13.1.

Did you pull Arduino-Boards with git or are you using the Arduino ‘boards manager’?

1 Like

Ah, I forgot I had pulled a ton of different stuff along the way of trying to get @algernon’s layout to build! I removed all of that and now my keyboard is back to running my own layout well! Hooray!

Okay, so now I know I can get back to my good state. Thanks, @jesse! I’ll try @algernon’s setup again after I get my homework done for this week :wink:

2 Likes

I suspect that what really happened was that you got the benefit of me having merged fixes for some stuff that badly broke OSX. :wink:

But happy to hear that it’s behaving now.

3 Likes