Why does flashing of esp32-s2-saola-1 fail?

Hi there,
the yaml-file is well compiled but flashing fails. Sometimes the flash goes to 18% and then stops. But mostly, after seeing “Uploading stub…” in the log, the process ends with the error “ERROR Running command failed: Packet transfer stopped (received 0 bytes)”. I am flashing with ESPhome-addon in home assistant, latest version.
I am flashing via USB-cable which is connected to my raspberry Pi 4+.

esphome:
  name: optolink
  friendly_name: optolink

esp32:
  board: esp32-s2-saola-1
  variant: ESP32S2
  framework:
    type: arduino
    version: 2.0.9
    platform_version: 5.3.0

# Enable logging
logger:
  level: DEBUG
  hardware_uart: UART1

external_components:
  - source: github://pr#4453
    components: [optolink ]

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

ota:
  password: "xxxxx"

wifi:
  ssid: !secret wifi_1_ssid
  password: !secret wifi_1_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Optolink Fallback Hotspot"
    password: "xxxxx"

#captive_portal:
web_server:
  port: 80

optolink:
  protocol: KW             # P300 oder KW
  logger: enable             # wenn später alles rund läuft, wieder entfernen 
  state: Status             # wenn später alles rund läuft, wieder entfernen
  device_info: Vitotronic 200 KW2 # dient zur Identifizierung der Vitotronic
  rx_pin: GPIO44
  tx_pin: GPIO43

sensor:
  - platform: optolink
    name: Aussentemperatur
    address: 0x0800
    bytes: 2
    div_ratio: 10
    unit_of_measurement: °C
    device_class: temperature
    update_interval: 1min

Additional comment:
I tried the esphome-flasher (for windows 10) alternatively and it flashed successfully. But the node neither connects to my wifi network nor does it open its own access point.
The ESP flasher logs say “Invalid chip id. Expected 2 read 0. Bootloader for wrong chip?” (please see picture)
esp-flasher-log

Is there anyone who can give advice?

First culprit i’d think of is power supply. Pi is maybe too low with power source than esp requires…try with powered USB hub.

1 Like

I repeated compiling and flashing using esphome installed on my windows10-pc. This worked!
It seems you were right assuming a power source issue!
Thanks for helping!!!

1 Like