Initialize ESP32-S2 fails, no matter what

Hi all,

I’m only starting with the ESP environment, but have 3 successfully running. Now I’m trying to get two more ESP32 S2 mini (Amazon.de) on board, but I cannot install the image, or the image won’t start?

So I configured a basic ESP image in HA ESPhome:

esphome:
  name: dst-schreibtisch
  friendly_name: DST_Schreibtisch

esp32:
  board: esp32-s2-saola-1
  framework:
    type: arduino

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "..."

ota:
  - platform: esphome
    password: "..."

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Dst-Schreibtisch"
    password: "..."

captive_portal:

So I compile this in ESPhome compiler, click “install”, then press+hold 0 on the ESP, then push RST, let go, then let go 0.
ESPhome shows the connecting dialogue, but then fails:

I tried that several times, in different order etc…

I also tried https://esp.huhn.me/. I downloaded the ESP image “modern” as well as “legacy”, uploaded modern and it worked.

I then unplugged the ESP, plugged it back in for power supply, but it never connects to the wifi, it seems. There is no lease in my DHCP. HA does also not auto-find it. I have no IP I could enter in HA to insert, so cannot add it manually either.

I’m thinking maybe I destroyed something during the soldering, because it was kinda the first time I did that, but it would be odd that esp.huhn.me was able to establish a connection.

Any idea what I might have done wrong?

Get a good light and a magnifying lens. Inspect your soldering for cold joints or bridges.

yuk, that sounds horrible to do :-/ What would I do anyway if it was the case? I would throw it away, right?

For a cold joint, just resolder it to have proper connection.
For a bridge, if it wasn’t shorting anything, just remove the bridge with soldering iron.
If it was in short… something probably damaged.

2 Likes

I bought some new ones and cannot flash them either, no soldering done yet:


(the error message says ‘The device does not know the command’)
image

I also tried different USB cables to check if that was the problem, didn’t help either.

I can read the board info with Arduino IDE though, so cnnection must be established:
image

I was about to comment that those have no USB to UART (CP2104) chip to create a USB device, but I see that there is an onboard USB device on the ESP32-S2… so I’m not so sure that my statement is still correct…

https://docs.espressif.com/projects/esp-idf/en/stable/esp32s2/get-started/establish-serial-connection.html

But I also have these devices from Amazon and they won’t present a ttyUSB device to the host OS - no matter what buttons I press.

I don’t understand that in the least :sob:
I have no idea what a uart is. Should I buy a different cable?

I mean, it is showing a connection in the browser and this COM-port, and I can read the device info in Arduino studio, so it must be working, right?

If you can upload a sketch (try blink example) on Arduino ide successfully, you
shouldn’t have problems with esphome.

Shorting is the definition of a solder bridge. But unless it was Vcc to an Analog pin, damage is unlikely.

The esp32 s2 does not have an led :cry:

Sorry for that, not my native language.
What I meant with bridge was connection between gpio pins, without short circuit condition (Vcc to Gnd).

Try some serial example…
Anyway, succesfull upload without errors should be enough to confirm your hardware is ok, ports and cables included.

I had some old code lying around in Arduino IDE:

//mqtt https://osoyoo.com/2017/05/10/nodemcu-lesson-5-mqtt-pubsubclient/


#define LED D0  // Led in NodeMCU at pin GPIO16 (D0).
// in esp32, it is gpio2, https://steemit.com/esp32/@armageddit/einfuehrung-2-blinken-der-onbord-led
int LED = 2;

void setup() {
  pinMode(LED, OUTPUT);  // LED pin as output.
}
void loop() {
  digitalWrite(LED, HIGH);  // turn the LED off.(Note that LOW is the voltage level but actually
                            //the LED is on; this is because it is acive low on the ESP8266.
  delay(1000);              // wait for 1 second.
  digitalWrite(LED, LOW);   // turn the LED on.
  delay(1000);              // wait for 1 second.
}

I went to “Sketch” → “Upload”, and it uploaded the code. It existed with:

Leaving...
WARNING: ESP32-S2FNR2 (revision v1.0) chip was placed into download mode using GPIO0.
esptool.py can not exit the download mode over USB. To run the app, reset the chip manually.
To suppress this note, set --after option to 'no_reset'.
Failed uploading: uploading error: exit status 1

Not sure what that means though. How do I reset the chip manually?
Why would it say that the upload failed with status 1 even though the upload appears to have worked? Is that a quirk of Arduino IDE?

Can I somehow connect to the board if it is running? :frowning: Is there any remote debugging console?

Did it work?? What confirms it to you?
To me it looks failure caused not putting the board in upload mode. Did you do the 0-button/reset?

Ok, sorry, I skipped half of the explanation.

It seems that Arduino is writing somewhere (on the ESP?):

But it stops afterwards, maybe I need to press 0 or RST, but I don’t know … no information on the internet … I’m wondering if I should have bought a different mini ESP …

Just to clear up semantics- “Bridge” (specifically Solder Bridge) is any connection between two pins using a blob of solder. The connection is a short circuit regardless of if it’s Vcc, Ground or a GPIO pin. Bridge is just another way to say “Short Circuit”. But since your UART (a chip on the board) does connect and goes through the motions of flashing, doubt that this could be your issue.

A bridge is not always bad. Sometimes it’s intentional. For example, to select the address of some i2c devices, you create a solder bridge across selected address pads:

Here is my configuration for a similar board: Try using this to test. (Or just change
board: esp32-s2-saola-1 to board: nodemcu-32s on your current configuration.

substitutions:
  device_name: esp32test
  friendlyname: esp32test
  my_ssid: iot

esphome:
  name: ${device_name}
  friendly_name: ${friendlyname}

esp32:
  board: nodemcu-32s

logger:
api:
ota:
  platform: esphome

wifi:
  ssid: ${my_ssid}
  password: !secret wifi_password
  
sensor:
  - platform: wifi_signal
    name: WiFi Level
    update_interval: 30s

# Get the WiFi details
text_sensor:
  - platform: wifi_info
    ip_address:
      name: IP
    ssid:
      name: SSID
    mac_address:
      name: Mac

web_server:
  port: 80


##########################################      
# Blink the LED on D4 (GPIO2, LED_BUILTIN)
switch:
  - platform: gpio
    pin:
      number: 02
      mode: output
    id: builtinLED

interval:
  - interval: 1000ms
    then:
      - switch.toggle: builtinLED 

I have never used Arduino to flash an ESP device. I have been using ESPHome Flasher for ever since I flashed my first ESPHome device. Do a Manual Install to the Legacy format, then run ESPHome Flasher.

I also tried the “Flash using Plug into this computer” from the Install menu

  • Click on “Plug into this computer”
  • Wait for “Preparing Download” to finish. (It’s compiling)
  • Download Project
  • Open ESPHome Web
  • Connect
  • Select port
    Click on “connect”
  • Click on “Install”
    Choose file that you downloaded above
    Click on “Install”

Also, my board doesn’t have a D0 pin. I don’t press anything. Even on my DEVKIT board that does have Boot and En buttons.

I said sorry for abusing correct terms. My point was bridging without significant current flow or bridging with fatal current flow.