serial.serialutil.SerialException: Cannot configure port, something went wrong. Original message: PermissionError(13, 'A device attached to the system

Hi All,
I am getting this error in esp8266 since 2 day and I am not able to upload any code using VS code to my esp6266 Node MCU V3 board.
The Node MCU V3 board had CH340 USB to serial converter.

Is there any solution this problem? Please let me know.....
'''''''''''''''''''''''''''''''''''''''
Creating BIN file ".pio\build\esp12e\firmware.bin" using "C:\Users\HP.platformio\packages\framework-arduinoespressif8266\bootloaders\eboot\eboot.elf" and ".pio\build\esp12e\firmware.elf"
Configuring upload protocol...
AVAILABLE: espota, esptool
CURRENT: upload_protocol = esptool
Looking for upload port...
Using manually specified: COM11
Uploading .pio\build\esp12e\firmware.bin
esptool.py v3.0
Serial port COM11
Traceback (most recent call last):
File "C:\Users\HP.platformio\packages\tool-esptoolpy@1.30000.201119\esptool.py", line 3969, in
_main()
File "C:\Users\HP.platformio\packages\tool-esptoolpy@1.30000.201119\esptool.py", line 3962, in _main
main()
File "C:\Users\HP.platformio\packages\tool-esptoolpy@1.30000.201119\esptool.py", line 3551, in main
esp = chip_class(each_port, initial_baud, args.trace)
File "C:\Users\HP.platformio\packages\tool-esptoolpy@1.30000.201119\esptool.py", line 271, in init
self.port = serial.serial_for_url(port)
File "C:\Users\HP.platformio\penv\lib\site-packages\serial_init
.py", line 90, in serial_for_url
instance.open()
File "C:\Users\HP.platformio\penv\lib\site-packages\serial\serialwin32.py", line 80, in open
self._reconfigure_port()
File "C:\Users\HP.platformio\penv\lib\site-packages\serial\serialwin32.py", line 222, in _reconfigure_port
raise SerialException(
serial.serialutil.SerialException: Cannot configure port, something went wrong. Original message: PermissionError(13, 'A device attached to the system is not functioning.', None, 31)
*** [upload] Error 1
''''''''''''''''''''''''''''''''''''''''''''''''''

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

In the future, please take some time to pick the forum category 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. The guide contains a lot of other useful information. Please read it.

Thanks in advance for your cooperation.

Welcome to the forum

Why did you start a topic in the Uncategorised category of the forum when its description is

:warning: DO NOT CREATE TOPICS IN THIS CATEGORY :warning:

1 Like

Did you update your drivers to version 3.8?
This broke it for me.

Try the older version 3.5 from 2019-03-18: CH341SER.EXE - Nanjing Qinheng Microelectronics Co., Ltd.

This worked for me.

4 Likes

it worked for me too

Worked trying several times and changing the USB port

THAANKKKS, it works, just yesterday I ran an application that updates all the drivers automatically, I almost cried when I read this. You saved my life. Thanks good man.

Obrigado! Retroagir a versão do driver de 3.8 para a 3.5 funcionou!

Thanks! Downgrade the driver version from 3.8 to 3.5 works good!

A question for the people who have experienced this error and then fixed it by installing the older driver version: have you found that Windows eventually updates the driver back to the problematic version again and the error comes back?

The reason I ask is because I have seen reports of that automatic driver update problem while supporting the users who experience the equivalent avrdude: ser_open(): can't set com-state for "\.\COM_x_" error while uploading to AVR-based boards that have a sketch CH340 chip via the AVRDUDE upload tool.

The procedure I found to to provide a persistent fix is to use the Windows driver "roll-back" feature to roll back to the older driver version. When that technique is used, Windows does not automatically update the driver again. But sometimes the users have trouble with the "roll-back" feature so I am interested in learning about alternative procedures that are working for the users affected by the problem with the latest version of the CH340 driver.