hello i made a device that uses a esp32 board, the compiling works flawlessly but it returns this error message during upload to the actual board:
Arduino: 1.8.12 (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 1127986 bytes (86%) of program storage space. Maximum is 1310720 bytes.
Global variables use 43968 bytes (13%) of dynamic memory, leaving 283712 bytes for local variables. Maximum is 327680 bytes.
esptool.py v2.6
Traceback (most recent call last):
An error occurred while uploading the sketch
Serial port COM4
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(2, 'The system cannot find the file specified.')
Failed to execute script esptool
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
yes now i changed it to the right port and it says:
Arduino: 1.8.12 (Windows 10), Board: "ESP32 Dev Module, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 115200, None"
Sketch uses 1127986 bytes (86%) of program storage space. Maximum is 1310720 bytes.
Global variables use 43968 bytes (13%) of dynamic memory, leaving 283712 bytes for local variables. Maximum is 327680 bytes.
esptool.py v2.6
Serial port COM5
Connecting........_____....._____....._____....._____....._____....._____.....____An error occurred while uploading the sketch
_
A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
i already watched a youtube video to force it into bootloader but it wont work with my board and cant connect
Some ESP32-boards need the "flash" button beeing pressed when the
upload-process prints
Connecting........
There are a lot of different ESP32-boards on the market.
And they seem to differ from each other more or less.
Some boards can do the upload fully automatic some others need this button-press.
I have managed to get some boards working automatically through connecting a 100 nF capaciator between enablepin and ground
Some website recommend a 10µF electrolytic capacitor. With electrolytic capacitors you ahve to takte care of polarity. A 100nF non-electroclytic capacitor doesn't care
ESP32 boards often have a button labeled "boot".
When you see "Connecting....." in the Arduino IDE press this button (and maybe hold it down for 1 or 2 seconds).
Sometimes it is not necessary to press this button during upload but sometimes it is.