A fatal error occurred: Failed to connect to ESP32: Invalid head of packet (0x00)

Mar*_*eem 6 ide serial-port arduino packet esp32

I tried all the google solutions, It seems like RST button doesn't actually reset. Just red led blinking all the time, and no serial output or anything I'm working on Windows 10, ESP32 Dev Module ,on COM4 ,Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 115200, None. I tried with different esp it works

Sketch uses 204738 bytes (15%) of program 
storage space. Maximum is 1310720 bytes.
Global variables use 13416 bytes (4%) of 
dynamic memory, leaving 314264 bytes for 
local 
variables. Maximum is 327680 bytes.
esptool.py v3.0-dev
Serial port COM4
Connecting........_____....._____....._____....._____....._____....._____....._____
Run Code Online (Sandbox Code Playgroud)

`

   A fatal error occurred: Failed to connect 
   to ESP32: Invalid head of packet (0x00)
Run Code Online (Sandbox Code Playgroud)

小智 3

I normally upload at 921600. Your settings look perfect, it is working very well for me. Try the following -

  1. If the Serial pins(Rx/Tx) are connected anywhere, disconnect/unplug them.
  2. Keep the boot button on hold while it is trying to connect.
  3. Change the USB port. If you are using hardware debuggers, zadig can mess things up.

I have faced similar issues, the above mentioned ones have always solved it. Choosing wrong board also results in this issue, I tried ESP-01, ESP-03 or other smaller boards with this setting and faced this. So make sure you are using exactly the ESP32 dev module and not anything else.