Unable to upload to Mega2560

Hi, I am new to posting but I am just frustrated as it was working hours before and then the boards manager decided to update the drivers. I am re doing my lighting automation as previously used proprietary boards are not produced any more (ie oxrs rack 32).
Using a Mega 2560 from eBay when uploading I get :-

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
Failed uploading: uploading error: exit status 1

avrdude: ser_open(): can't set com-state for "\.\COM6"

I am sure that the port is com 6 as Tools/Ports detects it, I have tried it on several Mega boards and they all don't communicate, uno boards are fine. A search on the net comes up with a suggestion from Rich Langer of placing a capacitor in parallel with C4 so that it resets prior to communicating, the thing is they used to work. Any suggestions please.

Please enable verbose output during upload and disable verbose output during compilation under file/preferences; I think you already did the first. Perform an upload and post the output here using code tags (you can use the <CODE/> button above the compose window).

Some questions:

  1. How are you uploading? Via USB or using a programmer (which one)?
  2. Which version of the IDE?
  3. Which version of Windows (10/11/...)?
  4. Which board packages have you installed except for AVR which does not include the CH340 driver? Which board package did you update?

The Chinese clones usually use the CH340 serial-to-usb adapter. If it is indeed the update of that driver, Port monitor error: command 'open' failed: Invalid serial port. Could not connect to COM serial port - #49 by ptillisch contains instructions to roll it back.

Please post a link.

Hi sterretje,
I am uploading via USB
I am using IDE 2.3.2
Windows 11
Board packages Arduino AVR Boards 1.8.6 and 1.6.23 and 1.6.13
the annoying thing is that it was working before it did an update .
I have restored the windows drivers to the CH340 and it now works wonderfully.
Thanks sterretje you are a life saver.

I wonder which board package was updated?

FYI, I usually don't allow driver updates.