QBoard » Supporting Tech Stack » IOT » Arduino Sketch upload issue - avrdude: stk500_recv(): programmer

Arduino Sketch upload issue - avrdude: stk500_recv(): programmer

  • I have an Arduino Duemilanove with an Atmega 328. I am working on Ubuntu 12.04, and the Arduino IDE's version is 1.0. Recently, I tried to upload a few of the sample sketches onto it, such as the Blink one. However, none of my attempts are working and they result in the same error every time I try it - avrdude: stk500_recv(): programmer is not responding.

    enter image description here

    I have enabled '/dev/ttyUSB0' under Tools -> Serial Port. I have also selected the correct board (Duemilanove with Atmega 328) from the list. Yet, I am not able to resolve the issue. I have searched online as well and none of the other responses for this problem seem to be working for me. Could someone tell me why I am encountering this issue and help me resolve it?

    Update: I tried turning the onboard Atmega and fitting it in the other direction. Now, I encounter no problems uploading, but nothing happens afterwards. The onboard LED also does not seem to be blinking.

      June 13, 2019 11:57 AM IST
    0
    • Raji Reddy A
      Raji Reddy A Try to see if your board was selected correctly. Click on menu Tools --> Board and check if the correct board is select.
      June 14, 2019
  • I had this problem with a Crowduino, running the Arduino IDE on OSX. The solution for me was to switch on verbose output during upload (in the arduino IDE preferences pane).

    Then, when uploading, you can see avrdude sending three packets avrdude: Send: 0 [30] [20](with corresponding RX flashes on the board) right before the avrdude: ser_recv(): programmer is not responding error.

    The trick is to hit the reset button on the board immediately before these three packets are sent. Then the program will be uploaded successfully.

      June 13, 2019 11:59 AM IST
    0
    • Rakesh Racharla
      Rakesh Racharla Other people noticed that if you reset after X seconds, then it works. I figured the packets were some attempt at a hand-shake. So basically, I solved it using Google, patience and futzing around with the board!
      June 14, 2019
  • I know this is an old post, but there is some voodoo-talk in the answers around here amongst good ideas, let's try to be a bit more real about what's happening and sum up the good stuff to check:

    Basically, when that happens, it is a good idea to enable verbose mode for avrdude, to get a better idea of what's happening. To do so, you only need to go in the preferences and check the verbose mode box. It's also a good idea to move away from the arduino IDE, and launch a console to be more comfortable on reading avrdude's output, that you'll get on clicking on the upload button.

    What's important here to put 3 or 4 -v to the command call. Here's how looks like such avrdude commands, with made up parameters as they are totally dependent on how the Arduino has been installed:

    avrdude -v -v -v -v -C /path/to/avrdude.conf -patmega328 -P/dev/usbport -U flash:w:/path/to/firmware.hex

    A good way to get the correct command line to use is to copy it from the verbose output of the Arduino IDE output log when verbosity has been enabled.

    When you get avrdude: stk500_recv(): programmer is not responding, it basically means that something wrong is happening, before the flashing actually begins. Basically you have to check (from hardware to software, low level to high level):

    if the cable and/or connectors does not have microcuts ;
    if no solder points are short circuiting (i.e. touching something metallic around), that means:if there is no short circuit on the PCB between Rx and Tx (usually pins 1 and 0) ;
    if there is no contact with a metallic element below the board, or tiny bits between a component's legs (like the FTDI, the atmega chip or any other) ;
    if the atmega chip is not out of power (GND/VCC shortcut or cut or VCC input being dead…) ;
    if the 1 and 0 pins of the Arduino are not being used by some shield or custom design (/!\does not apply to the leonardo as it has independent USB handling) ;
    if the USB to UART converter does not have a problem (FTDI on older duemilanove or Atmega16U2 on newer Unos) ;
    if the Atmega328 chip is fried or wrongly installed ;
    if the bootloader has been overwritten or is failing ;
    if the right baudrate is applied for entering the bootloader ;
    if the right settings are set for the target MCU and Board ;
    usually the avrdude -v -v -v -v can help a lot find at which stage it is failing. Whether it can't make a USB connection at all (cable failing, USB/UART, PCB…), or it is a bootloader problem.
      June 14, 2019 12:42 PM IST
    0