File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -391,11 +391,17 @@ void rivr_ble_init(void)
391391
392392 RIVR_LOGI (TAG , "rivr_ble_init: initialising Bluedroid BLE stack" );
393393
394+ #if CONFIG_IDF_TARGET_ESP32
395+ /* Release classic-BT controller memory on original ESP32 only.
396+ * ESP32-S3, C3, H2, C6 are BLE-only chips — classic BT memory does not
397+ * exist; calling mem_release() with ESP_BT_MODE_CLASSIC_BT on those
398+ * targets returns ESP_ERR_NOT_SUPPORTED and would abort BLE init. */
394399 err = esp_bt_controller_mem_release (ESP_BT_MODE_CLASSIC_BT );
395400 if (err != ESP_OK && err != ESP_ERR_INVALID_STATE ) {
396401 ESP_LOGE (TAG , "esp_bt_controller_mem_release failed: %s" , esp_err_to_name (err ));
397402 return ;
398403 }
404+ #endif
399405
400406 esp_bt_controller_config_t bt_cfg = BT_CONTROLLER_INIT_CONFIG_DEFAULT ();
401407 err = esp_bt_controller_init (& bt_cfg );
You can’t perform that action at this time.
0 commit comments