Skip to content

Failed to connect to ESP32: Timed out waiting for packet header #1497

Closed
@aniellod

Description

@aniellod

Hardware:

Board: ESP32 LOLIN w/OLED - ESP-WROM32
Core Installation/update date: (see below)
IDE name: Arduino IDE 1.8.5
Flash Frequency: 80Mhz
Upload Speed: Tried various

Description:

Unable to upload anything to this module.

Have another identical one and same sketch uploads and runs fine. Rules out cable, connection or computer. I tried to upload using esptool.py directly and also using FTDI but same problem.

How can I test if the board damaged? Any tips on how to revive it?

Debug Messages:

(/dev/ttyUSB1)
ets Jun 8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x3 (DOWNLOAD_BOOT(UART0/UART1/SDIO_REI_REO_V2))
waiting for download

Sketch uses 638418 bytes (48%) of program storage space. Maximum is 1310720 bytes.
Global variables use 38948 bytes (13%) of dynamic memory, leaving 255964 bytes for local variables. Maximum is 294912 bytes.
esptool.py v2.3.1
Connecting........_____....._____....._____....._____....._____....._____....._____....._____....._____....._____

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

Thanks

Activity

mrmonteith

mrmonteith commented on Jun 14, 2018

@mrmonteith

I take it the port shows and that it just doesn't upload. I've bought a couple of dev boards that they didn't design well. I have to hold down the reset but after esptool starts to try to send for about a second or two and then release and it loads. All my other boards load with no hand holding. Hope that is what the problem is.

aniellod

aniellod commented on Jun 14, 2018

@aniellod
Author

Sadly it's not helping in this case. Any variations of pressing the boot/flash button or holding it, releasing it seems to fail. Oddly enough the problem was gradual. The board was working fine without needing to press "boot", then it stopped working and I had to press "boot" for it to accept the code. Now nothing works. I had a look and tried to diagnose using this information but no luck.

CaptIgmu

CaptIgmu commented on Jun 16, 2018

@CaptIgmu
Contributor

Make sure certain pins are not connected when uploading programs! In my case, pin 12 was connected to an INT signal from a sensor and could not upload. There may be other ESP32 pins that are sensitive. Also, try DIO mode for the flash in boards.txt file . . .

lbernstone

lbernstone commented on Jun 16, 2018

@lbernstone
Contributor

gpio12 and gpio2 are particularly notable on this: https://github.com/espressif/esp-idf/tree/master/examples/storage/sd_card#note-about-gpio12. It can be burned into a state where it will not interfere with your boot. This should interfere with normal boot, not uploading though. I'm afraid your system may be dead. Can you post the link to where you bought it? Maybe we can shame the manufacturers into doing some qc.

aniellod

aniellod commented on Jun 18, 2018

@aniellod
Author

@lbernstone Thanks. The only one who might need to be shamed is myself. I might have done something wrong to the board which broke it. I ordered two and the second one is fine. Perhaps too much voltage on pin 0 and 2.

davidbono

davidbono commented on Jun 30, 2018

@davidbono

I had the same issue and fixed it by rotating 180° lopy4 board when plugin into the expansion board ... shame on me.

pwpolar

pwpolar commented on Aug 2, 2018

@pwpolar

I'm having this issue with an ESP32 DevKitC_V4 board. Loads fine and then all of a sudden get this message:
Flashing binaries to serial port COM27 (app at offset 0x10000)...
esptool.py v2.1
Serial<id=0x24dcfec, open=True>(port='COM27', baudrate=115200, bytesize=8, parity='N', stopbits=1, timeout=None, xonxoff=False, rtscts=False, dsrdtr=False)
Connecting......................................_____.....
A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header

Sometimes power cycling board fixes problem other times does not. I can see ESP32 replying using scope on TXD0 but computer is not seeing response.

dcartman

dcartman commented on Aug 22, 2018

@dcartman

I had this same issue with an ESP32 Dev Module V1, to "fix it" I held down the boot button while compiling/uploading the sketch from Arduino.

Once the sketch was uploaded I power cycled by unplugging the USB and plugging back in. Uploads worked fine after that for a while.

Fuzzbinder

Fuzzbinder commented on Sep 14, 2018

@Fuzzbinder

I take it the port shows and that it just doesn't upload. I've bought a couple of dev boards that they didn't design well. I have to hold down the reset but after esptool starts to try to send for about a second or two and then release and it loads. All my other boards load with no hand holding. Hope that is what the problem is.

This just fixed the same issue for me. Thanks

nello

nello commented on Oct 2, 2018

@nello

I get this error whenever the tx0 pin is connected to my breadboard. Letting it float free is the only thing that allows me to upload new code. Very strange. My board is an ESP-WROOM-32.

nello

nello commented on Oct 8, 2018

@nello

FIXED: To be able to upload to the EP-WROOM-32 when connected to a breadboard, you need a 10K (or so) pull-down resistor between RX0 and GND.

Amaktronix

Amaktronix commented on Nov 3, 2018

@Amaktronix

@dcartman Thanks. yours solution gave a effect.
The problem was solved for me
My module is DOIT ESP32 DEVKIT V1 which is the same of ESP32 Dev Module V1 .

fixed the same issue for me. Thanks

lemonbuzz

lemonbuzz commented on Nov 24, 2018

@lemonbuzz

I have a custom board with the same issue. I get the 'waiting for download' prompt but the upload always times out.

pjvander

pjvander commented on Jan 7, 2019

@pjvander

I ran into the same issue and couldn't resolve for the life of me. Turns out I have been shipped (twice, now) an ESP8266 in an ESP32 packaging. Configuring for the ESP8266 solved my issue, naturally. Throwing this out there in case this same thing happened to others.

Stitch0

Stitch0 commented on Feb 8, 2019

@Stitch0

Hi. In my case, pressing the "boot" button helped. Press button when starting download sketch.

68 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Failed to connect to ESP32: Timed out waiting for packet header · Issue #1497 · espressif/arduino-esp32