I am using a windows OS and I tried running a .ino code in arduino IDE for ESP8266 and came across the following error while trying to upload the code to ESP8266.

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)

I got to know that this error is being encountered by many people right now. I've used arduino IDE with esp8266 for some time now and this is the first time such an error has popped up. And I think it has something to do with the libraries or drivers installed while setting up the arduino IDE for ESP8266.

  • Tried disconnecting the ESP8266 from my laptop and reconnecting it to a different USB port.
  • Tried resetting the esp8266 using the RESET button to check if it was because of the hardware.
  • Tried running the Arduino IDE as an administrator.
11

There are 11 best solutions below

1
On

resolve the same issue with esp8266 Wemos based on ch340. Just re-install driver

1
On

Need to setup on properties of port in manager devices speed of port, in my case was in cketch 115200 but in parameters of port 9600

0
On

I had the same issue and it seems like it's specific to Win11. The Arduino online editor should be a workaround for this though.

0
On

installed again the ch34xx driver and it worked for windows 11

1
On

uninstall ch340 driver and freshly install the driver then you are good to go!!

0
On

I had the same issue. I uninstall CH430 driver( CH341SER.ZIP) and installed old version driver(Windows-CH340-Driver.ZIP 2016/11/30) and saved this issue.

0
On

Seems that windows 11 has some problems with the ch34xx driver, I had to reinstall it every time i reboot windows 11. after reinstall it works perfectly ;)

3
On

I encountered a similar issue and was able to resolve it by installing the CH340_driver. The CH340 driver provides essential support for devices utilizing the CH340 chipset, ensuring proper communication with your computer.

0
On

I was trying to program AI Thinker ESP32-CAM board using ESP32 CAM BM programmer. I got this error.

"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)".

I tried reinstalling the CH341 driver and it worked. But sometimes, I had to disconnect the ESP32 CAM BM programmer and close the arduino IDE completely, then reopen the IDE and reconnect the board to make it work.

0
On

I tried on WIn7 Pro and Win 10 OS. Have the same problem. After connecting my USB cable all working fine but everytime I got error during uploading a program like Com port access is denied. My PC have 4 USB connectors and I got the numbers:6,7,8,9. But always I got the same error like Com port access is denied. I found the solution in change the COM port number, I put the number greater than 10->11. After that Arduino working like charm! Here is the solution: https://www.youtube.com/watch?v=BUKe0LfNxnw

1
On

i installed the driver https://sparks.gogo.co.nz/ch340.html and it is working in single go just donwload the file unzip and install the driver it will directly run