ESP32 install - no serial data received

Hi,

I have several ESP8266 devices working nicely with ESPHome and Home Assistant but am struggling to get the initial compile and install to work on two new ESP32 devices. I’ve read the troubleshooting info in Github and other articles but not yet found a solution.

I am using the ESPHome interface in Home Assistant (as I did previously with the ESP8266 devices).
but when I get to the compile stage it is throwing up warnings, which may or may not have anything to do with it:

Compiling /data/ha-glow/.pioenvs/ha-glow/FrameworkArduino/esp32-hal-time.c.o
/data/cache/platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-spi.c: In function 'spiTransferBytesNL':
/data/cache/platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-spi.c:922:39: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
                 uint8_t * last_out8 = &result[c_longs-1];
                                       ^
/data/cache/platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-spi.c:923:40: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
                 uint8_t * last_data8 = &last_data;
                                        ^

Maybe as a result of this, but perhaps also not, I am then getting an error right at the end of the install process:


Archiving /data/ha-glow/.pioenvs/ha-glow/libFrameworkArduino.a
Linking /data/ha-glow/.pioenvs/ha-glow/firmware.elf
RAM:   [=         ]  12.6% (used 41180 bytes from 327680 bytes)
Flash: [=====     ]  48.5% (used 889450 bytes from 1835008 bytes)
Building /data/ha-glow/.pioenvs/ha-glow/firmware.bin
esp32_create_combined_bin(["/data/ha-glow/.pioenvs/ha-glow/firmware.bin"], ["/data/ha-glow/.pioenvs/ha-glow/firmware.elf"])
Generating combined binary for serial flashing
    Offset | File
 -  0x1000 | /data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/bin/bootloader_dio_40m.bin
 -  0x8000 | /data/ha-glow/.pioenvs/ha-glow/partitions.bin
 -  0xe000 | /data/cache/platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin
 - 0x10000 | /data/ha-glow/.pioenvs/ha-glow/firmware.bin

Using esptool.py arguments: --chip esp32 merge_bin -o /data/ha-glow/.pioenvs/ha-glow/firmware-factory.bin --flash_size 4MB 0x1000 /data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/bin/bootloader_dio_40m.bin 0x8000 /data/ha-glow/.pioenvs/ha-glow/partitions.bin 0xe000 /data/cache/platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin 0x10000 /data/ha-glow/.pioenvs/ha-glow/firmware.bin

Wrote 0xe92d0 bytes to file /data/ha-glow/.pioenvs/ha-glow/firmware-factory.bin, ready to flash to offset 0x0
======================== [SUCCESS] Took 150.39 seconds ========================
INFO Successfully compiled program.
esptool.py v3.2
Serial port /dev/ttyACM1
Connecting......................................

A fatal error occurred: Failed to connect to ESP32: No serial data received.
For troubleshooting steps visit: https://github.com/espressif/esptool#troubleshooting
INFO Upload with baud rate 460800 failed. Trying again with baud rate 115200.
esptool.py v3.2
Serial port /dev/ttyACM1
Connecting......................................

A fatal error occurred: Failed to connect to ESP32: No serial data received.
For troubleshooting steps visit: https://github.com/espressif/esptool#troubleshooting

I’m using HA 2021-12-10 on HA OS 7.2 on a Raspberry Pi 4 Model B. The ESP module is plugged into one of the USB ports on the Pi, which I selected during the guided installation process. The board is still bare, with nothing connected to any of the pins.

During the install I tried initially specifying a generic ESP32 and when it didn’t work, based on reading other posts, etc. I tried it as a NodeMCU-32S which most closely matches what’s on the device: “Espressif ESP32-WROOM-32”

There is a printed label on the packaging which says to press the ‘BOOT’ button during the initial connecting phase on the install. I have tried it with and without doing that, and for different durations, but with the same result.

Please can you help shed some light on this and perhaps suggest how I might resolve this?

Thanks,

Phil

OK, so I got it working and it seemed to be down to the hardware. In case anyone else has this problem, here is what I did. The credit goes to these people: A fatal error occurred: Failed to connect to ESP32: Timed out …..

So, I changed my approach, installed the Arduino app and drivers on my Windows laptop and added the Espressif library in Settings. Then started trouble-shooting with a really simple Arduino project and using the Arduino serial monitor to see when the ESP32 module was ready to receive the upload.

Basically, after a bit of trial and error and the combination of Boot+EN buttons that is described in the link above I managed to get the module to accept code. Then without unpugging anything or touching the ESP32, I closed the Arduino app to free-up the port and opened Home Assistant and used the ESPhome web. It worked right away.

Hope that helps someone else.

3 Likes

Hi!
I have same problem, but I can not solved it.

you tried following step.

started trouble-shooting with a really simple Arduino project and using the Arduino serial monitor to see when the ESP32 module was ready to receive the upload.

Specifically, what kind of trouble-shooting did you do?

I went back to basics, as if this were my first ever Arduino project, following simple step by step instructions that I find on the web and repeating them with subtle variations on which buttons I pressed and in which order I connected, disconnected, etc until finally it worked. Sorry I can’t be more specific then that!

ok!
Thank you!
I will try it.

The link to the page you’ve provided was in my case the solution. Rui Santos there suggests to try another version of the ESP32-board (Like DEVKIT V1 or WROOM or… ).
Selecting DOIT ESP32 DEVKIT V1 did the job.
Thnx!

1 Like

I am getting the same message of no serial data received.Can someone pls help?

is there any solution that works? none of the solutions here work!