Problem upload code: avrdude: ser_open(): can't set com-state for "\\.\COM3"

So i have 4 arduinos, BUT, the same error on IT. On original arduino too!
this is log:

avrdude: Version 6.3-20190619
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Users\Tom\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"

         Using Port                    : COM3
         Using Programmer              : arduino
         Overriding Baud Rate          : 57600
avrdude: ser_open(): can't set com-state for "\\.\COM3"

avrdude done.  Thank you.

Failed uploading: uploading error: exit status 1

See if this will help to solve the problem: Port monitor error: command 'open' failed: Invalid serial port. Could not connect to COM serial port - #49 by ptillisch

Hello, thanks for reply, but this doesnt work for me :sob:. After you tutorial, i have installed driver version CH340, so this is good? But in arduino IDE still the same error. avrdude: ser_open(): can't set com-state for "\\.\COM3"

Hi @tom_25. I'm going to ask you to provide some additional information that might help us to understand how to proceed.


:exclamation: This procedure is not intended to solve the problem. The purpose is to gather more information.


Please do this:

  1. Connect the Arduino board to your computer with a USB cable.
  2. Open the Windows Device Manager.
  3. Select View > Devices by type from the Device Manager menus.
  4. Open the "View" menu.
  5. If there is a ✓ to the left of the "Show hidden devices" menu item, click on "Show hidden devices" to disable it.
  6. Open the "Ports (COM & LPT)" section of the Device Manager tree.
  7. You should see a port identified as "USB-SERIAL CH340 (COMn)" under the "Ports (COM & LPT)" section (where "COMn" is some serial port e.g., COM4). Double click on that item.
    The "USB-SERIAL CH340 (COMn) Properties" dialog will open.
  8. Select the "Drivers" tab of the "USB-SERIAL CH340 (COMn) Properties" dialog.

Now please reply here on the forum thread to tell us the version number you saw after "Driver Version" field in that "USB-SERIAL CH340 (COMn) Properties" dialog.

Hello @ptillisch this is what i found: Driver version is 3.8.2023.2
And it is CH340 driver

OK, that is the version of the driver that produces the "can't set com-state for ..." error when uploading to certain cheap Chinese Arduino derivative boards that have a sketchy "CH340" chip.

The instructions @sterretje linked to in post #2 should have caused an older version of the driver to be installed. So something must have gone wrong while you were following those instructions. Please try following the instructions again very carefully. If you have any problems or questions while following them, let us know and we'll provide assistance.

hello, i solved it. Thank you

You are welcome. I'm glad it is working now.

Regards,
Per