SparkFun Forums 

Where electronics enthusiasts find answers.

Discussions about processor boards have here!
By dwc309
#226249
Even though the serial port is working over USB , I cannot reliably connect to download my code from my computer to the ESP32.

I have been fighting this issue ever since I began using the ESP32. I have searched the net considerably for a solution and even posted to this forum previously about this issue. In searching the net, it is obvious that others are having the same issues to the point that one would think that the manufacturer would be addressing the issue.

A typical experience has been that the issue occurs at the start of a debug session. Then a number of techniques, none of which work reliably until it works. Then it will randomly work. The techniques include pressing the reset button before starting the build process and after. Not pressing the reset button. Closing the serial monitor window. Disconnecting the USB cable from the board. Trying different physical USB ports and forcing a change in the comm port, different ESP32's, and the ever reliable waiting for the moon to change phase. Finally yesterday it stopped loading the code altogether yesterday. I tried for 45 minutes without connecting. Then I tried for another hour or 2 this morning only connecting once.

I really wish that SparkFun would fix this issue. Since I live within a half hour of your building, you can even come over and we can work on it together.

The port is working though. The output of my program is being displayed to the monitor window.

Here is one of the messages that I am getting.

In file included from C:\Users\doncl\Documents\dc_Maker\aProjects\PingPongBallDisplay\PingPongBallDisplay\PingPongBallDisplay.ino:58:0:
C:\Users\doncl\Documents\Arduino\libraries\FastLED-3.4.0\src/FastLED.h:14:21: note: #pragma message: FastLED version 3.004.000
# pragma message "FastLED version 3.004.000"
^
In file included from C:\Users\doncl\Documents\Arduino\libraries\FastLED-3.4.0\src/FastLED.h:65:0,
from C:\Users\doncl\Documents\dc_Maker\aProjects\PingPongBallDisplay\PingPongBallDisplay\PingPongBallDisplay.ino:58:
C:\Users\doncl\Documents\Arduino\libraries\FastLED-3.4.0\src/fastspi.h:135:23: note: #pragma message: No hardware SPI pins defined. All SPI access will default to bitbanged output
# pragma message "No hardware SPI pins defined. All SPI access will default to bitbanged output"
^
Sketch uses 669425 bytes (51%) of program storage space. Maximum is 1310720 bytes.
Global variables use 40196 bytes (12%) of dynamic memory, leaving 287484 bytes for local variables. Maximum is 327680 bytes.
esptool.py v3.0-dev
Serial port COM4
Traceback (most recent call last):
File "esptool.py", line 3682, in <module>
File "esptool.py", line 3675, in _main
File "esptool.py", line 3329, in main
File "esptool.py", line 263, 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

Here is another error message that I'm getting.

esptool.py v3.0-dev
Serial port COM5
Traceback (most recent call last):
File "esptool.py", line 3682, in <module>
File "esptool.py", line 3675, in _main
File "esptool.py", line 3329, in main
File "esptool.py", line 263, 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
processing.app.SerialException: Error opening serial port 'COM5'.
at processing.app.Serial.<init>(Serial.java:152)
at processing.app.Serial.<init>(Serial.java:82)
at processing.app.SerialMonitor$2.<init>(SerialMonitor.java:132)
at processing.app.SerialMonitor.open(SerialMonitor.java:132)
at processing.app.AbstractMonitor.resume(AbstractMonitor.java:132)
at processing.app.Editor.resumeOrCloseSerialMonitor(Editor.java:2120)
at processing.app.Editor.access$1300(Editor.java:117)
at processing.app.Editor$UploadHandler.run(Editor.java:2089)
at java.lang.Thread.run(Thread.java:748)
Caused by: jssc.SerialPortException: Port name - COM5; Method name - openPort(); Exception type - Port busy.
at jssc.SerialPort.openPort(SerialPort.java:164)
at processing.app.Serial.<init>(Serial.java:141)
... 8 more
Error opening serial port 'COM5'.


Here's yet another error.
User avatar
By TS-Russell
#226253
I noticed this part:

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

...are you using 32, or 64-bit Windows? Because it looks like that fastLED library is utilizing the wrong serial library....this post here https://stackoverflow.com/questions/356 ... it-windows has a method that might work, try following that 1st answer and see how that goes
User avatar
By TS-Chris
#226258
Is there another program using COM5?
A serial terminal emulator or possibly some GPS software?

If so, close those programs first, then try programming your ESP32.
 Topic permissions

You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]