diff --git a/examples/bluetooth/bluedroid/classic_bt/bt_spp_acceptor/main/main.c b/examples/bluetooth/bluedroid/classic_bt/bt_spp_acceptor/main/main.c index c56b82b98568..02dbd1c8ec6b 100644 --- a/examples/bluetooth/bluedroid/classic_bt/bt_spp_acceptor/main/main.c +++ b/examples/bluetooth/bluedroid/classic_bt/bt_spp_acceptor/main/main.c @@ -232,6 +232,11 @@ void app_main(void) return; } + if ((ret = esp_bluedroid_enable()) != ESP_OK) { + ESP_LOGE(SPP_TAG, "%s enable bluedroid failed: %s", __func__, esp_err_to_name(ret)); + return; + } + if ((ret = esp_bt_gap_register_callback(esp_bt_gap_cb)) != ESP_OK) { ESP_LOGE(SPP_TAG, "%s gap register failed: %s", __func__, esp_err_to_name(ret)); return;