-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Failed to connect to ESP32: Timed out waiting for packet header #1497
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
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. |
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. |
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 . . . |
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. |
@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. |
I had the same issue and fixed it by rotating 180° lopy4 board when plugin into the expansion board ... shame on me. |
I'm having this issue with an ESP32 DevKitC_V4 board. Loads fine and then all of a sudden get this message: 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. |
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. |
This just fixed the same issue for me. Thanks |
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. |
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. |
@dcartman Thanks. yours solution gave a effect. fixed the same issue for me. Thanks |
I have a custom board with the same issue. I get the 'waiting for download' prompt but the upload always times out. |
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. |
Hi. In my case, pressing the "boot" button helped. Press button when starting download sketch. |
I had the same problem on my Windows 10 PC. |
I had that Timeout problem, but it only just showed up when using my old Dell Inspiron 1525 (from 2006, but running Win10). My newer laptop had done fine (but sadly, it is not on vacation with me, only my old one) On a hunch, I went out to Best Buy and bought a USB 3.0 powered hub, and with great joy, I found that programming it now works through that hub. I'm using a "ESP32-01 Breakout and Development Board" from www.ezsbc.com to make Geoff Bunza's "Simplified WiFi Throttle" that he described in Model Railroad Hobbyist (https://model-railroad-hobbyist.com/node/35652). Phil in gorgeous Young Harris, Georgia, USA |
This comment was marked as off-topic.
This comment was marked as off-topic.
Just hold the BOOT switch while it says "Connecting......." |
Thanks, It worked for me... |
Thanks, it worked not sure why it is so |
I have tried UART drivers. no pins are connected to anything. I am using the sparkfun thing if it matters. |
@DaveyMan try a pull down resistor on RX0 (see my comment above). |
Had the same problem which seems to be fixed now with a 10uF cap between RST and GND |
I found my problem was with the USB port on my laptop. If I use a USB 3.0 cable (USB-A -> USB 3) in the USB 2.0 port, I get the exact error messages above. When I moved the cable to the USB 3.0 port it worked just fine. I didn't realize my laptop had a single 2.0 port which is the one I naturally use due to it's location. As I understand, it should have worked with the USB 2.0 port, but it does not on my laptop either due to the cable or the port. Hope this helps someone. |
Just make sure whether following conditions meet,
|
#3 did work for me! thanks a lot. |
Where is GPIO0 on esp32 dev kit v1 |
GIS: esp32 dev kit v1 pin map |
Thanks :D it worked! |
Thanks to @mikkieg
Here is how I fixed firmware upload on ESP32-DevKitC V4 with ESP-WROOM-32 board |
I can't say for sure which of these are required, but I got it working when I:
Once that was done I removed the jumper and USB, then reinserted USB, and the sketch was running fine. |
I too had the same issue.. |
Super strange, I was working on a program, uploading changes every half hour or so for like 4 hours, suddenly I'm getting this error out of nowhere... Tried multiple different modules, none work. Tried a Pro micro, that worked fine. What got me back up and running was googling "CP210x USB to UART Bridge VCP Drivers" like @68gt500 said, and now it works. Although now I do have to hold the boot button while it says connecting, which I didn't before :/ |
I had a similar issue to this when attempting to program an ESP32-S2 under esp-idf. Upon entering programming mode the following error occurred.
The issue turned out to be a bad solder joint between the ESP32-S2 and flash chip (even though I could id the esp and flash using esptool). |
TTGO-T display unit. Would not communicate, port did not show up in WIN10 device manager. Noticed that an UNO using CH340 did appear later, showing port number, so reconnected TTGO. Nothing until I updated drivers, and all ok since. Surprised that versions using CP21XX and CH340 would be available, without showing in spec. |
@HarborDesigns refer to any of the DevKit schematics (ie: https://dl.espressif.com/dl/schematics/esp32_devkitc_v4-sch-20180607a.pdf) for the DTR/RTS reset circuit requirements to have the board automatically enter download mode. |
@atanisoft I have those two transistors on my board but to isolate the issue I have temporarily removed the transistors from board and manually doing it to figure out the problem. Its shouldn't matter if I do it manually if the signals are correctly timed. |
If you force the esp32 into download mode esptool should just work. However, you will need to hold IO 0 low until it starts downloading firmware. |
Yes, i should be able to do that but it is not flashing new code on ESP32. Does my rough timing diagram looks correct in my previous picture? I know I can enter my ESP32 into program mode as I see following message on my serial monitor. Whenever my GPIO 0 is low and then when I toggle the EN signal from 1 (high) to 0 (low) and then back to 1(high). It shows following message which is good Looks like it doesn't reads data over serial communication after that but my serial communication works. What I understand is that I can put ESP32 in program mode if my GPIO 0 is zero after reset and if my GPIO 0 is high after reset then it goes into normal mode. In my case, I can enter in and out of both modes and my serial communication prints that message but I can't flash new code because of packet header issue/ time out of the session. |
I would suggest posting on esp32.com and have someone assist with a schematic review to ensure the hardware you have selected for your custom PCB will work as expected for esptool etc. |
Resume config things already tested nothing went right with me will my plate burn? |
Hi all. I've had this board for a couple of months with a project I'm working on with someone else. I'm now stuck with last code and cannot update our project. Can I bypass USB and flash via pins, like esp01 with USB flasher? Any clue anyone? Really strange all of a sudden. Thanks ##update## After reluctantly desoldering TTGO board, I was able to flash it again. Then I resoldered it back onto the PCB attached back component at a time, the line elevel converter for LED strips was causing some short or glitch. I assume it has died or failed somehow. |
For what it's worth: I had issues with an ESP32 not flashing, even while holding boot or using a resistor. The other 4 boards that came with this board were working fine. I used a small convection oven at 450 F for 2 minutes to reflow the solder. The board in question is flashing now without any issues. |
Using |
Same problem here with an ESP32-S 2AHMR |
I'm having the same problem with ESP-32 cam-S. Compiling is done perfectly but while uploading I am getting the error "failed to connect esp32:timed out waiting for packet header" repeatedly even when I am holding the reset button while uploading. |
2 years ago I had |
Well....tried in another ports too...but still showing the same error message. How can I know if my camera module is working?.. |
Cam modules often don't have a button on gpio0. You need to hold gpio0 low (ground) to put it into programming mode. |
The camera module is a module on main ESP board ? If so, I would try with camera and/or other modules/sensors disconnected. If It starts, it could be too much power draw or incorrectly connected pin(s). |
@PilnyTomas good candidate for FAQ. |
This will be solved by the #8241 |
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
Thanks
The text was updated successfully, but these errors were encountered: