ESP32 Thing - can't upload my program anymore...

on a Windows 10 laptop.

I thought that I had this all setup but it’s been a while. Same laptop, same cable, same ESP32 Thing. I have also tried a different cable. No help.

I connected the Thing to the laptop. The board came on and the blue LED was blinking. So I found the Blink file that I had previously edited, made a change in the timing and it wouldn’t upload after building. It said that there was no connection to the board.

When I looked at the Arduino app and the ESP32 was not the chosen board nor was there a selection for it. I went to the installation instructions and started over. I uninstalled and then re-installed the Arduino app, then entered the following into Preferences additional boards.

https://raw.githubusercontent.com/espre … index.json

Then I could see the ESP32 in the tools/Board Manager. I could also see the ESP32 Thing in the boards to select. It said that it was already installed.

I tried to upload my Blink program again. It would build but would not upload. I removed the esp32 package in the board manager and re-installed it. It still wouldn’t upload. I checked to see if there were any other ports besides COM5 and there were not any.

I also tried another ESP32 thing. It wanted to use Port4 and not Port5. In each case, that was the only port available for selection.

I rebuilt again and it wouldn’t upload again for the same reason. Any help that you would be willing to provide would be appreciated. Thanks in advance. Here is the serial port output.

Arduino: 1.8.13 (Windows 10), Board: “ESP32 Dev Module, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 921600, None”

Sketch uses 213149 bytes (16%) of program storage space. Maximum is 1310720 bytes.

Global variables use 15380 bytes (4%) of dynamic memory, leaving 312300 bytes for local variables. Maximum is 327680 bytes.

C:\Users\doncl\AppData\Local\Arduino15\packages\esp32\tools\esptool_py\2.6.1/esptool.exe --chip esp32 --port COM5 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size detect 0xe000 C:\Users\doncl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4/tools/partitions/boot_app0.bin 0x1000 C:\Users\doncl\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4/tools/sdk/bin/bootloader_qio_80m.bin 0x10000 C:\Users\doncl\AppData\Local\Temp\arduino_build_542855/Blink.ino.bin 0x8000 C:\Users\doncl\AppData\Local\Temp\arduino_build_542855/Blink.ino.partitions.bin

esptool.py v2.6

Serial port COM5

Traceback (most recent call last):

File “esptool.py”, line 2959, in

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 ‘COM5’: 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

This report would have more information with

“Show verbose output during compilation”

option enabled in File → Preferences.

Entropy is an evil force in the Empire.

I eventually resolved the issue. It was a combination of one bad USB cable, a GPIO pin that was different between the program and the board, a bunch of fiddling, and an addled mind. Mostly, it was the latter … most likely, I think.

I take it back, it works occasionally.

Well, it worked for a few times then it went back to the same issue.

After playing with it for some time, it became apparent that it will work sometimes but not very frequently.

If I press the reset button, output comes to the serial monitor reliably. It just won’t load.

Again, this is the output after building.

>>>>>>>>>

Sketch uses 213337 bytes (16%) of program storage space. Maximum is 1310720 bytes.

Global variables use 15380 bytes (4%) of dynamic memory, leaving 312300 bytes for local variables. Maximum is 327680 bytes.

esptool.py v2.6

Serial port COM5

Traceback (most recent call last):

File “esptool.py”, line 2959, in

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 ‘COM5’: 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

>>>>>>>>>

There are 4 copies of the file esptoo.py on my system so I’m not sure which one is being used yet. It’s almost like the comm port is being disabled from the programmer viewpoint.

Finally seem to have sketches uploading reliably. What I found on the Internet was some referred to resetting an ESP32 device prior to uploading. I had been trying that occasionally but it wouldn’t always work. After more experimentation after I ran into the suggestion again, I found that if reset was held through the end of the build and into when it started trying to actually upload the sketch, the sketch would always upload, 5/5 and counting. Since I might not be back again, I thought that I would leave a note in case someone else has the issue as I spent a lot of time searching for something that should be in the getting started with the ESP32 Thing on the SparkFun’s website.

I also was saddened to find that, after not being on the SparkFun website for a while, that they’re friendly helpful attitude seems to have disappeared. There is no more technical support. I was reminded during my searches that Forums are not a reliable way to get help on technical issues. I ran into many links where someone had this same issue, entered it on a forum and there were no replies ever over the 2/3 years that the problem had been active. It seems that many boards with the ESP32 on them have this issue. It would also seem that if the developers of the ESP32 wanted it to be a robust development environment, that they would address the issue. My dos centavos.

We do have technical support, we are just here primarily. Sometimes, we don’t have a good answer on a forum post so we don’t reply in a timely manner. The ESP32 modules are a finicky thing(as you have discovered) and there are plenty of buggy issues with them. We are glad you have figured out how to get your part to consistently work.

I appreciate your feedback here, and the information you have provided. If you need anything else, please let us know.

Thanks for replying.

I don’t want to get into an argument about this but SparkFun doesn’t have tech support anymore. Tech support is where one can call in, talk to a human about a technical question/issue. With a forum, it is problematic as to whether an answer will be forthcoming today, tomorrow, or never.

With respect to the ESP32, there are enough similar issues with respect to similar problems across multiple vendors that the issue does not appear to lie with the users. Vendors, like SparkFun, need to get with the ESP32 people to resolve them. It is in the best interests of both to do so.

No arguments here, I appreciate your definition of technical support and understand your expectations and concerns with how we do technical support. I will do what I can with your feedback.

I also understand your concerns specifically with the ESP32 product. I will bring this issue up to the assigned engineer and see what we can do.

Thanks. I appreciate your time and help.