Not able to upload or use Serial Monitor with NodeMCU boards

So I'm having a very strange and extremely frustrating issue with serial. My NodeMCU ESP8266 boards (I have many) have a CH340 serial chip, which has been known to be problematic with drivers, but I have the latest driver (version 3.8.2023.2) installed.

I have done a clean install of the driver and Arduino IDE on two separate Windows 11 PCs, a Lenovo and an HP. I also have multiple NodeMCU boards, multiple cables, and multiple USB-C docks/hubs, and nothing is connected to the boards. I'm eliminating every variable I can think of here.

Uploading throws the following error every time, on both machines (COM port is not always 3, also it's the only COM port in the system so I'm not using the wrong one)

"C:\Users\Chu\AppData\Local\Arduino15\packages\esp8266\tools\python3\3.7.2-post1/python3" -I "C:\Users\Chu\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.2/tools/upload.py" --chip esp8266 --port "COM3" --baud "115200" "" --before default_reset --after hard_reset write_flash 0x0 "C:\Users\Chu\AppData\Local\Temp\arduino\sketches\9750A4E7AE6A3C977E374743F595391C/Blink.ino.bin"
esptool.py v3.0
Serial port COM3

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)

The serial monitor also doesn't function, throwing this error after a while trying to connect:

Port monitor error: command 'open' failed: Invalid serial port. Could not connect to COM3 serial port.

But the weird thing is the serial monitor in IDE 1.X works on the same COM port perfectly fine, and so does the Serial Monitor extension for VS Code. Yet IDE 1.X refuses to upload to the boards too, with the same error.

I really like the interface of IDE 2.X better but it's also clearly a buggy mess, as this is not the first time it's done weird stuff. But since 1.X doesn't upload either I can't entirely blame 2.X.

Hi, welcome to the community.

Does the board show up in Device Manager?
Can you post a screenshot?

try theese solutions, see if it works,

Here's a screenshot of the COM port in Device Manager.

For the solution that says to "press the FLASH button first," I have already tried doing that and had no change. I have also uninstalled and reinstalled the driver... Like twenty times across reboots.

This really feels like an Arduino issue given that other Serial consoles work fine with the same COM port, just not this one (nor program uploading.) In the other post you linked I do see the suggestion to try a different version of the driver, version 3.5 from 2019-03-18. I'll give that a try shortly.

Edit: 50% success with driver version 3.5.2019.1!

Program uploading now WORKS! But the serial monitor is still broken. I can obviously just use a different serial monitor program of course, but I have no idea WHY this is broken, especially now that code uploading works. The serial monitor DOES work in IDE 1.X btw (along with VS Code, which is what I'll likely be using). Seriously IDE 2.X, get your stuff together...

Interestingly, the Serial Monitor error is different now:

Timeout. The IDE has not received the 'success' message from the monitor after successfully connecting to it. Could not connect to COM3 serial port.

Aww, sorry to hear that. i am personally not a fan of IDE 2.X
for my uses, I use either VS Code or IDE 1.X
Let's see what other community members have to say about this problem :nerd_face:
oh and additionally, you can open an issue in GitHub to see if someone can help you :innocent:

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