I have an AI Thinker ESP32-CAM and I've had issues uploading the CameraWebServer sketch, every time I hit upload it says "A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header" and I've tried everything that I can think of, I disconnected and reconnected all the connections on my FTDI board and I've done all sorts of button presses during the connection, I've switched the voltage and I've bought a whole new board and I don't know what the issue is or how to fix it.
-
Did you connect IO0 to Ground?StarCat– StarCat2020年07月07日 06:15:47 +00:00Commented Jul 7, 2020 at 6:15
2 Answers 2
ESP32 only works with 3.3 V serial do not switch the FTDI voltage to 5 V
Watch out for the serial connections too
U0R-->TX
U0T-->RX
If you mixed it up it won't work!
First of all you need to connect two pins only when uploading It is all ready fixed for you need to press the rest button when uploading and seeing these dots as below image.
- ESP32-CAM on-board RST button Press and hold until you see uploading
After a few seconds, the code should be successfully uploaded to your board.
I hope this helped for you!
You can reffer to this link for more info
https://randomnerdtutorials.com/esp32-cam-take-photo-display-web-server/
-
1Good info about ESP32. In addition, I think some confusion comes from the ESP32-CAM, which does have +5V option. And you have to ground GPIO0 in order to program that board. But other than that they are very similar. Again, this comment and link applies to ESP32-CAM, as the original question asked about. randomnerdtutorials.com/program-upload-code-esp32-camhellork– hellork2022年12月02日 08:45:07 +00:00Commented Dec 2, 2022 at 8:45
I have had the same problem / error message with a different board. I did not realise that during upload you must make sure that any GPIO pins that the board uses to talk to the flash chip are NOT connected to other devices. The upload process should be:
- Disconnect any GPIO pin connectors.
- Upload your code.
- Reconnect any GPIO pin connectors.
(In your question, you say "I disconnected and reconnected all the connections" but you do not say whether all your connections were disconnected while you were trying to upload your code.)
I found this information here (the text in that post says "This message normally means that the ESP32 can't talk to its attached flash chip (the flash chip may be in the module). Check the GPIO pins 6,7,8,9,10 & 11 (which are shared with the flash chip) are not connected to anything external or shorted together, etc.")
HTH.