Fixed access point for ESP32 IDF platform (#4784)

This commit is contained in:
Jimmy Hedman 2023-05-11 00:00:28 +02:00 committed by Jesse Hills
parent c7c9c49f4e
commit d80885c7a8
No known key found for this signature in database
GPG key ID: BEAAE804EFD8E83A

View file

@ -767,11 +767,10 @@ bool WiFiComponent::wifi_ap_ip_config_(optional<ManualIP> manual_ip) {
info.gw.addr = static_cast<uint32_t>(network::IPAddress(192, 168, 4, 1)); info.gw.addr = static_cast<uint32_t>(network::IPAddress(192, 168, 4, 1));
info.netmask.addr = static_cast<uint32_t>(network::IPAddress(255, 255, 255, 0)); info.netmask.addr = static_cast<uint32_t>(network::IPAddress(255, 255, 255, 0));
} }
esp_netif_dhcp_status_t dhcp_status;
esp_netif_dhcps_get_status(s_sta_netif, &dhcp_status); err = esp_netif_dhcpc_stop(s_sta_netif);
err = esp_netif_dhcps_stop(s_sta_netif); if (err != ESP_OK && err != ESP_ERR_ESP_NETIF_DHCP_ALREADY_STOPPED) {
if (err != ESP_OK) { ESP_LOGV(TAG, "esp_netif_dhcpc_stop failed: %s", esp_err_to_name(err));
ESP_LOGV(TAG, "esp_netif_dhcps_stop failed! %d", err);
return false; return false;
} }