Arduino Mega "timeout communicating with programmer"

Hello everyone,

I have an Arduino Mega 2560 R3 which has suddenly stopped working. I have an Arduino UNO which is working perfectly and I used for successfully burn the bootloader in the Mega, and then I can also successfully upload a sketch (like Blink) using the programmer into Mega. I think my Mega isn't totally lost because I still can upload a sketch, but not through USB. I had also tried to reinstall firmware but I can't enter in DFU mode. I use Windows 10 and I used to use this arduino normally in this same pc.

Does anyone can help me?

Thanks!

I have an Arduino UNO which is working perfectly and I used for successfully burn the bootloader in the Mega, and then I can also successfully upload a sketch (like Blink) using the programmer into Mega.

Do I understand correctly? 1. Upload the bootloader with UNO as ISP. 2. Upload blink sketch with UNO as ISP. If yes, then you should just repeat the step #1 because of the #2 (there is chip erase included) removes the bootloader.

I repeated step #1 and successfully upload the bootloader to the Mega. But I still cant upload any sketch through USB port. When I turn the Mega, the led in port 13 doesn't not light automatically just when I press the reset button on the board. This happens with bootloader just uploaded to mega. Any idea what it can be?

Thank you.

Please do this:

  • File > Preferences > Show verbose output during: > compilation (uncheck) > upload (check) > OK
  • Sketch > Upload
  • After the upload fails you’ll see a button on the right side of the orange bar “Copy error messages”. Click that button.
  • Paste the error messages in a reply here USING CODE TAGS (</> button on the toolbar).

When my Mega starts, the bult in led is off, but when I press the reset button it changes into on and keep always on. When I try to upload any sketch gets the error below:

Arduino: 1.8.4 (Windows 10), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

Archiving built core (caching) in: C:\Users\leona\AppData\Local\Temp\arduino_cache_118166\core\core_arduino_avr_mega_cpu_atmega2560_0c812875ac70eb4a9b385d8fb077f54c.a
Sketch uses 1462 bytes (0%) of program storage space. Maximum is 253952 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 8183 bytes for local variables. Maximum is 8192 bytes.
C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega2560 -cwiring -PCOM3 -b115200 -D -Uflash:w:C:\Users\leona\AppData\Local\Temp\arduino_build_14584/Blink.ino.hex:i 

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

         System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"

         Using Port                    : COM3
         Using Programmer              : wiring
         Overriding Baud Rate          : 115200
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer

avrdude done.  Thank you.

An error occurred while uploading the sketch

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

Which bootloader? Standard behaviour is that L is flickering (3x) at reset. Connecting or reconnecting also resets the board. Behaviour you described points to broken bootloader. And also, try the loop-back test if the ATmega16U2 (USB/serial converter) works as expected since you did something with the FW but first, focus to the bootloader.

I'm having the same problem, just dug out a clone keyestudio mega out for a project, the lights wont even blink when I turn it on or hit the reset button. Would you like the error message?

You should like to send the error message. :) ...and the topic, didn't help?

avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: ser_send(): write error: sorry no info avail
avrdude: stk500_send(): failed to send command to serial port
avrdude: ser_recv(): read error: The handle is invalid.

I couldnt even see the port, its greyed out. Btw its been years sense I've used arduinos, so I forgot most of it.

The message "avrdude: stk500_send(): failed to send command to serial port" and greyed out port probably mean that the OS doesn't recognize whether the board is connected. It can be HW problem with the board - USB circuit, USB cable, USB port on your PC, but also some kind of SW problem like missing driver, rights to the device... So test individual HW parts, try another cable, another USB port, another board if you have and another PC. The SW tests or investigation depend on OS type.

I think its with the board, when I turn it on it wont even blink the lights. Maybe I never burned the bootloader, I thought it came burned.

Is it brand new? Genuine or clone? Does it work with external power (powered via barrel jack)?
Brand new boards should be bootloaded. However, the problem you described has nothing with the bootloader. It is related to USB/serial on-board transceiver if it is a problem with the board