For the past 2~3 days my Marlin has been failing. I know its not the code because when I try and verify the code its fine, but I get this error message;

Arduino: 1.6.13 (Windows 7), Board: “Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)”

Sketch uses 52,036 bytes (20%) of program storage space. Maximum is 253,952 bytes.
Global variables use 2,719 bytes (33%) of dynamic memory, leaving 5,473 bytes for local variables. Maximum is 8,192 bytes.
avrdude: ser_open(): can’t open device “\\.\COM1”: The system cannot find the file specified.

avrdude: ser_drain(): read error: The handle is invalid.

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.

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.

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.

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.

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.

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.

avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
the selected serial port avrdude: stk500v2_getsync(): timeout communicating with programmer
does not exist or your board is not connected

Any help would be appreciated/

1 Like

Replace the USB cable first with a shorter one.

And just try to upload a simple sketch from the file-examples menu.

Usually the bootloader is failing with this kind of error: Use this guide and if you have 16U2 chip on it like the original Arduino Mega(UNO has the same)

https://www.arduino.cc/en/Hacking/DFUProgramming8U2

Had this issue once with a Mega and was able to solve it with this.

T.

1 Like