syssi / esphome-jk-bms

ESPHome component to monitor and control a Jikong Battery Management System (JK-BMS) via UART-TTL or BLE
Apache License 2.0
474 stars 161 forks source link

Connection issues #205

Closed markusgg84 closed 2 years ago

markusgg84 commented 2 years ago

I'm trying to connect to 2 JKBMS but i've connection issues. I've double checked the wifi and ble mac adresses. I've started from the esp32-ble-example-multiple-devices.yaml

Log Output:

INFO Successfully uploaded program.
INFO Starting log output from /dev/ttyUSB0 with baud rate 115200
[12:06:46]\xff[I][logger:243]: Log initialized
[12:06:46][C][ota:465]: There have been 0 suspected unsuccessful boot attempts.
[12:06:46][D][esp32.preferences:113]: Saving 1 preferences to flash...
[12:06:46][D][esp32.preferences:142]: Saving 1 preferences to flash: 0 cached, 1 written, 0 failed
[12:06:46][I][app:029]: Running through setup()...
[12:06:47][D][esp32_ble_tracker:264]: Starting scan...
[12:06:47][C][wifi:037]: Setting up WiFi...
[12:06:47][D][esp-idf:000]: E (2055) wifi:
[12:06:47][D][esp-idf:000]: Expected to init 16 rx buffer, actual is 3
[12:06:47][D][esp-idf:000]:
[12:06:47]
[12:06:47][E][WiFiGeneric.cpp:137] wifiLowLevelInit(): esp_wifi_init 257
[12:06:47][W][wifi_esp32:057]: Setting WiFi mode failed!
[12:06:47][D][wifi:384]: Starting scan...
[12:06:47][D][esp-idf:000]: E (2097) wifi:
[12:06:47][D][esp-idf:000]: Expected to init 16 rx buffer, actual is 0
[12:06:47][D][esp-idf:000]:
[12:06:47]
[12:06:47][E][WiFiGeneric.cpp:137] wifiLowLevelInit(): esp_wifi_init 257
[12:06:47][W][wifi_esp32:057]: Setting WiFi mode failed!
[12:06:47][W][jk_bms_ble:342]: [c8:47:8c:e5:04:89] Not connected
[12:06:47][W][jk_bms_ble:342]: [c8:47:8c:e5:1c:74] Not connected
[12:06:47][D][switch:037]: 'jk-bms-links enable bluetooth connection': Sending state ON
[12:06:47][D][switch:037]: 'jk-bms-rechts enable bluetooth connection': Sending state ON
[12:06:47][D][esp32_ble_client:036]: Found device at MAC address [C8:47:8C:E5:04:89]
[12:06:47][I][esp32_ble_client:058]: Attempting BLE connection to c8:47:8c:e5:04:89
[12:06:50][W][jk_bms_ble:342]: [c8:47:8c:e5:04:89] Not connected
[12:06:51][W][jk_bms_ble:342]: [c8:47:8c:e5:1c:74] Not connected
[12:06:55][W][jk_bms_ble:342]: [c8:47:8c:e5:04:89] Not connected
[12:06:56][W][jk_bms_ble:342]: [c8:47:8c:e5:1c:74] Not connected
[12:07:00][W][jk_bms_ble:342]: [c8:47:8c:e5:04:89] Not connected
[12:07:01][W][jk_bms_ble:342]: [c8:47:8c:e5:1c:74] Not connected
[12:07:05][W][jk_bms_ble:342]: [c8:47:8c:e5:04:89] Not connected
[12:07:06][W][jk_bms_ble:342]: [c8:47:8c:e5:1c:74] Not connected
[12:07:10][W][jk_bms_ble:342]: [c8:47:8c:e5:04:89] Not connected
[12:07:11][W][jk_bms_ble:342]: [c8:47:8c:e5:1c:74] Not connected
[12:07:15][W][jk_bms_ble:342]: [c8:47:8c:e5:04:89] Not connected
[12:07:16][W][jk_bms_ble:342]: [c8:47:8c:e5:1c:74] Not connected
[12:07:17][E][wifi:392]: Scan timeout!
[12:07:20][W][jk_bms_ble:342]: [c8:47:8c:e5:04:89] Not connected

First part of the config file:

substitutions:
  name: jk-bms
  bms0: "${name}-links"
  bms1: "${name}-rechts"
  device_description: "Monitor and control a JK-BMS via bluetooth"
  external_components_source: github://syssi/esphome-jk-bms@main
  bms0_mac_address: C8:47:8C:E5:04:89
  bms1_mac_address: C8:47:8C:E5:1C:74
  bms0_protocol_version: JK02
  bms1_protocol_version: JK02

esphome:
  name: ${name}
  comment: ${device_description}
  project:
    name: "syssi.esphome-jk-bms"
    version: 1.3.0

esp32:
  board: ttgo-lora32-v1
  framework:
   type: arduino
   version: latest
syssi commented 2 years ago

It looks like multiple BLE client connection are broken ESPHome 2022.9.3. See https://github.com/syssi/esphome-jk-bms/issues/189

Could you try this workaround: https://github.com/syssi/esphome-jk-bms/issues/189#issuecomment-1274756531

And please try to use the ESP-IDF framework instead of Arduino:

  framework:
    type: esp-idf
    version: latest

To better isolate the error you could start with a single BLE connection / BMS.

markusgg84 commented 2 years ago

Didn't help, here is the log output:

`

[14:36:23][W][jk_bms_ble:291]: [c8:47:8c:e5:04:89] Not connected [14:36:23][W][jk_bms_ble:291]: [c8:47:8c:e5:1c:74] Not connected [14:36:23][D][esp-idf:000]: I (5850) wifi: [14:36:23][D][esp-idf:000]: state: init -> auth (b0) [14:36:23][D][esp-idf:000]: [14:36:23] [14:36:23][D][esp-idf:000]: I (5861) wifi: [14:36:23][D][esp-idf:000]: state: auth -> assoc (0) [14:36:23][D][esp-idf:000]: [14:36:23] [14:36:23][D][esp-idf:000]: I (5875) wifi: [14:36:23][D][esp-idf:000]: state: assoc -> run (10) [14:36:23][D][esp-idf:000]: [14:36:23] [14:36:23][D][esp-idf:000]: I (5905) wifi: [14:36:23][D][esp-idf:000]: connected with MGG, aid = 2, channel 11, BW20, bssid = 44:4e:6d:6c:f7:70 [14:36:23][D][esp-idf:000]: [14:36:23] [14:36:23][D][esp-idf:000]: I (5906) wifi: [14:36:23][D][esp-idf:000]: security: WPA2-PSK, phy: bgn, rssi: -28 [14:36:23][D][esp-idf:000]: [14:36:23] [14:36:23][D][esp-idf:000]: I (5909) wifi: [14:36:23][D][esp-idf:000]: pm start, type: 1 [14:36:23] [14:36:23][D][esp-idf:000]: [14:36:23] [14:36:23][D][esp-idf:000]: I (5924) wifi: [14:36:23][D][esp-idf:000]: AP's beacon interval = 102400 us, DTIM period = 1 [14:36:23][D][esp-idf:000]: [14:36:23] [14:36:23][D][esp-idf:000]: W (5942) wifi: [14:36:23][D][esp-idf:000]: idx:0 (ifx:0, 44:4e:6d:6c:f7:70), tid:6, ssn:2, winSize:64 [14:36:23][D][esp-idf:000]: [14:36:23] [14:36:23][D][esp32_ble_tracker:731]: Found device 4D:4D:4D:05:5A:BD RSSI=-82 [14:36:23][D][esp32_ble_tracker:752]: Address Type: RANDOM [14:36:24][D][esp-idf:000]: I (6605) esp_netif_handlers: sta ip: 192.168.188.163, mask: 255.255.255.0, gw: 192.168.188.1 [14:36:24] [14:36:24][C][wifi:353]: Local MAC: 50:02:91:97:A2:40

[14:36:24][C][wifi:355]: IP Address: 192.168.188.163 [14:36:24][C][wifi:357]: BSSID: 44:4E:6D:6C:F7:70

[14:36:24][C][wifi:360]: Signal strength: -28 dB ▂▄▆█ [14:36:24][C][wifi:364]: Channel: 11 [14:36:24][C][wifi:365]: Subnet: 255.255.255.0 [14:36:24][C][wifi:366]: Gateway: 192.168.188.1 [14:36:24][C][wifi:367]: DNS1: 192.168.188.1 [14:36:24][C][wifi:368]: DNS2: 0.0.0.0 [14:36:24][C][ota:085]: Over-The-Air Updates: [14:36:24][C][ota:086]: Address: jk-bms.local:3232 [14:36:24][W][ota:095]: Last Boot was an unhandled reset, will proceed to safe mode in 8 restarts [14:36:24][C][api:025]: Setting up Home Assistant API server... [14:36:24][C][mqtt:029]: Setting up MQTT... [14:36:24][I][mqtt:176]: Connecting to MQTT... [14:36:24][D][esp-idf:000]: W (6689) wifi: [14:36:24][D][esp-idf:000]: idx:1 (ifx:0, 44:4e:6d:6c:f7:70), tid:0, ssn:0, winSize:64 [14:36:24][D][esp-idf:000]: [14:36:24] [14:36:24][I][mqtt:216]: MQTT Connected! [14:36:24] [14:36:24]abort() was called at PC 0x401b2c86 on core 1 [14:36:24] [14:36:24]Backtrace:0x40081d4e:0x3ffcdf80 0x40090d89:0x3ffcdfa0 0x40096e32:0x3ffcdfc0 0x401b2c86:0x3ffce030 0x401b1b3b:0x3ffce050 0x401b1aa2:0x3ffce070 0x401b1cf1:0x3ffce090 0x401b1e34:0x3ffce0b0 0x401b1fb1:0x3ffce0f0 0x400e07b7:0x3ffce110 0x400e07f7:0x3ffce130 0x400e0a4a:0x3ffce150 0x400e0a26:0x3ffce170 0x400e0a26:0x3ffce190 0x400e0b5d:0x3ffce1b0 0x400e32bd:0x3ffce230 0x400e3a42:0x3ffce270 0x400e3a87:0x3ffce2c0 0x401c9c25:0x3ffce2e0 0x400ea080:0x3ffce300 0x400f6ef1:0x3ffce330 0x400d840b:0x3ffce400 WARNING Found stack trace! Trying to decode it WARNING Decoded 0x40081d4e: panic_abort at /root/.platformio/packages/framework-espidf/components/esp_system/panic.c:404 WARNING Decoded 0x40090d89: esp_system_abort at /root/.platformio/packages/framework-espidf/components/esp_system/system_api.c:112 WARNING Decoded 0x40096e32: abort at /root/.platformio/packages/framework-espidf/components/newlib/abort.c:46 WARNING Decoded 0x401b2c86: wrapUnwind_Resume_or_Rethrow WARNING Decoded 0x401b1b3b: cxa_throw at /builds/idf/crosstool-NG/.build/xtensa-esp32-elf/src/gcc/libstdc++-v3/libsupc++/eh_throw.cc:90 WARNING Decoded 0x401b1aa2: operator new(unsigned int) at /builds/idf/crosstool-NG/.build/xtensa-esp32-elf/src/gcc/libstdc++-v3/libsupc++/new_op.cc:54 WARNING Decoded 0x401b1cf1: __gnu_cxx::new_allocator::allocate(unsigned int, void const*) at /builds/idf/crosstool-NG/.build/xtensa-esp32-elf/build/build-cc-gcc-final/xtensa-esp32-elf/no-rtti/libstdc++-v3/include/ext/new_allocator.h:111 (inlined by) std::allocator_traits<std::allocator >::allocate(std::allocator&, unsigned int) at /builds/idf/crosstool-NG/.build/xtensa-esp32-elf/build/build-cc-gcc-final/xtensa-esp32-elf/no-rtti/libstdc++-v3/include/bits/alloc_traits.h:436 (inlined by) std::cxx11::basic_string<char, std::char_traits, std::allocator >::_M_create(unsigned int&, unsigned int) at /builds/idf/crosstool-NG/.build/xtensa-esp32-elf/build/build-cc-gcc-final/xtensa-esp32-elf/no-rtti/libstdc++-v3/include/bits/basic_string.tcc:153 WARNING Decoded 0x401b1e34: std::cxx11::basic_string<char, std::char_traits, std::allocator >::_M_mutate(unsigned int, unsigned int, char const, unsigned int) at /builds/idf/crosstool-NG/.build/xtensa-esp32-elf/build/build-cc-gcc-final/xtensa-esp32-elf/no-rtti/libstdc++-v3/include/bits/basic_string.tcc:317 WARNING Decoded 0x401b1fb1: std::cxx11::basic_string<char, std::char_traits, std::allocator >::push_back(char) at /builds/idf/crosstool-NG/.build/xtensa-esp32-elf/build/build-cc-gcc-final/xtensa-esp32-elf/no-rtti/libstdc++-v3/include/bits/basic_string.h:1353 WARNING Decoded 0x400e07b7: std::cxx11::basic_string<char, std::char_traits, std::allocator >::operator+=(char) at /root/.platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/basic_string.h:1188 (inlined by) ArduinoJson6185_71::Writer<std::cxx11::basic_string<char, std::char_traits, std::allocator >, void>::write(unsigned char) at /config/esphome-jk-bms/.esphome/build/jk-bms/.piolibdeps/jk-bms/ArduinoJson/src/ArduinoJson/Serialization/Writers/StdStringWriter.hpp:28 (inlined by) ArduinoJson6185_71::CountingDecorator<ArduinoJson6185_71::Writer<std::cxx11::basic_string<char, std::char_traits, std::allocator >, void> >::write(unsigned char) at /config/esphome-jk-bms/.esphome/build/jk-bms/.piolibdeps/jk-bms/ArduinoJson/src/ArduinoJson/Serialization/CountingDecorator.hpp:17 WARNING Decoded 0x400e07f7: ArduinoJson6185_71::TextFormatter<ArduinoJson6185_71::Writer<std::cxx11::basic_string<char, std::char_traits, std::allocator >, void> >::writeRaw(char) at /config/esphome-jk-bms/.esphome/build/jk-bms/.piolibdeps/jk-bms/ArduinoJson/src/ArduinoJson/Json/TextFormatter.hpp:153 (inlined by) ArduinoJson6185_71::TextFormatter<ArduinoJson6185_71::Writer<std::cxx11::basic_string<char, std::char_traits, std::allocator >, void> >::writeChar(char) at /config/esphome-jk-bms/.esphome/build/jk-bms/.piolibdeps/jk-bms/ArduinoJson/src/ArduinoJson/Json/TextFormatter.hpp:50 (inlined by) ArduinoJson6185_71::TextFormatter<ArduinoJson6185_71::Writer<std::__cxx11::basic_string<char, std::char_traits, std::allocator >, void> >::writeString(char const) at /config/esphome-jk-bms/.esphome/build/jk-bms/.piolibdeps/jk-bms/ArduinoJson/src/ArduinoJson/Json/TextFormatter.hpp:40 WARNING Decoded 0x400e0a4a: ArduinoJson6185_71::JsonSerializer<ArduinoJson6185_71::Writer<std::cxx11::basic_string<char, std::char_traits, std::allocator >, void> >::visitString(char const*) at /config/esphome-jk-bms/.esphome/build/jk-bms/.piolibdeps/jk-bms/ArduinoJson/src/ArduinoJson/Json/JsonSerializer.hpp:67 (inlined by) ArduinoJson6185_71::JsonSerializer<ArduinoJson6185_71::Writer<std::cxx11::basic_string<char, std::char_traits, std::allocator >, void> >::result_type ArduinoJson6185_71::VariantData::accept<ArduinoJson6185_71::JsonSerializer<ArduinoJson6185_71::Writer<std::cxx11::basic_string<char, std::char_traits, std::allocator >, void> > >(ArduinoJson6185_71::JsonSerializer<ArduinoJson6185_71::Writer<std::cxx11::basic_string<char, std::char_traits, std::allocator >, void> >&) const at /config/esphome-jk-bms/.esphome/build/jk-bms/.piolibdeps/jk-bms/ArduinoJson/src/ArduinoJson/Variant/VariantData.hpp:53 WARNING Decoded 0x400e0a26: ArduinoJson6185_71::JsonSerializer<ArduinoJson6185_71::Writer<std::__cxx11::basic_string<char, std::char_traits, std::allocator >, void> >::visitObject(ArduinoJson6185_71::CollectionData const&) at /config/esphome-jk-bms/.esphome/build/jk-bms/.piolibdeps/jk-bms/ArduinoJson/src/ArduinoJson/Json/JsonSerializer.hpp:48 (inlined by) ArduinoJson6185_71::JsonSerializer<ArduinoJson6185_71::Writer<std::cxx11::basic_string<char, std::char_traits, std::allocator >, void> >::result_type ArduinoJson6185_71::VariantData::accept<ArduinoJson6185_71::JsonSerializer<ArduinoJson6185_71::Writer<std::cxx11::basic_string<char, std::char_traits, std::allocator >, void> > >(ArduinoJson6185_71::JsonSerializer<ArduinoJson6185_71::Writer<std::cxx11::basic_string<char, std::char_traits, std::allocator >, void> >&) const at /config/esphome-jk-bms/.esphome/build/jk-bms/.piolibdeps/jk-bms/ArduinoJson/src/ArduinoJson/Variant/VariantData.hpp:49 WARNING Decoded 0x400e0a26: ArduinoJson6185_71::JsonSerializer<ArduinoJson6185_71::Writer<std::cxx11::basic_string<char, std::char_traits, std::allocator >, void> >::visitObject(ArduinoJson6185_71::CollectionData const&) at /config/esphome-jk-bms/.esphome/build/jk-bms/.piolibdeps/jk-bms/ArduinoJson/src/ArduinoJson/Json/JsonSerializer.hpp:48 (inlined by) ArduinoJson6185_71::JsonSerializer<ArduinoJson6185_71::Writer<std::cxx11::basic_string<char, std::char_traits, std::allocator >, void> >::result_type ArduinoJson6185_71::VariantData::accept<ArduinoJson6185_71::JsonSerializer<ArduinoJson6185_71::Writer<std::cxx11::basic_string<char, std::char_traits, std::allocator >, void> > >(ArduinoJson6185_71::JsonSerializer<ArduinoJson6185_71::Writer<std::cxx11::basic_string<char, std::char_traits, std::allocator >, void> >&) const at /config/esphome-jk-bms/.esphome/build/jk-bms/.piolibdeps/jk-bms/ArduinoJson/src/ArduinoJson/Variant/VariantData.hpp:49 WARNING Decoded 0x400e0b5d: ArduinoJson6185_71::JsonSerializer<ArduinoJson6185_71::Writer<std::cxx11::basic_string<char, std::char_traits, std::allocator >, void> >::result_type ArduinoJson6185_71::variantAccept<ArduinoJson6185_71::JsonSerializer<ArduinoJson6185_71::Writer<std::__cxx11::basic_string<char, std::char_traits, std::allocator >, void> > >(ArduinoJson6185_71::VariantData const*, ArduinoJson6185_71::JsonSerializer<ArduinoJson6185_71::Writer<std::cxx11::basic_string<char, std::char_traits, std::allocator >, void> >&) at /config/esphome-jk-bms/.esphome/build/jk-bms/.piolibdeps/jk-bms/ArduinoJson/src/ArduinoJson/Variant/VariantFunctions.hpp:16 (inlined by) ArduinoJson6185_71::JsonSerializer<ArduinoJson6185_71::Writer<std::cxx11::basic_string<char, std::char_traits, std::allocator >, void> >::result_type ArduinoJson6185_71::VariantConstRef::accept<ArduinoJson6185_71::JsonSerializer<ArduinoJson6185_71::Writer<std::cxx11::basic_string<char, std::char_traits, std::allocator >, void> > >(ArduinoJson6185_71::JsonSerializer<ArduinoJson6185_71::Writer<std::cxx11::basic_string<char, std::char_traits, std::allocator >, void> >&) const at /config/esphome-jk-bms/.esphome/build/jk-bms/.piolibdeps/jk-bms/ArduinoJson/src/ArduinoJson/Variant/VariantRef.hpp:245 (inlined by) ArduinoJson6185_71::JsonSerializer<ArduinoJson6185_71::Writer<std::cxx11::basic_string<char, std::char_traits, std::allocator >, void> >::result_type ArduinoJson6185_71::JsonDocument::accept<ArduinoJson6185_71::JsonSerializer<ArduinoJson6185_71::Writer<std::cxx11::basic_string<char, std::char_traits, std::allocator >, void> > >(ArduinoJson6185_71::JsonSerializer<ArduinoJson6185_71::Writer<std::cxx11::basic_string<char, std::char_traits, std::allocator >, void> >&) const at /config/esphome-jk-bms/.esphome/build/jk-bms/.piolibdeps/jk-bms/ArduinoJson/src/ArduinoJson/Document/JsonDocument.hpp:20 (inlined by) unsigned int ArduinoJson6185_71::doSerialize<ArduinoJson6185_71::JsonSerializer, ArduinoJson6185_71::BasicJsonDocument, ArduinoJson6185_71::Writer<std::cxx11::basic_string<char, std::char_traits, std::allocator >, void> >(ArduinoJson6185_71::BasicJsonDocument const&, ArduinoJson6185_71::Writer<std::cxx11::basic_string<char, std::char_traits, std::allocator >, void>) at /config/esphome-jk-bms/.esphome/build/jk-bms/.piolibdeps/jk-bms/ArduinoJson/src/ArduinoJson/Serialization/serialize.hpp:15 (inlined by) unsigned int ArduinoJson6185_71::serialize<ArduinoJson6185_71::JsonSerializer, ArduinoJson6185_71::BasicJsonDocument, std::cxx11::basic_string<char, std::char_traits, std::allocator > >(ArduinoJson6185_71::BasicJsonDocument const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator >&) at /config/esphome-jk-bms/.esphome/build/jk-bms/.piolibdeps/jk-bms/ArduinoJson/src/ArduinoJson/Serialization/serialize.hpp:22 (inlined by) unsigned int ArduinoJson6185_71::serializeJson<ArduinoJson6185_71::BasicJsonDocument, std::cxx11::basic_string<char, std::char_traits, std::allocator > >(ArduinoJson6185_71::BasicJsonDocument const&, std::cxx11::basic_string<char, std::char_traits, std::allocator >&) at /config/esphome-jk-bms/.esphome/build/jk-bms/.piolibdeps/jk-bms/ArduinoJson/src/ArduinoJson/Json/JsonSerializer.hpp:115 (inlined by) esphome::json::build_json[abi:cxx11](std::function<void (ArduinoJson6185_71::ObjectRef)> const&) at /config/esphome-jk-bms/.esphome/build/jk-bms/src/esphome/components/json/json_util.cpp:53 WARNING Decoded 0x400e32bd: esphome::mqtt::MQTTClientComponent::publish_json(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::function<void (ArduinoJson6185_71::ObjectRef)> const&, unsigned char, bool) at /config/esphome-jk-bms/.esphome/build/jk-bms/src/esphome/components/mqtt/mqtt_client.cpp:426 WARNING Decoded 0x400e3a42: esphome::mqtt::MQTTComponent::senddiscovery() at /config/esphome-jk-bms/.esphome/build/jk-bms/src/esphome/components/mqtt/mqtt_component.cpp:64 WARNING Decoded 0x400e3a87: esphome::mqtt::MQTTComponent::call_setup() at /config/esphome-jk-bms/.esphome/build/jk-bms/src/esphome/components/mqtt/mqtt_component.cpp:195 (inlined by) esphome::mqtt::MQTTComponent::call_setup() at /config/esphome-jk-bms/.esphome/build/jk-bms/src/esphome/components/mqtt/mqtt_component.cpp:183 WARNING Decoded 0x401c9c25: esphome::Component::call() at /config/esphome-jk-bms/.esphome/build/jk-bms/src/esphome/core/component.cpp:97 WARNING Decoded 0x400ea080: esphome::Application::setup() at /config/esphome-jk-bms/.esphome/build/jk-bms/src/esphome/core/application.cpp:38 WARNING Decoded 0x400f6ef1: setup() at /config/esphome-jk-bms/.esphome/build/jk-bms/src/main.cpp:5510 (discriminator 4) WARNING Decoded 0x400d840b: esphome::loop_task(void*) at /config/esphome-jk-bms/.esphome/build/jk-bms/src/esphome/components/esp32/core.cpp:72 [14:36:26] [14:36:26] [14:36:26]ELF file SHA256: 5bff002ac3792c10 [14:36:26] [14:36:26]Rebooting... [14:36:26]ets Jun 8 2016 00:22:57 [14:36:26] [14:36:26]rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) [14:36:26]configsip: 188777542, SPIWP:0xee [14:36:26]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 [14:36:26]mode:DIO, clock div:2 [14:36:26]load:0x3fff0030,len:7508 [14:36:26]load:0x40078000,len:14912 [14:36:26]ho 0 tail 12 room 4 [14:36:26]load:0x40080400,len:3688 [14:36:26]entry 0x4008067c [14:36:26]I (29) boot: ESP-IDF 4.3.2 2nd stage bootloader [14:36:26]I (29) boot: compile time 14:33:15 [14:36:26]I (29) boot: chip revision: 1 [14:36:26]I (32) boot_comm: chip revision: 1, min. bootloader chip revision: 0 [14:36:26]I (39) boot.esp32: SPI Speed : 40MHz [14:36:26]I (44) boot.esp32: SPI Mode : DIO [14:36:26]I (49) boot.esp32: SPI Flash Size : 4MB [14:36:26]I (53) boot: Enabling RNG early entropy source... [14:36:26]I (58) boot: Partition Table: [14:36:26]I (62) boot: ## Label Usage Type ST Offset Length [14:36:26]I (69) boot: 0 nvs WiFi data 01 02 00009000 00004000 [14:36:26]I (77) boot: 1 otadata OTA data 01 00 0000d000 00002000 [14:36:26]I (84) boot: 2 phy_init RF data 01 01 0000f000 00001000 [14:36:26]I (92) boot: 3 app0 OTA app 00 10 00010000 001c0000 [14:36:26]I (99) boot: 4 app1 OTA app 00 11 001d0000 001c0000 [14:36:26]I (107) boot: End of partition table [14:36:26]I (111) boot_comm: chip revision: 1, min. application chip revision: 0 [14:36:26]I (118) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=36ba8h (224168) map [14:36:26]I (208) esp_image: segment 1: paddr=00046bd0 vaddr=3ffbdb60 size=0493ch ( 18748) load [14:36:26]I (215) esp_image: segment 2: paddr=0004b514 vaddr=40080000 size=04b04h ( 19204) load [14:36:26]I (224) esp_image: segment 3: paddr=00050020 vaddr=400d0020 size=ffe68h (1048168) map [14:36:26]I (603) esp_image: segment 4: paddr=0014fe90 vaddr=40084b04 size=18144h ( 98628) load [14:36:26]I (644) esp_image: segment 5: paddr=00167fdc vaddr=50000000 size=00010h ( 16) load [14:36:26]I (658) boot: Loaded app from partition at offset 0x10000 [14:36:26]I (658) boot: Disabling RNG early entropy source... [14:36:26]I (670) cpu_start: Pro cpu up. [14:36:26]I (670) cpu_start: Starting app cpu, entry point is 0x40081da0 [14:36:26]I (655) cpu_start: App cpu up. [14:36:26]I (686) cpu_start: Pro cpu start user code [14:36:26]I (686) cpu_start: cpu freq: 160000000 [14:36:26]I (686) cpu_start: Application information: [14:36:26]I (691) cpu_start: Project name: jk-bms [14:36:26]I (696) cpu_start: App version: 2022.8.3 [14:36:26]I (701) cpu_start: Compile time: Nov 5 2022 14:28:09 [14:36:26]I (707) cpu_start: ELF file SHA256: 5bff002ac3792c10... [14:36:26]I (713) cpu_start: ESP-IDF: 4.3.2 [14:36:26]I (718) heap_init: Initializing. RAM available for dynamic allocation: [14:36:26]I (725) heap_init: At 3FFAFF10 len 000000F0 (0 KiB): DRAM [14:36:26]I (731) heap_init: At 3FFB6388 len 00001C78 (7 KiB): DRAM [14:36:26]I (737) heap_init: At 3FFB9A20 len 00004108 (16 KiB): DRAM [14:36:26]I (743) heap_init: At 3FFCAE40 len 000151C0 (84 KiB): DRAM [14:36:26]I (749) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM [14:36:26]I (756) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM [14:36:26]I (762) heap_init: At 4009CC48 len 000033B8 (12 KiB): IRAM [14:36:26]I (769) spi_flash: detected chip: gd [14:36:26]I (773) spi_flash: flash io: dio [14:36:26]I (778) cpu_start: Starting scheduler on PRO CPU. [14:36:26]I (0) cpu_start: Starting scheduler on APP CPU. [14:36:26][I][logger:243]: Log initialized [14:36:26][C][ota:461]: There have been 3 suspected unsuccessful boot attempts. [14:36:26][D][esp32.preferences:113]: Saving 1 preferences to flash... [14:36:26][D][esp32.preferences:142]: Saving 1 preferences to flash: 0 cached, 1 written, 0 failed [14:36:26][I][app:029]: Running through setup()... [14:36:26][D][esp-idf:000]: I (94) BTDM_INIT: BT controller compile version [6a07b06] [14:36:26] [14:36:26][D][esp-idf:000]: I (973) system_api: Base MAC address is not set [14:36:26] [14:36:26][D][esp-idf:000]: I (974) system_api: read default base MAC address from EFUSE [14:36:26] [14:36:26][D][esp-idf:000]: I (977) phy_init: phy_version 4670,719f9f6,Feb 18 2021,17:07:07 [14:36:26] [14:36:26][D][esp32_ble_tracker:222]: Starting scan... [14:36:26][C][wifi:037]: Setting up WiFi... [14:36:26][D][esp-idf:000]: I (1594) wifi: [14:36:26][D][esp-idf:000]: wifi driver task: 3fff0498, prio:23, stack:6656, core=0 [14:36:26][D][esp-idf:000]: [14:36:26] [14:36:26][D][esp-idf:000]: I (1614) wifi: [14:36:26][D][esp-idf:000]: wifi firmware version: eb52264 [14:36:26][D][esp-idf:000]: [14:36:26] [14:36:26][D][esp-idf:000]: I (1615) wifi: [14:36:26][D][esp-idf:000]: wifi certification version: v7.0 [14:36:26][D][esp-idf:000]: `

markusgg84 commented 2 years ago

I've got the same issue with only one device.

syssi commented 2 years ago

It looks like you hit a resource limit. Please remove most of the sensors (just for testing). If it's working you can decrease the log level to free some resources and try to increase the number of sensors step by step.

markusgg84 commented 2 years ago

That work, thank you!

syssi commented 2 years ago

It looks like the BLE client component is broken at 2022.10.1 Please be careful!

https://github.com/esphome/issues/issues/3729