From 0f279c901b82f9c19cdd51989b91269276852d1e Mon Sep 17 00:00:00 2001 From: David Montero Date: Sat, 15 Aug 2026 04:19:21 +0200 Subject: [PATCH] fix(espidf): enable BLE 4.2 legacy APIs on BLE5-only SoCs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit C3/S3/C6 default to CONFIG_BT_BLE_50_FEATURES_SUPPORTED with 4.2 OFF, so arduino-esp32's Bluedroid BLE library (esp_ble_gap_config_adv_data_raw, esp_ble_gap_start_advertising) died at link with undefined references — esp32c3-ble-advertise never compiled. Enabling 42+50 together matches arduino-esp32's own per-target sdkconfigs; on classic ESP32 these flags are already the Kconfig defaults. Found by the nightly gallery smoke. --- .../services/esp-idf-template/sdkconfig.defaults.in | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/backend/app/services/esp-idf-template/sdkconfig.defaults.in b/backend/app/services/esp-idf-template/sdkconfig.defaults.in index f9d1536f..f9255bab 100644 --- a/backend/app/services/esp-idf-template/sdkconfig.defaults.in +++ b/backend/app/services/esp-idf-template/sdkconfig.defaults.in @@ -93,6 +93,16 @@ CONFIG_BT_ENABLED=y CONFIG_BT_BLUEDROID_ENABLED=y CONFIG_BTDM_CTRL_MODE_BR_EDR_BLE=y CONFIG_BT_BLE_ENABLED=y +# BLE 4.2 legacy APIs (esp_ble_gap_config_adv_data_raw / esp_ble_gap_ +# start_advertising): arduino-esp32's Bluedroid BLE library is written +# against them. BLE5-only SoCs (C3/S3/C6) default to 50_FEATURES with 4.2 +# OFF, so every BLEAdvertising call died at link with undefined references +# (found by the gallery compile smoke: esp32c3-ble-advertise, 2026-08-15). +# Enabling 4.2 alongside 5.0 is exactly what arduino-esp32's own per-target +# sdkconfigs do; on classic ESP32 these are already the Kconfig defaults. +CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y +CONFIG_BT_BLE_42_ADV_EN=y +CONFIG_BT_BLE_42_SCAN_EN=y # ── mbedTLS: PSK key-exchange ciphersuites ─────────────────────────────── # arduino-esp32's WiFiClientSecure/ssl_client.cpp wraps its ENTIRE body