Pages: [1]   Go Down
Author Topic: New Mega2560 board " avrdude: stk500v2_ReceiveMessage(): timeout "  (Read 4705 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
« Last Edit: December 07, 2012, 10:33:54 am by xinfinite » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 ! ...


Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17263
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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)
Logged

New River, Arizona
Offline Offline
God Member
*****
Karma: 19
Posts: 931
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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 http://www.desert-home.com/2012/05/arduino-mega2560-wrapping-up-bootloader.html

This particular bootloader fixes watchdog timer also.
Logged

Trying to keep my house under control http://www.desert-home.com/

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Logged

Pages: [1]   Go Up
Jump to: