esphome / issues

Issue Tracker for ESPHome
https://esphome.io/
290 stars 34 forks source link

Enabling esp32_ble_tracker+esp_idf = bootloop #5837

Open vekexasia opened 3 months ago

vekexasia commented 3 months ago

The problem

Apparently since 5.1 (not sure if applicable before) some of my devices seem to go into bootloop when they have esp32_ble_tracker enabled..

This is serial output


ELF file SHA256: ece23fc63ca6de22

Rebooting...
ets Jul 29 2019 12:21:46

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:6652
ho 0 tail 12 room 4
load:0x40078000,len:15052
load:0x40080400,len:3836
entry 0x4008069c
I (29) boot: ESP-IDF 4.4.7 2nd stage bootloader
I (29) boot: compile time 14:27:02
I (29) boot: Multicore bootloader
I (32) boot: chip revision: v3.0
I (36) boot.esp32: SPI Speed      : 40MHz
I (41) boot.esp32: SPI Mode       : DIO
I (45) boot.esp32: SPI Flash Size : 4MB
I (50) boot: Enabling RNG early entropy source...
I (55) boot: Partition Table:
I (59) boot: ## Label            Usage          Type ST Offset   Length
I (66) boot:  0 otadata          OTA data         01 00 00009000 00002000
I (73) boot:  1 phy_init         RF data          01 01 0000b000 00001000
I (81) boot:  2 app0             OTA app          00 10 00010000 001c0000
I (88) boot:  3 app1             OTA app          00 11 001d0000 001c0000
I (96) boot:  4 nvs              WiFi data        01 02 00390000 0006d000
I (103) boot: End of partition table
I (108) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=43eb0h (278192) map
I (217) esp_image: segment 1: paddr=00053ed8 vaddr=3ffb0000 size=050cch ( 20684) load
I (225) esp_image: segment 2: paddr=00058fac vaddr=40080000 size=0706ch ( 28780) load
I (237) esp_image: segment 3: paddr=00060020 vaddr=400d0020 size=11f598h (1176984) map
I (663) esp_image: segment 4: paddr=0017f5c0 vaddr=4008706c size=16f44h ( 94020) load
I (717) boot: Loaded app from partition at offset 0x10000
I (717) boot: Disabling RNG early entropy source...
I (728) cpu_start: Multicore app
I (729) cpu_start: Pro cpu up.
I (729) cpu_start: Starting app cpu, entry point is 0x400824f8
I (719) cpu_start: App cpu up.
I (749) cpu_start: Pro cpu start user code
I (749) cpu_start: cpu freq: 160000000
I (749) cpu_start: Application information:
I (753) cpu_start: Project name:     termostato-lavanderia
I (760) cpu_start: App version:      2024.5.0
I (765) cpu_start: Compile time:     May 22 2024 11:52:30
I (771) cpu_start: ELF file SHA256:  ece23fc63ca6de22...
I (777) cpu_start: ESP-IDF:          4.4.7
I (782) cpu_start: Min chip rev:     v0.0
I (786) cpu_start: Max chip rev:     v3.99 
I (791) cpu_start: Chip rev:         v3.0

assert failed: s_prepare_reserved_regions memory_layout_utils.c:100 (reserved[i + 1].start > reserved[i].start)

Backtrace: 0x40082e52:0x3ffe3390 0x400920f5:0x3ffe33b0 0x40098339:0x3ffe33d0 0x40156a56:0x3ffe34f0 0x40156676:0x3ffe3850 0x401545ef:0x3ffe3c00 0x40082885:0x3ffe3c40 0x4007959c:0x3ffe3c80 |<-CORRUPTED

It is not related to my device as it does not use this project but googling i found another configuration and several users reporting it here.

As long as I remove the following package configuration device boots normally:

esp32_ble_tracker:

sensor:
  - platform: xiaomi_hhccjcy01
    mac_address: $mifloramac
    temperature:
      name: "Xiaomi $mifloramac Temperature"
    moisture:
      name: "Xiaomi $mifloramac Moisture"
    illuminance:
      name: "Xiaomi $mifloramac Illuminance"
    conductivity:
      name: "Xiaomi $mifloramac Soil Conductivity"
    battery_level:
      name: "Xiaomi $mifloramac Battery Level"

Which version of ESPHome has the issue?

2024.5.2

What type of installation are you using?

Home Assistant Add-on

Which version of Home Assistant has the issue?

2024.5

What platform are you using?

ESP32-IDF

Board

esp32dev

Component causing the issue

esp32_ble_tracker

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

i've tried also arduino but unfortunately my configuration forbids me to use the arduino framework due to size restrictions

Sleeper85 commented 1 month ago

Add this option before flashing : board_build.flash_mode:dio

esphome:
  platformio_options:
    board_build.flash_mode: dio # Standard uses a single line for data, Dual IO uses 2 lines for data (prevent reboot loop)