• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

Unable to upload sketch to ESP32 (WEMOS LOLIN32 board)

Q&A Forum › Category: ESP32 › Unable to upload sketch to ESP32 (WEMOS LOLIN32 board)
0 Vote Up Vote Down
Frank Mungai asked 6 years ago

I followed the guidelines on

  • https://rntlab.com/module-1/installing-the-esp32-board-in-arduino-ide-windows-mac-os-x-and-linux/

to install my esp-32 board, WEMOS lolin32.

But whenever I try to upload a sketch connected to port COM4, I get the error (and my board is properly connected):

Serial port COM4
Traceback (most recent call last):
File "esptool.py", line 2959, in <module>
File "esptool.py", line 2952, in _main
File "esptool.py", line 2652, in main
File "esptool.py", line 222, in __init__
File "site-packages\serial\__init__.py", line 88, in serial_for_url
File "site-packages\serial\serialwin32.py", line 62, in open
serial.serialutil.SerialException: could not open port 'COM4': WindowsError(5, 'Access is denied.')
Failed to execute script esptool
the selected serial port Failed to execute script esptool
does not exist or your board is not connected

Error screenshot –> https://imgur.com/lpMye6m

Question Tags: ESP32
3 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 6 years ago

Hi Frank
Are you sure you’re selecting the right COM port?
Also, are you using a good and short USB cable?
Very long USB cables can result in a similar error.
A similar question was posted here: https://rntlab.com/question/the-selected-serial-port-failed-to-execute-script-esptool-2/ can you see if that helps?
Regards,
Sara

0 Vote Up Vote Down
Frank Mungai answered 6 years ago

Hello,
I changed the port from COM4 to COM12 and it worked. I’m now able to upload sketches to my board, and the errors are gone. Thanks. 

0 Vote Up Vote Down
Sara Santos Staff answered 6 years ago

Great.
I’ll close this question.
If you need further help, you just need to open a new question in our forum.
Regards.
Sara

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [eBook Updated] Learn Raspberry Pi Pico/Pico W with MicroPython eBook – Version 1.2 May 26, 2025
  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.