New Mega2560 board " avrdude: stk500v2_ReceiveMessage(): timeout "

I have my MEGA2560 board for two weeks and suddenly I cannot upload a new sketch!
Search all over internet and this forum to solve my issue but without any success!

This is repeating over and over while trying to upload:

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_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer

PLEASE WAKEUP ARDUINO-ENGINEERS AND GIVE US A WORKING SOLUTION A.S.A.P.

And yes, loopback is working ( using tools on OS X 10.8.2 )

After a while it is telling me:

avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_command(): failed miserably to execute command 0x1d
avrdude: stk500v2_cmd(): failed to send command
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
~
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
avrdude: stk500v2_command(): failed miserably to execute command 0x1d
avrdude: stk500v2_cmd(): failed to send command
avrdude: Yikes! Invalid device signature.
Double check connections and try again, or use -F to override
this check.

avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout

the last couple of weeks, i struggled with this problem as well, now i found a solution, maybe it can help you

After programming in my Adruino Mega 2560 (r3) + Ethernetshield (r3) (osx) i couldn't upload anything to my board and received this error:
avrdude: stk500v2_ReceiveMessage(): timeout

Loopbacktest: works

Removing the ethernetshield and all wires didnt change a thing.

Removing and reinserting the usb cable, after which i CAN upload the 'blink example' !
'Succes' so i tought!

When trying to upload my sketch : avrdude: stk500v2_ReceiveMessage(): timeout
Once this happens, nothing (i.e.'blink') is able to be uploaded again (until I remove and reinsert the usb cable)

In my sketch there is a line : client.println("FORWARD!!!");
if i remove one exclamation mark, the problem is solved ! ...

Woutr:
the last couple of weeks, i struggled with this problem as well, now i found a solution, maybe it can help you

After programming in my Adruino Mega 2560 (r3) + Ethernetshield (r3) (osx) i couldn't upload anything to my board and received this error:
avrdude: stk500v2_ReceiveMessage(): timeout

Loopbacktest: works

Removing the ethernetshield and all wires didnt change a thing.

Removing and reinserting the usb cable, after which i CAN upload the 'blink example' !
'Succes' so i tought!

When trying to upload my sketch : avrdude: stk500v2_ReceiveMessage(): timeout
Once this happens, nothing (i.e.'blink') is able to be uploaded again (until I remove and reinsert the usb cable)

In my sketch there is a line : client.println("FORWARD!!!");
if i remove one exclamation mark, the problem is solved ! ...

That specific problem is the result of the mega2560/1280 bootloader having a useless 'monitor' function where if it sees three consective ! characters in the upload data stream it stops programming the chip an just waits for the user to enter monitor commands which will never happen in an arduino setup. Just changing that statement to:

client.println("FORWARD!"); would also solve that specific problem. There is newer modified bootloader code for the mega boards that fix the root cause but they are not part of the arduino IDE and don't ship with anyone selling mega boards.

Lefty

I had the same issue and found the solution here, thanks!!
damned exclamation marks

I didn't reinstall all the software, though I had to follow these steps to make the fix actually work (on OS X):

  • quit the arduino IDE
  • delete the arduino IDE preferences file (i.e. ~/Library/Arduino/preferences.txt)
  • restart the IDE

upload possible again!!! (oops)

Keep this in mind for the future. It doesn't have to be three exclamation points in a text string. I had it happen with data I had typed into an array in hex. Took me forever to find the problem and I knew about the !!! problem. If you decide to bite the bullet and replace the bootloader, I have a page on this on my blog at Desert Home: Arduino Mega2560 - Wrapping up the Bootloader Problem

This particular bootloader fixes watchdog timer also.

I use the Mega 2560 board and got the same error message. But i haven't used any exclamation marks. :confused: Is there any other such thing that i should look out for?

Problem solved! It was the exclamation mark issue.

I have found that when I'm using the 1.0 IDE (the newer IDE won't run on my 10 year old Mac), that simply unplugging the USB between program uploads solves most upload timeout problems.
Good Luck!

Daveconvent: Where would I find the file ~/Library/Arduino/preferences.txt? It doesn't show up in FIND.

I was getting this error on both my Mega2560 board and UNO (both chinese knock offs) Then I remembered I had cleaned up the junk that windows remembers each time you plug something in. So I re-installed the Chinese driver CH340SER (or something like it), still no joy. Then I thought well its doing it with both boards (one configured with 3 microphones and another with a BMP180 barometer/temp sensor so the problem is probably with my machine(s) win xp and win 8.1. I got to feeling like it must be something with Java (which on my xp machine keeps nagging me to upgrade to version 8 which won't work with XP! (very annoying). I poked around and looked for ways to use the Arduino w/out Java and found the AVR site.

http://www.ladyada.net/learn/avr/setup-win.html

if you grab some older versions (say June 07), avrdude may complain about not being able to find libusb0.dll, do a search on your computer for the file, then copy it to C:/Windows/System32 and try again! This is a known bug, hopefully to be fixed soon...

I then searched my puter for the libusb0.dll and found them all over the place but not in C:/Windows/System32. I moved a copy to that folder and bing back in business.

aurdino board is not working why

Try to use different programmers. I had the same problem when I was using avrisp2 (AVR ISP MKII) which kept giving me timeout error. After I switched to avrisp (AVR ISP), the file was able to be uploaded instantly.