Hi! Hitting a BLE init issue trying to run light_wifi.rs on ESP32-S3 with Bluedroid, advertising never starts even though Matter stack initialises cleanly and generates a QR code.
Tried (no effect):
I (1097) rs_matter_stack::wireless::wifi: Matter Stack memory: 63064b
I (1107) rs_matter_stack::bump: BUMP[/Users/piotrkowalczuk/.cargo/git/checkouts/rs-matter-stack-6d320ce37ecc289f/c809293/src/wireless/wifi.rs:122]: 800b (U:0b/F:15000b)
I (1117) pp: pp rom version: e7ae62f
I (1117) net80211: net80211 rom version: e7ae62f
I (1137) wifi:wifi driver task: 3fcbe660, prio:23, stack:6656, core=0
I (1137) wifi:wifi firmware version: 4df78f2
I (1137) wifi:wifi certification version: v7.0
I (1137) wifi:config NVS flash: enabled
I (1147) wifi:config nano formatting: disabled
I (1147) wifi:Init data frame dynamic rx buffer num: 32
I (1147) wifi:Init static rx mgmt buffer num: 5
I (1157) wifi:Init management short buffer num: 32
I (1157) wifi:Init dynamic tx buffer num: 32
I (1167) wifi:Init static tx FG buffer num: 2
I (1167) wifi:Init static rx buffer size: 1600
I (1177) wifi:Init static rx buffer num: 10
I (1177) wifi:Init dynamic rx buffer num: 32
I (1177) wifi_init: rx ba win: 6
I (1187) wifi_init: accept mbox: 6
I (1187) wifi_init: tcpip mbox: 32
I (1187) wifi_init: udp mbox: 6
I (1197) wifi_init: tcp mbox: 6
I (1197) wifi_init: tcp tx win: 5760
I (1197) wifi_init: tcp rx win: 5760
I (1197) wifi_init: tcp mss: 1440
I (1207) wifi_init: WiFi IRAM OP enabled
I (1207) wifi_init: WiFi RX IRAM OP enabled
I (1217) esp_idf_svc::bt: Init bluetooth controller
I (1217) BLE_INIT: BT controller compile version [1bb2f50]
I (1227) BLE_INIT: Using main XTAL as clock source
I (1227) BLE_INIT: Feature Config, ADV:1, BLE_50:0, DTM:1, SCAN:1, CCA:0, SMP:1, CONNECT:1
I (1237) BLE_INIT: Bluetooth MAC: 20:6e:f1:31:e1:7a
I (1237) esp_idf_svc::bt: Enable bluetooth controller
I (1247) phy_init: phy_version 711,97bcf0a2,Aug 25 2025,19:04:10
W (1247) phy_init: failed to load RF calibration data (0x1102), falling back to full calibration
I (1297) phy_init: Saving new calibration data due to checksum failure or outdated calibration data, mode(2)
I (1307) esp_idf_svc::bt: Init bluedroid
I (1317) esp_idf_svc::bt: Enable bluedroid
I (1327) rs_matter_stack::wireless::wifi: Wifi and BLE drivers started
I (1397) rs_matter_stack::wireless: BLE driver started
I (1407) rs_matter_stack::wireless: Running in concurrent commissioning mode (BLE and Wireless)
I (1457) esp_idf_matter::ble: BLE Gap and Gatts initialized
I (1467) esp_idf_matter::ble: BLE Gap and Gatts subscriptions initialized
I (1467) esp_idf_matter::ble: Gatts BTP app registered
I (1477) async_io_mini::reactor: Starting reactor
E (1477) BT_APPL: bta_dm_ble_set_adv_params_all(), fail to set ble adv params.
I (1487) rs_matter_stack: Running operational and commissioning networks
W (1487) BT_HCI: opcode=0x200a, status= 0c: Cmd Disallowed
I (1497) rs_matter::transport: Running Matter transport
E (1497) BT_BTM: btm_ble_write_adv_enable_complete failed
W (1507) BT_HCI: opcode=0x2006, status= 0c: Cmd Disallowed
I (1517) rs_matter_stack: Netif down
E (1517) BT_HCI: hci write adv params error 0xc
Cargo.toml
[package]
edition = "2021"
resolver = "2"
rust-version = "1.84"
[[bin]]
name = "agatabuster"
harness = false
[profile.release]
opt-level = "s"
[profile.dev]
debug = true
opt-level = "z"
[patch.crates-io]
esp-idf-sys = { git = "https://github.com/esp-rs/esp-idf-sys.git" }
esp-idf-hal = { git = "https://github.com/esp-rs/esp-idf-hal.git" }
esp-idf-svc = { git = "https://github.com/esp-rs/esp-idf-svc.git" }
rs-matter = { git = "https://github.com/sysgrok/rs-matter", branch = "next" }
rs-matter-stack = { git = "https://github.com/sysgrok/rs-matter-stack", branch = "next" }
[dependencies]
log = "0.4"
esp-idf-svc = { version = "0.52.1", features = [
"binstart",
"critical-section",
"embassy-time-driver",
"embassy-sync",
"alloc",
"std",
] }
embassy-time = { version = "0.5", features = ["generic-queue-8"] }
anyhow = "1.0.102"
rand = { version = "0.8.6" }
static_cell = "2.1.1"
esp-idf-matter = { git = "https://github.com/sysgrok/esp-idf-matter", branch = "master", version = "0.1.0", default-features = false, features = ["std", "async-io-mini", "log", "rustcrypto", "max-fabrics-2"] }
[build-dependencies]
embuild = "0.33"
partitions.csv
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x6000,
phy_init, data, phy, 0xf000, 0x1000,
factory, app, factory, 0x10000, 3M,
sdkconfig.defaults
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
#enable BT
CONFIG_BT_ENABLED=y
CONFIG_BT_BLUEDROID_ENABLED=y
CONFIG_BT_CLASSIC_ENABLED=n
CONFIG_BT_A2DP_ENABLE=n
CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y
CONFIG_BT_BLE_50_FEATURES_SUPPORTED=n
CONFIG_BT_BLE_DYNAMIC_ENV_MEMORY=y
CONFIG_BT_BTC_TASK_STACK_SIZE=15000
#enable lwip ipv6 autoconfig
CONFIG_LWIP_IPV6_AUTOCONFIG=y
# Use a custom partition table
CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE=y
#CONFIG_PARTITION_TABLE_CUSTOM=y
#CONFIG_PARTITION_TABLE_FILENAME="partitions.csv"
#CONFIG_PARTITION_TABLE_OFFSET=0xC000
# Enable chip shell
CONFIG_ENABLE_CHIP_SHELL=y
# This example only use 2 dynamic endpoints
CONFIG_ESP_MATTER_MAX_DYNAMIC_ENDPOINT_COUNT=2
CONFIG_ENABLE_WIFI_AP=n
CONFIG_ESP_WIFI_ENABLED=y
#enable lwIP route hooks
CONFIG_LWIP_HOOK_IP6_ROUTE_DEFAULT=y
CONFIG_LWIP_HOOK_ND6_GET_GW_DEFAULT=y
# Button
CONFIG_BUTTON_PERIOD_TIME_MS=20
CONFIG_BUTTON_LONG_PRESS_TIME_MS=5000
# disable softap by default
CONFIG_ESP_WIFI_SOFTAP_SUPPORT=n
# Enable OTA Requestor
CONFIG_ENABLE_OTA_REQUESTOR=y
# Enable HKDF in mbedtls
CONFIG_MBEDTLS_HKDF_C=y
# Increase LwIP IPv6 address number to 6 (MAX_FABRIC + 1)
# unique local addresses for fabrics(MAX_FABRIC), a link local address(1)
CONFIG_LWIP_IPV6_NUM_ADDRESSES=6
# Buttons
CONFIG_BSP_BUTTONS_NUM=1
Hi! Hitting a BLE init issue trying to run
light_wifi.rson ESP32-S3 with Bluedroid, advertising never starts even though Matter stack initialises cleanly and generates a QR code.Tried (no effect):
esp_ble_gap_set_rand_addr()beforerun_coexsdkconfig.defaults(matches CI config) vs esp-matter-style - same errorCargo.tomlpartitions.csvsdkconfig.defaults