DHCP (works with framewaork 3.5.0)

This commit is contained in:
MichaelDvP
2022-04-25 17:09:40 +02:00
parent 9a8449e4fe
commit c70d0352ea

View File

@@ -57,8 +57,6 @@ void NetworkSettingsService::manageSTA() {
if ((WiFi.getMode() & WIFI_STA) == 0) { if ((WiFi.getMode() & WIFI_STA) == 0) {
if (_state.staticIPConfig) { if (_state.staticIPConfig) {
WiFi.config(_state.localIP, _state.gatewayIP, _state.subnetMask, _state.dnsIP1, _state.dnsIP2); // configure for static IP WiFi.config(_state.localIP, _state.gatewayIP, _state.subnetMask, _state.dnsIP1, _state.dnsIP2); // configure for static IP
} else {
WiFi.config(IPADDR_NONE, IPADDR_NONE, IPADDR_NONE); // configure for DHCP
} }
WiFi.setHostname(_state.hostname.c_str()); // set hostname WiFi.setHostname(_state.hostname.c_str()); // set hostname