Closed doonga closed 2 months ago
The working yaml got mangled there here it is again:
substitutions:
name: bluetooth-proxy-office
friendly_name: bluetooth-proxy-office
esphome:
name: ${name}
friendly_name: ${friendly_name}
name_add_mac_suffix: false
project:
name: esphome.bluetooth-proxy
version: "1.0"
esp32:
board: esp32-poe-iso
framework:
type: esp-idf
ethernet:
type: LAN8720
mdc_pin: GPIO23
mdio_pin: GPIO18
clk_mode: GPIO17_OUT
phy_addr: 0
power_pin: GPIO12
api:
encryption:
key: !secret bluetooth_proxy_office_api_key
logger:
ota:
- platform: esphome
id: ota_esphome
dashboard_import:
package_import_url: github://esphome/bluetooth-proxies/olimex-esp32-poe-iso.yaml@main
esp32_ble_tracker:
scan_parameters:
interval: 1100ms
window: 1100ms
active: true
bluetooth_proxy:
active: true
button:
- platform: safe_mode
name: Safe Mode Boot
entity_category: diagnostic
If you can plug the device directly into what is running HA and get the serial logs that way, then esphome will decode that stack trace.
Thanks! Here's the output with the stack trace decoded.
INFO ESPHome 2024.7.2
INFO Reading configuration /config/esphome/bluetooth-proxy-gameroom.yaml...
WARNING GPIO12 is a strapping PIN and should only be used for I/O with care.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
INFO Generating C++ source...
INFO Compiling app...
Processing bluetooth-proxy-gameroom (board: esp32-poe-iso; framework: espidf; platform: platformio/espressif32@5.4.0)
--------------------------------------------------------------------------------
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
- framework-espidf @ 3.40407.240606 (4.4.7)
- tool-cmake @ 3.16.4
- tool-ninja @ 1.7.1
- toolchain-esp32ulp @ 2.35.0-20220830
- toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
Reading CMake configuration...
Dependency Graph
|-- noise-c @ 0.1.4
|-- ArduinoJson @ 6.18.5
RAM: [== ] 16.2% (used 53140 bytes from 327680 bytes)
Flash: [======= ] 74.1% (used 1360561 bytes from 1835008 bytes)
========================= [SUCCESS] Took 10.71 seconds =========================
INFO Successfully compiled program.
esptool.py v4.7.0
Serial port /dev/ttyUSB0
Connecting....
Chip is ESP32-D0WD-V3 (revision v3.0)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 24:4c:ab:06:2e:0c
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Auto-detected Flash size: 4MB
Flash will be erased from 0x00010000 to 0x0015dfff...
Flash will be erased from 0x00001000 to 0x00007fff...
Flash will be erased from 0x00008000 to 0x00008fff...
Flash will be erased from 0x00009000 to 0x0000afff...
Compressed 1367136 bytes to 881959...
Wrote 1367136 bytes (881959 compressed) at 0x00010000 in 22.3 seconds (effective 490.2 kbit/s)...
Hash of data verified.
Compressed 25632 bytes to 16090...
Wrote 25632 bytes (16090 compressed) at 0x00001000 in 0.9 seconds (effective 238.2 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 134...
Wrote 3072 bytes (134 compressed) at 0x00008000 in 0.1 seconds (effective 349.5 kbit/s)...
Hash of data verified.
Compressed 8192 bytes to 31...
Wrote 8192 bytes (31 compressed) at 0x00009000 in 0.1 seconds (effective 458.6 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting via RTS pin...
INFO Successfully uploaded program.
INFO Starting log output from /dev/ttyUSB0 with baud rate 115200
[10:12:45]x\xf8\x80xU\x94\xf59}IMQ\xa5,boot:0x1b (SPI_FAST_FLASH_BOOT)
[10:12:45]configsip: 0, SPIWP:0xee
[10:12:45]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[10:12:45]mode:DIO, clock div:2
[10:12:45]load:0x3fff0030,len:6652
[10:12:45]ho 0 tail 12 room 4
[10:12:45]load:0x40078000,len:15052
[10:12:45]load:0x40080400,len:3836
[10:12:45]entry 0x4008069c
[10:12:45]I (29) boot: ESP-IDF 4.4.7 2nd stage bootloader
[10:12:45]I (29) boot: compile time 10:05:03
[10:12:46]I (29) boot: Multicore bootloader
[10:12:46]I (32) boot: chip revision: v3.0
[10:12:46]I (36) boot.esp32: SPI Speed : 40MHz
[10:12:46]I (41) boot.esp32: SPI Mode : DIO
[10:12:46]I (45) boot.esp32: SPI Flash Size : 4MB
[10:12:46]I (50) boot: Enabling RNG early entropy source...
[10:12:46]I (55) boot: Partition Table:
[10:12:46]I (59) boot: ## Label Usage Type ST Offset Length
[10:12:46]I (66) boot: 0 otadata OTA data 01 00 00009000 00002000
[10:12:46]I (74) boot: 1 phy_init RF data 01 01 0000b000 00001000
[10:12:46]I (81) boot: 2 app0 OTA app 00 10 00010000 001c0000
[10:12:46]I (89) boot: 3 app1 OTA app 00 11 001d0000 001c0000
[10:12:46]I (96) boot: 4 nvs WiFi data 01 02 00390000 0006d000
[10:12:46]I (104) boot: End of partition table
[10:12:46]I (108) boot: No factory image, trying OTA 0
[10:12:46]I (113) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=4c5d8h (312792) map
[10:12:46]I (234) esp_image: segment 1: paddr=0005c600 vaddr=3ffbdb60 size=03a18h ( 14872) load
[10:12:46]I (240) esp_image: segment 2: paddr=00060020 vaddr=400d0020 size=e3b1ch (932636) map
[10:12:46]I (578) esp_image: segment 3: paddr=00143b44 vaddr=3ffc1578 size=01214h ( 4628) load
[10:12:46]I (580) esp_image: segment 4: paddr=00144d60 vaddr=40080000 size=18ed8h (102104) load
[10:12:46]I (638) boot: Loaded app from partition at offset 0x10000
[10:12:46]I (703) boot: Set actual ota_seq=1 in otadata[0]
[10:12:46]I (703) boot: Disabling RNG early entropy source...
[10:12:46]I (714) cpu_start: Multicore app
[10:12:46]I (714) cpu_start: Pro cpu up.
[10:12:46]I (715) cpu_start: Starting app cpu, entry point is 0x4008222c
[10:12:46]I (0) cpu_start: App cpu up.
[10:12:46]I (735) cpu_start: Pro cpu start user code
[10:12:46]I (735) cpu_start: cpu freq: 160000000
[10:12:46]I (735) cpu_start: Application information:
[10:12:46]I (739) cpu_start: Project name: bluetooth-proxy-gameroom
[10:12:46]I (746) cpu_start: App version: 2024.7.2
[10:12:46]I (751) cpu_start: Compile time: Jul 26 2024 10:04:12
[10:12:46]I (757) cpu_start: ELF file SHA256: f88c4d1a7784cb6b...
[10:12:46]I (763) cpu_start: ESP-IDF: 4.4.7
[10:12:46]I (767) cpu_start: Min chip rev: v0.0
[10:12:46]I (772) cpu_start: Max chip rev: v3.99
[10:12:46]I (777) cpu_start: Chip rev: v3.0
[10:12:46]I (782) heap_init: Initializing. RAM available for dynamic allocation:
[10:12:46]I (789) heap_init: At 3FFAFF10 len 000000F0 (0 KiB): DRAM
[10:12:46]I (795) heap_init: At 3FFB6388 len 00001C78 (7 KiB): DRAM
[10:12:46]I (801) heap_init: At 3FFB9A20 len 00004108 (16 KiB): DRAM
[10:12:46]I (807) heap_init: At 3FFCAAF8 len 00015508 (85 KiB): DRAM
[10:12:46]I (813) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
[10:12:46]I (820) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
[10:12:46]I (826) heap_init: At 40098ED8 len 00007128 (28 KiB): IRAM
[10:12:46]I (834) spi_flash: detected chip: generic
[10:12:46]I (837) spi_flash: flash io: dio
[10:12:46]I (843) cpu_start: Starting scheduler on PRO CPU.
[10:12:46]I (0) cpu_start: Starting scheduler on APP CPU.
[10:12:47][I][logger:156]: Log initialized
[10:12:47][C][safe_mode:079]: There have been 0 suspected unsuccessful boot attempts
[10:12:47][D][esp32.preferences:114]: Saving 1 preferences to flash...
[10:12:47][D][esp32.preferences:143]: Saving 1 preferences to flash: 0 cached, 1 written, 0 failed
[10:12:47][I][app:029]: Running through setup()...
[10:12:47][C][esp32_ble:032]: Setting up BLE...
[10:12:47][C][ethernet:041]: Setting up Ethernet...
[10:12:47][D][esp-idf:000]: I (1916) system_api: Base MAC address is not set
[10:12:47]
[10:12:47][D][esp-idf:000]: I (1916) system_api: read default base MAC address from EFUSE
[10:12:47]
[10:12:47][D][esp-idf:000]: I (1937) esp_eth.netif.netif_glue: 24:4c:ab:06:2e:0f
[10:12:47]
[10:12:47][D][esp-idf:000]: I (1938) esp_eth.netif.netif_glue: ethernet attached to netif
[10:12:47]
[10:12:49][D][esp32_ble:279]: Enabling BLE...
[10:12:49][D][esp-idf:000]: I (3642) BTDM_INIT: BT controller compile version [0f0c5a2]
[10:12:49]
[10:12:49][D][esp-idf:000][btController]: I (3644) BTDM_INIT: Bluetooth MAC: 24:4c:ab:06:2e:0e
[10:12:49]
[10:12:49][D][esp-idf:000]: I (3647) phy_init: phy_version 4791,2c4672b,Dec 20 2023,16:06:06
[10:12:49]
[10:12:49][D][esp32_ble_tracker:270]: Starting scan...
[10:12:49][I][ethernet:236]: Starting ethernet connection
[10:12:49][W][component:157]: Component ethernet set Warning flag: waiting for IP configuration
[10:12:55][D][esp-idf:000][sys_evt]: I (10141) esp_netif_handlers: eth ip: 10.1.4.15, mask: 255.255.254.0, gw: 10.1.4.1
[10:12:55]
[10:12:55][I][ethernet:247]: Connected via Ethernet!
[10:12:55][C][ethernet:492]: IP Address: 10.1.4.15
[10:12:55][C][ethernet:493]: Hostname: 'bluetooth-proxy-gameroom-062e0c'
[10:12:55][C][ethernet:494]: Subnet: 255.255.254.0
[10:12:55][C][ethernet:495]: Gateway: 10.1.4.1
[10:12:55][C][ethernet:500]: DNS1: 10.1.4.1
[10:12:55][C][ethernet:501]: DNS2: 0.0.0.0
[10:12:55][C][ethernet:513]: MAC Address: 24:4C:AB:06:2E:0C
[10:12:55][C][ethernet:514]: Is Full Duplex: YES
[10:12:55][C][ethernet:515]: Link Speed: 100
[10:12:55][W][component:170]: Component ethernet cleared Warning flag
[10:12:55][C][api:025]: Setting up Home Assistant API server...
[10:12:55][I][app:062]: setup() finished successfully!
[10:12:56][D][esp-idf:000]: I (10706) esp-x509-crt-bundle: Certificate validated
[10:12:56]
[10:12:56]
[10:12:56]abort() was called at PC 0x4019563a on core 0
[10:12:56]
[10:12:56]
[10:12:56]Backtrace: 0x40082c4a:0x3ffdad30 0x40091a49:0x3ffdad50 0x400963a2:0x3ffdad70 0x4019563a:0x3ffdade0 0x401944af:0x3ffdae00 0x40194416:0x3ffdae20 0x400db2a9:0x3ffdae40 0x400ea399:0x3ffdae60 0x400eaccc:0x3ffdae80 0x40113e3a:0x3ffdaea0 0x40113dd7:0x3ffdaec0
WARNING Found stack trace! Trying to decode it
WARNING Decoded 0x40082c4a: panic_abort at /data/cache/platformio/packages/framework-espidf/components/esp_system/panic.c:408
WARNING Decoded 0x40091a49: esp_system_abort at /data/cache/platformio/packages/framework-espidf/components/esp_system/esp_system.c:137
WARNING Decoded 0x400963a2: abort at /data/cache/platformio/packages/framework-espidf/components/newlib/abort.c:46
WARNING Decoded 0x4019563a: __wrap__Unwind_Resume_or_Rethrow
WARNING Decoded 0x401944af: __cxa_throw at /builds/idf/crosstool-NG/.build/xtensa-esp32-elf/src/gcc/libstdc++-v3/libsupc++/eh_throw.cc:90
WARNING Decoded 0x40194416: operator new(unsigned int) at /builds/idf/crosstool-NG/.build/xtensa-esp32-elf/src/gcc/libstdc++-v3/libsupc++/new_op.cc:54
WARNING Decoded 0x400db2a9: esphome::esp32_ble::ESP32BLE::gap_event_handler(esp_gap_ble_cb_event_t, esp_ble_gap_cb_param_t*) at /data/build/bluetooth-proxy-gameroom/src/esphome/components/esp32_ble/ble.cpp:318
WARNING Decoded 0x400ea399: btc_gap_ble_cb_to_app at /data/cache/platformio/packages/framework-espidf/components/bt/host/bluedroid/btc/profile/std/gap/btc_gap_ble.c:70
WARNING Decoded 0x400eaccc: btc_gap_ble_adv_pkt_handler at /data/cache/platformio/packages/framework-espidf/components/bt/host/bluedroid/btc/profile/std/gap/btc_gap_ble.c:625
WARNING Decoded 0x40113e3a: osi_thread_generic_event_handler at /data/cache/platformio/packages/framework-espidf/components/bt/common/osi/thread.c:425
(inlined by) osi_thread_generic_event_handler at /data/cache/platformio/packages/framework-espidf/components/bt/common/osi/thread.c:418
WARNING Decoded 0x40113dd7: osi_thread_run at /data/cache/platformio/packages/framework-espidf/components/bt/common/osi/thread.c:165
[10:12:56]
[10:12:56]
[10:12:56]
[10:12:56]
[10:12:56]ELF file SHA256: f88c4d1a7784cb6b
[10:12:56]
[10:12:56]Rebooting...
It's running out of RAM.
Oh, hah ok. I'll buy the ones with more RAM on them. Thank you!
Every ESP32 of the same type has the same amount of RAM. I haven't checked if the newer variants have more RAM than the original ESP32. If you're using BLE, then getting one with PSRAM might help.
Ya you're right, I got confused with the storage space, not ram. I'll check into that, thank you again!
I was having the same issue. For anyone else, you can try disabling mdns and using a static IP. This allowed just enough RAM for my board to not crash:
manual_ip:
static_ip: 192.168.1.???
gateway: 192.168.1.1
subnet: 255.255.255.0
mdns:
disabled: true
The problem
I tried flashing a ESP32-POE-ISO-EA as a bluetooth proxy using the web installer. The flash succeeds but then the device starts to boot loop. If I go back to the older yaml that I was using (from the old firmware repo) it starts working again. I don't see anything particularly noteworthy in the logs but I will attach them.
I have 2 of these and tried it on both with the same result so I don't believe I have a hardware problem.
Which version of ESPHome has the issue?
2024.7.2
What type of installation are you using?
Home Assistant Add-on
Which version of Home Assistant has the issue?
No response
What platform are you using?
ESP8266
Board
Olimex
Component causing the issue
No response
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information
This is the older yaml that works fine: substitutions: name: bluetooth-proxy-office friendly_name: bluetooth-proxy-office
esphome: name: ${name} friendly_name: ${friendly_name} name_add_mac_suffix: false project: name: esphome.bluetooth-proxy version: "1.0"
esp32: board: esp32-poe-iso framework: type: esp-idf
ethernet: type: LAN8720 mdc_pin: GPIO23 mdio_pin: GPIO18 clk_mode: GPIO17_OUT phy_addr: 0 power_pin: GPIO12
api: encryption: key: !secret bluetooth_proxy_office_api_key logger: ota:
dashboard_import: package_import_url: github://esphome/bluetooth-proxies/olimex-esp32-poe-iso.yaml@main
esp32_ble_tracker: scan_parameters: interval: 1100ms window: 1100ms active: true
bluetooth_proxy: active: true
button: