Skip to content

eliminates error messages when using Ethernet Static IP #5836

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Nov 9, 2021
7 changes: 6 additions & 1 deletion libraries/Ethernet/src/ETH.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,10 @@ bool ETHClass::begin(uint8_t phy_addr, int power, int mdc, int mdio, eth_phy_typ
log_e("esp_eth_init error: %d", err);
}
#endif
// holds a few microseconds to let DHCP start and enter into a good state
// FIX ME -- adresses issue https://github.com/espressif/arduino-esp32/issues/5733
delay(50);

return true;
}

Expand Down Expand Up @@ -396,7 +400,8 @@ bool ETHClass::config(IPAddress local_ip, IPAddress gateway, IPAddress subnet, I
if(err != ERR_OK){
log_e("STA IP could not be configured! Error: %d", err);
return false;
}
}

if(info.ip.addr){
staticIP = true;
} else {
Expand Down