0

I have a few cheap Nano clones that I bought online that have worked for the past couple of months. They were working fine today until suddenly the Arduino IDE had trouble uploading sketches to them.

Here is the full error message:

Arduino: 1.8.19 (Windows 10), Board: "Arduino Nano, ATmega328P (Old Bootloader)"

Sketch uses 2080 bytes (6%) of program storage space. Maximum is 30720 bytes.

Global variables use 212 bytes (10%) of dynamic memory, leaving 1836 bytes for local variables. Maximum is 2048 bytes.

An error occurred while uploading the sketch

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

I have tried troubleshooting multiple ways, but none of the following worked:

  • unplugged/replugged in nano
  • restarted computer
  • swapped to another nano clone
  • changed USB cables
  • changed USB ports
  • tried uploading other code
  • downloaded the CH340 drivers

I tried uploading to an Arduino Mega and that DID work, however, I would like to be able to use the Nano.

I am using version 1.8.19

Thanks for the help.

2 Answers2

0

See Have I bricked my Arduino Uno? Problems with uploading to board.

I know you mentioned Nano, but it is the same concept.

If a sketch you previously uploaded sets up the watchdog timer to fire too quickly the new sketch may not upload.

Try holding down reset while you start the upload process and then release reset when the upload starts. See the part of the linked answer headed "Watchdog timer problems".

Nick Gammon
  • 38,901
  • 13
  • 69
  • 125
0

The cheap Nano requires you to use the old bootloader. I use them without problems most of the time. When it fails to upload I first check tools and validate the bootloader it is running. If it is correct I then close the IDE, power down the Nano and then reopen and repower it, between the two it usually solves the problem.

Gil
  • 1,863
  • 9
  • 17