Go Down

Topic: Mega2560: timeout communicating with programmer.... (Read 18236 times) previous topic - next topic

Dangerzone812

Hi everyone,

I hope I'm posting this on the right board. I actually searched the forum here and various other forums online and found several people have had this problem, but I couldn't find one definite solution.

The project I'm working on right now has several actuators and motors that I've been interfacing one at at time and testing with my Mega2560, and it had been working perfectly fine.

The program uses the Mega as a "slave" to the computer waiting for serial communication to send a "keystroke" to the board and from there actuate motors in various predefined cases. It had been working until yesterday when I tried to flash it again and an error message came up saying that there was a timeout communicating with the programmer.

I googled it, and saw that one of the fixes that popped up was to:

"Edit your boards.txt file and change
From:
mega2560.upload.protocol=stk500v2

To:
mega2560.upload.protocol=wiring"

As found here: <http://arduino.cc/forum/index.php?topic=115010.0>

I went to change it, it was already changed in my .txt file. I kept looking around, but I couldn't find anything that seemed applicable to what I was experiencing.

Can anyone help?

I'm running an Arduino Mega2560 on Windows 7 through the Arduino 1.0.2 IDE. 

The outputs were:


         Using Port                    : \\.\COM10
         Using Programmer              : wiring
         Overriding Baud Rate          : 115200
avrdude: wiring_open(): releasing DTR/RTS
avrdude: wiring_open(): asserting DTR/RTS
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14]

[then avrdude: Recv: .....[every letter on my serial message to be displayed]

avrdude: Recv:
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14]
avrdude: Recv:
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14]
avrdude: Recv:
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14]
avrdude: Recv:
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14]
avrdude: Recv:
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14]
avrdude: Recv:
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer

avrdude done.  Thank you.

I'm pretty worried, because I have to have this done in time by Wednesday.

Thanks in advance,

Dangerzone812

Louis Davis

You may be experiencing the "!!!" problem.

The original bootloader would us !!! as an escape sequence to enter a special mode.

If !!! , three or more exclamation point in a row are received during the bootload it will enter that mode and will no longer respond to bootload commands.

If you have entered any strings with !!! then you can remove them and this should fix your problem.

TryChick

I'm having the same problem.  No !!! in  my code and I was uploading fine, then it started giving me the same timeout error

avrdude: stk500v2_ReceiveMessage(): timeout

For a while, just unplugging the USB and plugging it back in would allow an upload, now it won't upload at all. And I did that, though it was a pain in the neck.

Grrrr.  Frustrating, I'm wondering if I made the wrong choice in getting this Arduino instead of another micro controller.

juan_

Hi, I was a few days testing with the code. I removed a paragraph and no timeout avrdude problem, but I did not see the problem. I have read this thread and this was the solution. No !!! in my code and I was uploading fine.

Thanks!!!

bluenomad

Did anyone ever find a solution to this problem? I've tried replacing the AVRDUDE.EXE, modifying the the boards.txt to "wiring" programmer, and searching around the web.  Nothing seems to work. My mega worked great for 2 days, then suddenly, nothing would upload; not even the simplest little program.

Spack

Arduino Mega 2560 and Windows 7 64bit

Same issue, no one to help us?

Arduino sucks!

Matt_Kraemer

Hello, I'm having this same problem except I can't upload blink... seriously, blink!

I'm using windows 7 and arduino 1.0.3. I've tried uploading blink onto my rambo (mega2560) and another ordinary mega2560 and neither will complete the upload.

I then checked the troubleshooting guide in the Arduino help and followed the advice.
In my case I noticed that whether or not I had the arduino plugged in, COM1 was still available in the serial ports. From there I went to Control Panel --> Hardware and Sound --> Device Manager. In there I found that the mega boards were popping up as unknown devices so I pointed win7 at the driver directory in C:/Program Files/Arduino 1.0.3/Drivers and voila... blink uploaded.

The answer, at least for me, was to follow the Arduino troubleshooting guide found in the help menu of my arduino IDE.

gen2thomas

#7
Mar 18, 2013, 09:14 pm Last Edit: Mar 18, 2013, 09:27 pm by gen2thomas Reason: 1
For the protocol "wiring" got to work it is necessary to connect the "RESET-EN" pads on the board. This was the mistake in my case (Mega2560 R1). I had ripped the connection one or two years ago, have forgotten that, and now with new development software versions the uploading have that strange timeout problems although the wiring protocol was configured by default.

Wise versa for the software patch of avrdude (stk500v2.c, described here: http://arduino.cc/forum/index.php/topic,83079.msg659993.html#msg659993) it is necessary to take/leave the protocol "stk500v2" to take effect of patched program.

Good luck, Thomas

kluonius

I simply unpluged the board waited for around 20 mins and everythings ok again

jako77

I know this topic is a little old, but I just ran into the same issue, tried everything suggested above and then some, including reinstalling drivers, checking physical connections on the board, rewriting fuses. I was able to fix my problem by reburning the bootloader. I used an AvrISP MKII to burn the stk500boot_v2_mega2560.hex file (located in arduino-1.0.3\hardware\arduino\bootloaders\stk500v2). I used Atmel Studio, but I'm sure you can burn the bootloader a number of different ways. Hope this helps anyone still looking for a solution.

-Jake

crazyglinc


I simply unpluged the board waited for around 20 mins and everythings ok again
the only answer that i understood worked , that was a close one phew. honestly only waited 20secs tho.

pepa

I had this problem, and I just choose the right COM port (COM4 or COM5), and it's ok.

I have an another board, Duemilanove. This has a problem too. It was a "No driver" problem. Just update manually, and the upload works.

jessey

To Whom It May Concern,
Yes I am also interested in what causes these timeout errors. Seems this arduino stuff is riddled with a lot of hype with no real support or fixes available but they continue to sell the 2560 mega's along with all the shields which is well known to have bugs, or so I've been told. I sure hope someone can prove my assumption is wrong. Is there any support for this?
Regards
jessey

aquateen

Had this same issue. In my case I had a Elechouse MP3 shield plus a speaker attached to my Arduino Mega - all of which was powered through my USB connection on my laptop. I could hear the typical Windows sound when you connect a USB device letting you know it's installed. Then a few seconds later (after the MP3 shield auto played the saved MP3) I heard the typical Windows sound when you disconnect a USB device.

I think it was drawing too much power from the USB port and the USB port protection shut it down. Anyway, once I removed the shield and only connected the Arduino, I was able to upload fine

jessey


Hi aquateen,
I was thinking the same thing and did buy a transformer powered multiple outlet USB hub and will try it. I will get back here to let you know and anyone else that might be interested if it helps.
Thanks
jessey

Go Up