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

Hello everyone,

I have tryed to upload a sketch to my arduino nano but it doen’t work. It says: avrdude: ser_open(): can’t set com-state for “\.\COM6”. I tried this:

  • I have tryed it with another com port i have also checked if it is the right com port.
  • I have tryed it with another arduino IDE.
  • It only works with my arduino uno, i have more arduino Nano’s and none of these work.
  • I swapped the cable.
  • I have tryed it with another computer.
  • I have reinstalled the drivers.

I have a arduino nano with an micro usb port, i have used a regular micro usb cable from my phone. Can that cause this problem?

What can i do to get this working?

You need to ensure that the micro USB cable is a FULL cable and not just a charging cable as those often lack the DATA lines needed.

If your UNO is on COM 6 then the Nano's will be on a different port. (usually)

If you are on Windows does it give you the new hardware sound when you plug it in or unplug it ?

Most nano's on the market use the CH340G serial interface chip, not the FT232RL that the official boards use. Check the part number on the chip near the USB connector - if it's a CH340G, you need to install the CH340G drivers (google will get them for you).

Always have multiple micro USB cables so you can swap the cables and verify that your cables work. Working cables can stop working, because they're poorly made in china. If your phone detects as a USB device if you plug it into your computer using that cable, it means the cable does have data lines.


All Arduino Nano's with CH340 are not working any more.
Same error as original poster...................:frowning:

I found the problem as I wanted to update a piece of code on a previously flashed Nano.
So I took 3 spare nano's which where never used and same problem.
I tried two different PC with Windows 10.
Com port is detected in configuration of windows nicely.
IDE works fine as a Kega2560 can be found and uploaded without problems on both PC's with the same port the Nano produces the error.
Tried 3 different cables. USB MINI on each PC a different port which is nicely detected by windows and changed to an othe com number.
CH340 driver is installed.

I select correct Nano board and port in IDE.

What can go wrong on this bases?