Trying to upload a sketch to an Arduino UNO: 'programmer is not responding'

I am attempting to load a sketch into the Arduino UNO.

Hardware is: UNO SMD R3
VID: 0x2341
PID: 0x0001
Version: 0.01
Using with a Mac running MacOS X version 10.11.6
Installed Arduino IDE version 1.8.2

Steps:

  1. Open Arduino.app
  2. Plug in Arduino UNO with a USB cable. Nothing is connected to the board except for the USB cable - no shields, no wires, no jumpers.

When plugged in, the LED labeled "L" turns on and then off very briefly one time.
The "ON" LED lights up and continues being on.

  1. I notice that two new files appear in the /dev directory:
    cu.usbmodem14121
    tty.usbmodem14121

  2. In the Arduino IDE app, I open Preferences and check the boxes "Show verbose output during" for "compliation" and "upload" (these are now both on).

I open "File" -> "Examples" -> "01.Basics" -> "Blink"

  1. Under the "Tools" menu I look at the "Boards" submenu. The item "Arduino/Genuino Uno" is selected. There are only two boards listed that say "Uno" in the name. The other is "Arduino Uno Wifi". I think the Arduino/Genuino Uno is probably the right one because I do not have the "Arduino Uno Wifi" and no other boards say "Uno". So I leave this selected.

  2. Under "Tools" -> "Ports" I check the item that says "/dev/cu.usbmodem14121 (Arduino/Genuino Uno)".

  3. I press the "Verify" button in the toolbar. This succeeds.

  4. I press the "Upload" button in the toolbar. I get the following result:

(..some output omited to get message under forum's length limit..)

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/brmerrym/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/cu.usbmodem14121
         Using Programmer              : arduino
         Overriding Baud Rate          : 115200
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00

avrdude done.  Thank you.

Problem uploading to board.  See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.
  1. I checked the Troubleshooting guide mentioned in the error message. I have verified that I did not do anything obviously wrong. I don't think the Arduino Uno needs any special driver.

  2. I then try the same steps on a Windows PC running Windows 7. Windows reports finding drivers for the device. I see a COM port for the device. I get the same issue trying to upload the blink sketch.

  3. I then try the same steps on 64 bit Ubuntu running the Arduino IDE as root. Device appears properly in /dev. I get the same problem uploading blink sketch.

  4. I google for an answer. Suggestions I found and tried repeatedly were:
    • pressing the reset button right before upload.
    • pressing the reset button immediately after pressing upload.
    • pressing the reset button 1 second after pressing upload.
    • pressing the reset button 5 seconds after pressing upload.
    • pressing the reset button 10 seconds after pressing upload.

  5. One of the troubleshooting suggestions I found involved doing a "loopback test". I tied the TX and RX lines together and Reset and Ground together, powered on the Arduino UNO, and opened a terminal program and connected to the 'modem14121' serial device. I could send data and receive it back without an error.

  6. I also tried using the command "Upload with Programmer". This yielded the same error. I looked at the "Programmers" menu. The default is "AVRISP mkll". I tried "AVRISP" and "USBtinyISP" in conjunction with "Upload with Programmer". No joy as this yielded the same error.

  7. I eventually stumbled onto this page: https://www.arduino.cc/en/Hacking/DFUProgramming8U2.
    I was able to follow the instructions here and use the dfu-programmer program to perform the 'erase', 'flash', and 'reset' commands. I used the following file to flash the unit with dfu-programmer 'UNO-dfu_and_usbserial_combined.hex' which I downloaded from here: https://github.com/arduino/Arduino/tree/master/hardware/arduino/avr/firmwares/atmegaxxu2

Then I ran the reset command, then unplugged and replugged the UNO and tried again. This did not change the behavior.

  1. It then occurred to me that perhaps I used the wrong hex file in the previous step. I get the following warning:
$ sudo dfu-programmer atmega16u2 flash Arduino-COMBINED-dfu-usbserial-atmega16u2-Uno-Rev3.hex
Bootloader and code overlap.
Use --suppress-bootloader-mem to ignore

So I decide to try a different file.

  1. I try 'Arduino-usbserial-atmega16u2-Uno-Rev3.hex' located in the 'arduino-usbserial' directory. I try the following:
$ sudo dfu-programmer atmega16u2 flash Arduino-usbserial-atmega16u2-Uno-Rev3.hex
Checking memory from 0x0 to 0xFFF...  Empty.
0%                            100%  Programming 0x1000 bytes...
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>]  Success
0%                            100%  Reading 0x3000 bytes...
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>]  Success
Validating...  Success
0x1000 bytes written into 0x3000 bytes memory (33.33%).

Then I ran:

$ sudo dfu-programmer atmega16u2 reset

which produced no output (so it worked?)
and unplugged and re-plugged the board.

I tried uploading the blink sketch again. Same error.

At this point, I'm out of ideas. I don't have another Arduino board to try solutions I've seen that involved using an Arduino UNO to program a non-working UNO. (If I had a working unit, I'd just use that.)

Any help is appreciated.