# Error:avrdude: ser\_open(): can't set com-state for "\\\\.\\COM10"

**URL:** <https://forum.arduino.cc/t/error-ser-open-cant-set-com-state-for-com10/1359026>\
**Category:** Uploading\
**Created:** [February 28, 2025, 6:57pm UTC](https://forum.arduino.cc/t/error-ser-open-cant-set-com-state-for-com10/1359026 "2025-02-28T18:57:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vlasta125398](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/vlasta125398/32/1200723_2.png) [@vlasta125398](https://forum.arduino.cc/u/vlasta125398)\
**Post date:** [February 28, 2025, 6:57pm UTC](https://forum.arduino.cc/t/error-ser-open-cant-set-com-state-for-com10/1359026/1 "2025-02-28T18:57:44Z")

</div>

When i want to upload code this error will appear.  
avrdude: ser\_open(): can't set com-state for "\.\COM10"

---

<div class="post-metadata">

**Author:** ![ptillisch](https://avatars.discourse-cdn.com/v4/letter/p/ad7895/32.png) [@ptillisch](https://forum.arduino.cc/u/ptillisch)\
**Post date:** [February 28, 2025, 7:20pm UTC](https://forum.arduino.cc/t/error-ser-open-cant-set-com-state-for-com10/1359026/2 "2025-02-28T19:20:04Z")

</div>

Hi @vlasta125398. This "`can't set com-state for ...`" error occurs when uploading to the boards that use specific batches of the [WCH CH340 USB chip](http://www.wch-ic.com/products/CH340.html). The problem only occurs when using the latest version of the CH340 driver.

The workaround for the problem is to perform a "roll back" to an older version of the driver that is compatible with these problematic "CH340" chips. I'll provide instructions you can follow to do that:

1. Click the following link to download the previous version of the driver from the chip manufacturer's website:  
[https://www.wch-ic.com/downloads/file/65.html?time=2023-03-16%2022:57:59](https://www.wch-ic.com/downloads/file/65.html?time=2023-03-16%2022:57:59)
2. Wait for the download to finish.
3. Run the downloaded `CH341SER.EXE` file.
4. A " **User Account Control**" dialog may now appear asking " **Do you want to allow this app to make changes to your device?**". Click the " **Yes**" button.
5. A "**DriverSetup(X64)**" dialog will open. Click the " **INSTALL**" button in the dialog.
6. Wait for the driver installation to finish, as indicated by the appearance of a " **Driver install success!**" dialog.
7. Click the " **OK**" button in the " **Driver install success!**" dialog.  
The dialog will close.
8. Click the **X** icon at the top right of the "**DriverSetup(X64)**" dialog  
The dialog will close.
9. Close Arduino IDE if it is running.
10. Connect the Arduino board to your computer with a USB cable.
11. Open the [Windows **Device Manager**](https://support.microsoft.com/en-us/windows/open-device-manager-a7f2db46-faaf-24f0-8b7b-9e4a6032fc8c).
12. Select **View \> Devices by type** from the **Device Manager** menus.
13. Open the " **View**" menu.
14. If there is a **✓** to the left of the " **Show hidden devices**" menu item, click on " **Show hidden devices**" to disable it.
15. Open the "**Ports (COM & LPT)**" section of the **Device Manager** tree.
16. You should see a port identified as "**USB-SERIAL CH340 (COM_n_)**" under the "**Ports (COM & LPT)**" section (where "COM_n_" is some serial port e.g., COM4). Double click on that item.  
The "**USB-SERIAL CH340 (COM_n_) Properties**" dialog will open.
17. Select the " **Driver**" tab of the "**USB-SERIAL CH340 (COM_n_) Properties**" dialog.
18. You will see a " **Roll Back Driver**" button in the dialog. If it is not clickable, perform the following instructions:
  1. Click the " **Update driver**" button.  
An "**Update Drivers Device - USB-SERIAL CH340 (COM_n_)**" dialog will open.
  2. Click on " **Search automatically for drivers**" in the "**Update Drivers Device - USB-SERIAL CH340 (COM_n_)**" dialog.
  3. You should now see the driver installation wizard update the driver. Wait for the update to finish, as indicated by the message " **Windows has successfully updated your drivers**" in the dialog.  
❗ It is possible you will instead see the message " **The best drivers are already installed**". If so, please stop following the instructions here and reply on the forum thread to let me know. I'll provide alternative instructions you can follow.
  4. Click the " **Close**" button in the "**Update Drivers Device - USB-SERIAL CH340 (COM_n_)**" dialog.  
The dialog will close.

19. Click the " **Roll Back Driver**" button in the "**USB-SERIAL CH340 (COM_n_) Properties**" dialog.  
The " **Driver Package rollback**" dialog will open.
20. Click the radio button next to " **My apps don't work with this driver**" in the " **Driver Package rollback**" dialog .
21. Click the " **Yes**" button.  
The " **Driver Package rollback**" dialog will close.
22. Click the " **Close**" button in the "**USB-SERIAL CH340 (COM_n_) Properties**" dialog.

Now start Arduino IDE again and repeat whatever you were doing before when you encountered that error before. Hopefully this time you will not encounter that "`can't set com-state`" error during the sketch upload.

---

<div class="post-metadata">

**Author:** ![pert](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/pert/32/217111_2.png) [@pert](https://forum.arduino.cc/u/pert)\
**Post date:** [March 1, 2025, 1:32am UTC](https://forum.arduino.cc/t/error-ser-open-cant-set-com-state-for-com10/1359026/3 "2025-03-01T01:32:00Z")

</div>

I moved your topic to an appropriate forum category @vlasta125398 .

In the future, please take some time to pick the [forum category](https://forum.arduino.cc/categories) that best suits the subject of your topic. There is an " **About the \_\_\_\_\_ category**" topic at the top of each category that explains its purpose.

This is an important part of responsible forum usage, as explained in [the " **How to get the best out of this forum**" guide](https://forum.arduino.cc/t/how-to-get-the-best-out-of-this-forum/679966). The guide contains a lot of other useful information. Please read it.

Thanks in advance for your cooperation.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [August 28, 2025, 1:32am UTC](https://forum.arduino.cc/t/error-ser-open-cant-set-com-state-for-com10/1359026/4 "2025-08-28T01:32:21Z")

</div>

Closed on August 28, 2025, 1:32am UTC

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
