Stuck at "uploading" when flashing new firmware from Fedora Linux

Hi I was trying to change the layout, after following the instructions I tried to flash. it got stuck and keyboard wouldn’t turn on at all, ive lost the very first error message now. After reading on the forum I managed to get it into bootloader state by pressing the prog key and plugging in. that didn’t help because Arduino ide couldn’t find the serial port.
so I opened it up and while pressing the reset button ide finally finds the port, and hangs forever at the following message. one more thing the red light shifts from prog key number 1 before freeze.

  Arduino: 1.8.5 (Linux), Board: "Keyboardio Model 01"
    Sketch uses 18152 bytes (63%) of program storage space. Maximum is 28672 bytes.
    Global variables use 1659 bytes (64%) of dynamic memory, leaving 901 bytes for local variables. Maximum is 2560 bytes.
    An error occurred while uploading the sketch
    PORTS {/dev/ttyS0, } / {/dev/ttyS0, } => {}
    PORTS {/dev/ttyS0, } / {/dev/ttyS0, } => {}
    PORTS {/dev/ttyS0, } / {/dev/ttyS0, } => {}
    PORTS {/dev/ttyS0, } / {/dev/ttyS0, } => {}

PORTS {/dev/ttyS0, } / {/dev/ttyS0, } => {}
PORTS {/dev/ttyS0, } / {/dev/ttyACM0, /dev/ttyS0, } => {/dev/ttyACM0, }
Found upload port: /dev/ttyACM0
/home/cmrd/bin/arduino-1.8.5/hardware/tools/avr/bin/avrdude -C/home/cmrd/bin/arduino-1.8.5/hardware/tools/avr/etc/avrdude.conf -v -patmega32u4 -cavr109 -P/dev/ttyACM0 -b57600 -D -Uflash:w:/tmp/arduino_build_536901/Model01-Firmware.ino.hex:i 

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

         System wide configuration file is "/home/cmrd/bin/arduino-1.8.5/hardware/tools/avr/etc/avrdude.conf"
         User configuration file is "/home/cmrd/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/ttyACM0
         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 |

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

That looks to me like there’s an error in the code that’s making it crash…can you post the code you’re trying load on it?

its all fresh from the repo

My first guess is that this is related to ModemManager attacking the serial port.

Did the instructions you followed talk about udev rules?

Device or resource busy has some more details on what might be up.

Nah. The failure happens while the computer is talking to the bootloader on the keyboard. It’s most likely something else grabbing the serial port.

The log posted by @mygnu shows Found programmer: Id = "CATERIN"; type = S

That means that the serial port communications start out ok and that the keyboard gets into the bootloader ok, but it never gets done uploading.

2 Likes

Thanks

sudo systemctl stop ModemManager.service

fixed the issue, I’m on Fedora 26 if anyone else is stuck.

1 Like

Oops, my bad. I was thrown off by the red light moving then stopping, as that’s what happened to me :stuck_out_tongue:

2 Likes