ESP32 Permission Denied Error

Derbyste

New member
OK I'm a total newb when it comes to LED lights and Arduinos however I do have a reasonable amount of electrical, electronic and IT experience. This is also my first time trying to setup ws2812 lights.

My problem is this, I have an ESP32 board that I am trying to flash with WLED using ESPHome-flasher on windows 10. The card appears to be detected as COM4 however whenever I try to flash the image to the card I get a permission denied error message. I've tried both flashing without pressing buttons and also pressing Boot and EN then releasing the EN button, same error. Does anyone have any clue where I may be going wrong and what I can do to solve this.

Thanks in advance
 
I had similar funnies, seems to be quite finickity when comes to programming. If you use a serial monitor you can press boot and see the output, then press both and release to see output, then just the other button. Might help green the right sequence
 
OK, I've tried all sensible permutations of button presses I can think of and logged the output of the console....

Press and hold Boot, press and release EN

[21:14:02]
[21:14:02]rst:0x1 (POWERON_RESET),boot:0x3 (DOWNLOAD_BOOT(UART0/UART1/SDIO_REI_REO_V2))
[21:14:02]waiting for download

Release Boot and attempt flash

Unexpected error: could not open port 'COM3': PermissionError(13, 'Access is denied.', None, 5)

Press and hold Boot, press and release EN

[21:18:51]ets Jun 8 2016 00:22:57
[21:18:51]
[21:18:51]rst:0x1 (POWERON_RESET),boot:0x3 (DOWNLOAD_BOOT(UART0/UART1/SDIO_REI_REO_V2))
[21:18:51]waiting for download

Still holding boot and attempt flash - Same error

Press and release EN

[21:16:05]ets Jun 8 2016 00:22:57
[21:16:05]
[21:16:05]rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
[21:16:05]configsip: 0, SPIWP:0x00
[21:16:05]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[21:16:05]mode:DIO, clock div:2
[21:16:05]load:0x3fff0008,len:8
[21:16:05]load:0x3fff0010,len:3480
[21:16:05]load:0x40078000,len:7804
[21:16:05]ho 0 tail 12 room 4
[21:16:05]load:0x40080000,len:252
[21:16:05]entry 0x40080034
[21:16:05]I (46) boot: ESP-IDF v2.0-3-gbef9896 2nd stage bootloader
[21:16:05]I (46) boot: compile time 05:59:45
[21:16:05]I (46) boot: Enabling RNG early entropy source...
[21:16:05]I (65) boot: SPI Speed : 40MHz
[21:16:05]I (78) boot: SPI Mode : DIO
[21:16:05]I (90) boot: SPI Flash Size : 4MB
[21:16:05]I (102) boot: Partition Table:
[21:16:05]I (114) boot: ## Label Usage Type ST Offset Length
[21:16:05]I (136) boot: 0 phy_init RF data 01 01 0000f000 00001000
[21:16:05]I (160) boot: 1 otadata OTA data 01 00 00010000 00002000
[21:16:05]I (183) boot: 2 nvs WiFi data 01 02 00012000 0000e000
[21:16:05]I (206) boot: 3 at_customize unknown 40 00 00020000 000e0000
[21:16:05]I (229) boot: 4 ota_0 OTA app 00 10 00100000 00180000
[21:16:05]I (253) boot: 5 ota_1 OTA app 00 11 00280000 00180000
[21:16:05]I (276) boot: End of partition table
[21:16:05]I (289) boot: Disabling RNG early entropy source...
[21:16:05]I (306) boot: Loading app partition at offset 00100000
[21:16:05]I (1482) boot: segment 0: paddr=0x00100018 vaddr=0x00000000 size=0x0ffe8 ( 65512)
[21:16:05]I (1482) boot: segment 1: paddr=0x00110008 vaddr=0x3f400010 size=0x1c5f0 (116208) map
[21:16:05]I (1499) boot: segment 2: paddr=0x0012c600 vaddr=0x3ffb0000 size=0x0215c ( 8540) load
[21:16:05]I (1529) boot: segment 3: paddr=0x0012e764 vaddr=0x40080000 size=0x00400 ( 1024) load
[21:16:05]I (1552) boot: segment 4: paddr=0x0012eb6c vaddr=0x40080400 size=0x1b028 (110632) load
[21:16:05]I (1631) boot: segment 5: paddr=0x00149b9c vaddr=0x400c0000 size=0x00034 ( 52) load
[21:16:05]I (1632) boot: segment 6: paddr=0x00149bd8 vaddr=0x00000000 size=0x06430 ( 25648)
[21:16:05]I (1648) boot: segment 7: paddr=0x00150010 vaddr=0x400d0018 size=0x7a56c (501100) map
[21:16:05]I (1676) heap_alloc_caps: Initializing. RAM available for dynamic allocation:
[21:16:05]I (1698) heap_alloc_caps: At 3FFBA6B8 len 00025948 (150 KiB): DRAM
[21:16:05]I (1719) heap_alloc_caps: At 3FFE8000 len 00018000 (96 KiB): D/IRAM
[21:16:05]I (1741) heap_alloc_caps: At 4009B428 len 00004BD8 (18 KiB): IRAM
[21:16:05]I (1762) cpu_start: Pro cpu up.
[21:16:05]I (1773) cpu_start: Single core mode
[21:16:05]I (1786) cpu_start: Pro cpu start user code
[21:16:05]I (1847) cpu_start: Starting scheduler on PRO CPU.
[21:16:05]I (2033) uart: queue free spaces: 10
[21:16:05]Bin version:0.10.0
[21:16:05]I (2035) wifi: wifi firmware version: c604573
[21:16:05]I (2035) wifi: config NVS flash: enabled
[21:16:05]I (2036) wifi: config nano formating: disabled
[21:16:05]I (2044) wifi: Init dynamic tx buffer num: 32
[21:16:05]I (2045) wifi: wifi driver task: 3ffc4f34, prio:23, stack:3584
[21:16:05]I (2050) wifi: Init static rx buffer num: 10
[21:16:05]I (2054) wifi: Init dynamic rx buffer num: 0
[21:16:05]I (2058) wifi: Init rx ampdu len mblock:7
[21:16:05]I (2062) wifi: Init lldesc rx ampdu entry mblock:4
[21:16:05]I (2066) wifi: wifi power manager task: 0x3ffca2dc prio: 21 stack: 2560
[21:16:05]I (2073) wifi: wifi timer task: 3ffcb35c, prio:22, stack:3584
[21:16:05]E (2078) phy_init: PHY data partition validated
[21:16:05]I (2102) phy: phy_version: 329, Feb 22 2017, 15:58:07, 0, 0
[21:16:05]I (2102) wifi: mode : softAP (94:b9:7e:d5:8b:85)
[21:16:05]I (2105) wifi: mode : sta (94:b9:7e:d5:8b:84) + softAP (94:b9:7e:d5:8b:85)
[21:16:05]I (2109) wifi: mode : softAP (94:b9:7e:d5:8b:85)


Attempt flash - same error

Does this give anyone any hints?
 
Close all other apps on your pc. I’ve found Cura tends to cause issues with pixel sticks so it might be that or another app.

Maybe reboot your pc if that does doesn’t help.


Sent from my iPhone using Tapatalk
 
Make sure you confirm what COM port your ESP32 board is using.
Use the Device Manager to ensure it shows up and disappears as you connect and disconnect...
You mention it shows up as COM4 (in your first post) but in the flasher app error log (in your third post) it seems to be trying to open COM3..
You may find that it tends to show up as a different COM port depending on what USB port you have it connected to...
 
Make sure you confirm what COM port your ESP32 board is using.
Use the Device Manager to ensure it shows up and disappears as you connect and disconnect...
You mention it shows up as COM4 (in your first post) but in the flasher app error log (in your third post) it seems to be trying to open COM3..
You may find that it tends to show up as a different COM port depending on what USB port you have it connected to...

PacketBob for the win here !

Open Device Manager /Ports, while there plug and unplug your Esp device and see if it is recognized . If yes ,check/edit it's properties/port settings/advanced to verify it's comport #.

If not recognized , get a new micro usb cable that has/supports data.
 
Plug in your programmer, reboot your PC and then try.

That happens to me all the time and I somehow always forget to reboot. It should work right away.
 
Thanks for the replies, the com port changing was due to me removing and re-installing the com port drivers and I've changed the cable for a known good one. Also I am already running from an Admin account on Windows 10. I thought that I was getting some coms from the arduino because I thought the wall of text I got when pressing and releasing the EN button came from the board, was I wrong about that? I'll try the plugin and reboot the PC when I next get a chance and see if that works. I was also considering downloading a linux install I could run from usb to see if it was windows causing the issues as I've read elsewhere that some people have had issues with the ESP32 board and windows, any thoughts?
 
I have never seen Permission denied to any comport except when I attempted using Vixen back when it was Vixen 2 .

Open device manager/Ports then plug in your esp32 via micro usb .
Is it recognized ?
If yes , I'ts comport # should be listed at the end of the string .
If no , you may need to manually install drivers or there is other issues going on .

From the Source ->
https://docs.espressif.com/projects.../get-started/establish-serial-connection.html
 
Last edited:
I can re-installed all the drivers and rebooted I can confirm that in dev management I have a Silicon Labs CP210x USB to UART bridge showing as COM3. If I connect the ESP32 board and try to flash on COM3 I get the following as before ....

Using 'COM3' as serial port.
Unexpected error: could not open port 'COM3': PermissionError(13, 'Access is denied.', None, 5)
[21:28:46]
 
PROBLEM SOLVED :biggrin: Removed the CP210x windows driver and replaced it with the CP210x Universal windows driver and problem solved!
 
Back
Top