i’m trying to get my first nodemcu ESP32s project into esphome and i’m hitting a problem at t he start that I hope someone out there can help me get past.
when using ESPhome-Flasher i connect the board with a usb cable to my laptop (windows 10) and comm 5 shows up, i select the comm and the file to flash, press flash and I get the following error…
Unexpected error: ESP Chip Auto-Detection failed: Failed to connect to Espressif device: Timed out waiting for packet header
the cable is power and data, i’ve used it to transfer files from my laptop to my phone and vise versa just to check, also the comm port shows as active only when i plug the NodeMCU ESP-32s into it.
Edit:
I just tried to plug it directly into my PI running HA with ESPhome installed and the only option I get for upload is OTA.
I disconnected the cable and plugged my tablet into my PC using it and was able to go through my files on the tablet from the PC without problem.
I see that they are running the flasher from a laptop but I wasn’t clear that esphome was actually on a different machine.
And if it was maybe asking the questions in that way might have possibly sparked an “aha…” moment in the OP to realize that you can’t flash a device from a computer that doesn’t at least have the bin file available on it.
@nickrout Thank you for the link to the FAQ i had gone thorough them (though i did forget to mention that i’d been there already sorry).
@finity let me run through everything a bit better please…
i have several nodeMCU ESP8266 devices up and running in ESPhome all with no problem this is my first NodeMCU ESP-32s that I am trying to configure and running into problems.
I am using a tried and tested USB cable that I know has no faults and can transmit data both ways.
my ESPhome is running on my Pi 3b+ which is running Hass.io .
ESPhome-Flasher is running on my Laptop where i have installed all the drivers for the ESP8266 and the drivers from the FAQ
the Binary file that I am trying to put onto the ESP-32s is currently located in my laptop where I have ESPhome_Flasher installed also.
The Binary file was compiled in the ESP component in HA and saved to the laptop.
when i connect the board to the laptop via the USB cable, the laptop makes a noise to indicate that the board has been found and if i look into the Device manager then Comm 5 suddenly appears as active.
but still I get the error when I try to flash it.
if I connect directly to the PI then i get nothing just the option for OTA transfer
It can be tricky to get ESP32s into boot mode.
i) Power on / connect the ESP
ii) Start the flash tool connecting
iii) Press and hold both buttons on the ESP board
iv) Release the EN button while continuing to hold the IO0 button
v) When the flash tool discovers the device you can release the IO0 button.
ESP32 NodeMCU’s have specific flash mode? I didn’t know that. Regular ESP8266 NodeMCU’s can be flashed without any special procedure as far as I remember. Just plug it in & flash it.
Yep the ESP32 based boards have a different flash mode access method to the ESP8266s. Took me a while to work it out the first time, after only using lots of ESP8266s.
It’s the same procedure for the ESP8285. For example, the Sonoff minis may not go into flash mode if you just power on while holding IO0 low. You have to power on, reset while holding IO0 low then release IO0 once connected.