PermissionError(13, 'Zugriff verweigert', None, 5)

Hy
i have a lot of problems with my esp32cam modul.

i can't flash it with my ft232rl.
So i bought a new camera modul, which comes with a ESP-32Cam-MB
but the problem still exists....

but know i have another problem....
the console log shows PermissionError(13, 'Zugriff verweigert', None, 5)

what can i do?

That's an access denied error. Have you verified your login credentials?

what do you mean with login credentials?

The camera needs to log into your WiFi.

No. I have a problem by uploading the sketch. The fail messages comes, when I try to upload the sketch

You can post the complete contents of the console window, Verbatim. Posting just your paraphrased version is not helpful.

There are many Google results for your issue. Here's one that appears to have been solved: ESP32 & could not open port 'COM5': PermissionError(13, 'Access is denied.', None, 5) - #14 by sspaten - espressif32 - PlatformIO Community

1 Like

Sorry
I will post all the fail when I'm at home....
I tested most of the links..... install driver ch...
Select a other port. Nothing help....

looks like the cam-mb is defect. other one works

Hi @jumbo125. One of the possible causes of this "PermissionError(13, 'A device attached to the system is not functioning.', None, 5)" error is uploading to the boards that use specific sketchy batches of the WCH CH340 USB chip. 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. 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
  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 appear. 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.
  8. Click the X icon at the top right of the "DriverSetup(X64)" dialog to close it.
  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.
  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 (COMn)" under the "Ports (COM & LPT)" section (where "COMn" is some serial port e.g., COM4). Double click on that item.
    The "USB-SERIAL CH340 (COMn) Properties" dialog will open.
  17. Select the "Driver" tab of the "USB-SERIAL CH340 (COMn) 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 (COMn)" dialog will open.
    2. Click on "Search automatically for drivers" in the "Update Drivers Device - USB-SERIAL CH340 (COMn)" 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 (COMn)" dialog.
      The dialog will close.
  19. Click the "Roll Back Driver" button in the "USB-SERIAL CH340 (COMn) 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 (COMn) Properties" dialog.

Now start Arduino IDE again and repeat whatever you were doing before when you encountered that error before. Hopefully this time the upload will be successful.

2 Likes

Thank you for this great answer. I will test it

7 posts were split to a new topic: ESP32S3 FLASH DOWNLOAD TOOL doesn't connect

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