1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-02 19:32:19 +01:00

wifi: support 802.11k and 802.11v (#3600)

This commit is contained in:
Stijn Tintel
2022-08-17 12:10:43 +03:00
committed by GitHub
parent 5561d4eaeb
commit b4bbe3d7b5
6 changed files with 43 additions and 1 deletions

View File

@@ -166,6 +166,10 @@ WiFiComponent::WiFiComponent() { global_wifi_component = this; }
bool WiFiComponent::has_ap() const { return this->has_ap_; }
bool WiFiComponent::has_sta() const { return !this->sta_.empty(); }
void WiFiComponent::set_fast_connect(bool fast_connect) { this->fast_connect_ = fast_connect; }
#ifdef USE_WIFI_11KV_SUPPORT
void WiFiComponent::set_btm(bool btm) { this->btm_ = btm; }
void WiFiComponent::set_rrm(bool rrm) { this->rrm_ = rrm; }
#endif
network::IPAddress WiFiComponent::get_ip_address() {
if (this->has_sta())
return this->wifi_sta_ip();
@@ -366,6 +370,10 @@ void WiFiComponent::print_connect_params_() {
ESP_LOGCONFIG(TAG, " Gateway: %s", wifi_gateway_ip_().str().c_str());
ESP_LOGCONFIG(TAG, " DNS1: %s", wifi_dns_ip_(0).str().c_str());
ESP_LOGCONFIG(TAG, " DNS2: %s", wifi_dns_ip_(1).str().c_str());
#ifdef USE_WIFI_11KV_SUPPORT
ESP_LOGCONFIG(TAG, " BTM: %s", this->btm_ ? "enabled" : "disabled");
ESP_LOGCONFIG(TAG, " RRM: %s", this->rrm_ ? "enabled" : "disabled");
#endif
}
void WiFiComponent::start_scanning() {