mirror of
https://github.com/esphome/esphome.git
synced 2024-11-10 09:17:46 +01:00
Fix "BLE server / advertising always on" (#4353)
This commit is contained in:
parent
3e017efa30
commit
034b47c23a
1 changed files with 2 additions and 0 deletions
|
@ -31,11 +31,13 @@ void ESP32BLE::setup() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef USE_ESP32_BLE_SERVER
|
||||||
this->advertising_ = new BLEAdvertising(); // NOLINT(cppcoreguidelines-owning-memory)
|
this->advertising_ = new BLEAdvertising(); // NOLINT(cppcoreguidelines-owning-memory)
|
||||||
|
|
||||||
this->advertising_->set_scan_response(true);
|
this->advertising_->set_scan_response(true);
|
||||||
this->advertising_->set_min_preferred_interval(0x06);
|
this->advertising_->set_min_preferred_interval(0x06);
|
||||||
this->advertising_->start();
|
this->advertising_->start();
|
||||||
|
#endif // USE_ESP32_BLE_SERVER
|
||||||
|
|
||||||
ESP_LOGD(TAG, "BLE setup complete");
|
ESP_LOGD(TAG, "BLE setup complete");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue