I want to program a esp_32 cam board and it tries to connect but says "A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header
A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header
". What am I doing wrong? When ...... appears, I also push reset. Connection still fails. I also have problems to connect with a flashing programm to upload bin files, probably the is a connection between these problems.
You have to connect IO pin 0 to GND, and then press RESET. This will put the ESP32 into programming mode and you can then upload a sketch.
I have already tried it, like you showed me. It seemed like connections were not working. I used an Arduino as a programmer and this worked.
In my case, I use ESP32CAM-with ESP32-CAM-MB. When I try to upload, the output from Arduino IDE 2.0.1 says:
Sketch uses 259509 bytes (8%) of program storage space. Maximum is 3145728 bytes.
Global variables use 16456 bytes (5%) of dynamic memory, leaving 311224 bytes for local variables. Maximum is 327680 bytes.
"C:\Users\AM\AppData\Local\Arduino15\packages\esp32\tools\esptool_py\4.2.1/esptool.exe" --chip esp32 --port "COM8" --baud 460800 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size 4MB 0x1000 "C:\Users\AM\AppData\Local\Temp\arduino-sketch-BCBA2A5ED81698DEF75E253FCF78DC4E/BlinkAja.ino.bootloader.bin" 0x8000 "C:\Users\AM\AppData\Local\Temp\arduino-sketch-BCBA2A5ED81698DEF75E253FCF78DC4E/BlinkAja.ino.partitions.bin" 0xe000 "C:\Users\AM\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.5/tools/partitions/boot_app0.bin" 0x10000 "C:\Users\AM\AppData\Local\Temp\arduino-sketch-BCBA2A5ED81698DEF75E253FCF78DC4E/BlinkAja.ino.bin"
esptool.py v4.2.1
Serial port COM8
Connecting......................................
A fatal error occurred: Failed to connect to ESP32: No serial data received.
For troubleshooting steps visit: Troubleshooting - ESP32 - — esptool.py latest documentation
Failed uploading: uploading error: exit status 2esptool.py v4.2.1
My setting:
-windows-device manager-com8:115200 bps
-Arduino IDE Serial Monitor:New Line 115200 baud
My question:
- How do I know the setting of the serial ports is matched, I saw the parameter --port "COM8" --baud 460800 from the output, did it means the baudrate should be set to that value?. In my window's device manager the maximum choice of bps is 128000.
- Can we check the correctness of the serial communication using serial monitor (IDE2.0.1) and reset button?, I try changing the baudrate on the serial monitor while resetting the button, but the output is unreadable characters
- I have no problem using USB-TTL, it works ok on uploading the sketch program
- I have already tried with two different ESP32-CAM-MB without any success
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
