diff --git a/cores/esp32/esp32-hal-bt.c b/cores/esp32/esp32-hal-bt.c index fe479d46..0bed8e80 100644 --- a/cores/esp32/esp32-hal-bt.c +++ b/cores/esp32/esp32-hal-bt.c @@ -23,11 +23,13 @@ bool btStarted(){ } bool btStart(){ + esp_bt_controller_config_t cfg; + memset(&cfg, 0, sizeof(esp_bt_controller_config_t)); if(esp_bt_controller_get_status() == ESP_BT_CONTROLLER_STATUS_ENABLED){ return true; } if(esp_bt_controller_get_status() == ESP_BT_CONTROLLER_STATUS_IDLE){ - esp_bt_controller_init(); + esp_bt_controller_init(&cfg); while(esp_bt_controller_get_status() == ESP_BT_CONTROLLER_STATUS_IDLE){} } if(esp_bt_controller_get_status() == ESP_BT_CONTROLLER_STATUS_INITED){