Windows 11 Arduino IDE version 2.1.1 COM Port Problem

Install Arduino IDE on a Windows 11 computer and I am having problems. It seems to be a USB driver problem, but I have not found a way to install an older driver on windows 11, even manually it wouldn’t let me. Below is a description of what I have tried already. The ESP8266 module used for the trouble shooting had been programmed on a Window 10, Arduino IDE version 1.8.16 . Any comments on how to fix this problem are welcome.

Window 11, Arduino IDE version 2.1.1 can not open com port connected to a SP-12 ESP8266 WeMos D1 NodeMCU Lua Mini WIFI 4M Bytes Development Board Module. Error message ; Will not connect to ESP8266; “Port monitor error command ‘open’ failed: Invalid serial port. Could not connect to COM5 serial port”. USB port driver version 3.8.2023.2

Window 11, Arduino IDE version 1.8.18 can open monitor to a SP-12 ESP8266 WeMos D1 NodeMCU Lua Mini WIFI 4M Bytes Development Board Module. USB port driver version 3.8.2023.2. When the module is restarted, press reset button, the Serial Monitor displays the module programmed USB output data. If the Window 11, Arduino IDE version 1.8.18 upload tab is selected, an upload error is generated,

“esptool.py v3.0

Serial port COM5

A fatal esptool.py error occurred: Cannot configure port, something went wrong. Original message: PermissionError(13, 'A device attached to the system is not functioning.', None, 31)”

If the module is restarted, the upload tab is selected, a different upload error is generated,

“esptool.py v3.0

Serial port COM5

A fatal esptool.py error occurred: Cannot configure port, something went wrong. Original message: PermissionError(13, 'A device attached to the system is not functioning.', None, 31)Error while setting serial port parameters: 9,600 N 8 1”

Window 11, Arduino IDE version 1.8.16 works the same as the Window 11, Arduino IDE version 1.8.18.

The same module on a Window 10, Arduino IDE version 1.8.16 works on Serial Monitor and can be upload. USB port driver version 3.5.2019.1

Below is my windows 11 info

Edition Windows 11 Pro

Version 22H2

Installed on ‎6/‎11/‎2023

OS build 22621.1992

Experience Windows Feature Experience Pack 1000.22644.1000.0

Anyone else having this problem?
Still having this problem. Have tried Microsoft community but no help yet.
Any comment would be appreciated

Hi @reddogluna

Is the chip on the board a WCH CH340?

There were some previous reports of this "Port monitor error command ‘open’ failed: Invalid serial port" error occurring specifically when uploading to the boards that use the WCH CH340 USB chip (and apparently only specific batches of those chips). The problem only occurs when using the latest version of the CH340 driver.

The affected users have reported that doing a "roll back" to an older version of the driver was an effective workaround. You can give that a try.

I'll provide instructions:

  1. Open this tutorial from SparkFun in your browser:
    https://learn.sparkfun.com/tutorials/how-to-install-ch340-drivers/all#drivers-if-you-need-them
    We are using this tutorial as a source for an older version of the CH340 drivers. Generally I recommend only obtaining drivers from the manufacturer of the device, but WCH does not provide older versions of their drivers and SparkFun is trustworthy.
  2. Click the "Windows (EXE)" link you see in red under the "Drivers (If You Need Them)" section of the tutorial.
  3. Wait for the download to finish.
  4. Run the downloaded CH341SER.EXE file.
  5. 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.
  6. A "DriverSetup(X64)" dialog will appear. Click the "INSTALL" button in the dialog.
  7. Wait for the driver installation to finish, as indicated by the appearance of a "Driver install success!" dialog.
  8. Click the "OK" button in the "Driver install success!" dialog.
  9. Click the X icon at the top right of the "DriverSetup(X64)" dialog to close it.
  10. Close Arduino IDE if it is running.
  11. Connect the Arduino board to your computer with a USB cable.
  12. Open the Windows Device Manager.
  13. Select View > Devices by type from the Device Manager menus.
  14. Open the "View" menu.
  15. If there is a to the left of the "Show hidden devices" menu item, click on "Show hidden devices" to disable it.
  16. Open the "Ports (COM & LPT)" section of the Device Manager tree.
  17. 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). Right click on that item.
    A context menu will open.
  18. Select the "Drivers" tab of the "USB-SERIAL CH340 (COM_n_) Properties" dialog.
  19. You will see a "Roll Back Driver" button in the dialog. If it is not clickable, perform the following instructions:
    1. Select "Update driver" from the context menu.
      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.
      :exclamation: 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.
  20. Click the "Roll Back Driver" button in the "USB-SERIAL CH340 (COM_n_) Properties" dialog.
    The "Driver Package rollback" dialog will open.
  21. Click the radio button next to "My apps don't work with this driver" in the "Driver Package rollback" dialog .
  22. Click the "Yes" button.
  23. 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 "Cannot configure port" error during the sketch upload.

1 Like

A post was split to a new topic: LEDs don't light up with Uno circuit 11

When I purchase the board, the image showed a Ch340 chip. When I received the boards, the chips were unmarked.

Followed your instruction and install the drive released 6 years and 11 month ago. Now both versions of Arduino IDE work perfectly.

Thanks you so very much for the help
Red Dog Luna

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

Regards,
Per

I thought I was the only one with such an issue

But you got it working?

Btw, welcome :sunglasses:

Make sure you have the latest drivers for your ESP8266 module. Also, try running the Arduino IDE as an administrator and check if your COM port is selected correctly.

3 posts were split to a new topic: CH340 driver rollback workaround works on Windows 10 but not 11

A post was merged into an existing topic: CH340 driver rollback workaround works on Windows 10 but not 11

.. worked for me on windows 11 running IDE 2.2.2 .. thank you!

1 Like

I am running Windows 11. Following your Instruction Set, I could not get to the point where I could upload earlier versions of the Ch340 Driver.

Suggestions for what to do next are welcome.

Hi @grenken. Please tell me at which exact step in the instructions you encountered a problem. Please also provide a detailed description of the problem you encountered.

It was Step 19:

  1. You will see a "Roll Back Driver" button in the dialog. If it is not clickable, perform the following instructions:

  2. Select "Update driver" from the context menu.
    An "Update Drivers Device - USB-SERIAL CH340 (COM_n_)" dialog will open.

  3. Click on "Search automatically for drivers" in the "Update Drivers Device - USB-SERIAL CH340 (COM_n_)" dialog.

  4. 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.

  5. Click the "Close" button in the "Update Drivers Device - USB-SERIAL CH340 (COM_n_)" dialog.

The Problem: I could not institute the "Roll Back Driver" action. When I moved beyond this step, I could only download the latest CH340 Driver File.

I do need to download an earlier CH340 File.

Step 19 has five sub-steps. Please tell me which of the sub-steps you had a problem at.

I'm not sure I understood correctly what you mean by this. Please add a forum reply here that provides a more detailed description to help me to understand it.

Make sure to include the full and exact text of any error or warning messages you encountered.

I was successful in finding an older CH340 by opening a web posting indicating that it had CH340 Driver for Windows 10.

I opened the posting and downloaded the CH340 Driver associated with the posting. Then I installed this driver onto my PC.

This worked. When I opened the sketch I had been using, the ESP8266 uploaded the sketch.

Thank you for your time and helpful comments so that I could solve the upload problem.

Now, I am trying to get the ESP8266 to display graphic figures on my ILI9341 No Touch 2.8 inch, 240x320, TFT Display.

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

Regards,
Per

I had the sam problem with WIN 11 and Arduino IDE 2.2.1 and 8266 board.
I solved this:

  • by install older CH340 driver, I become meassage " installation faild"
  • follow your instruction, till point 19.
  • entry "Driver Package rollback" was grey deaktivated
  • I selected "Uninstall device" at the same time 8266 board was conncted.
  • USB COMx was removed
  • install old CH340 driver again . Now was acess :slight_smile:
  • after that i checked wich driver is installed and saw "3.4.2014.8" from "08.08.2014"
  • now communication is o.k. .
    regards Franz
1 Like

I followed these steps. At Step 19, sub-step 3 the dialog box said "the best drivers are already installed". Please tell me how to proceed.