Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit da72bc9

Browse filesBrowse files
authored
eliminates error messages when using Ethernet Static IP (espressif#5836)
Summary Only affects ETH (not WiFi) This PR solves espressif#5733 by allowing the DHCP IDF server to complete its tasks and only then it sets a static IP. This also solves another related failure reported in this issue (espressif#5733 (comment)). fix espressif#5733 Impact Adds a delay in order to wait for DHCP to actually terminate before setting the static IP configuration in ETH.
1 parent 16a9cf7 commit da72bc9
Copy full SHA for da72bc9

File tree

Expand file treeCollapse file tree

1 file changed

+6
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-1
lines changed

‎libraries/Ethernet/src/ETH.cpp

Copy file name to clipboardExpand all lines: libraries/Ethernet/src/ETH.cpp
+6-1Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,10 @@ bool ETHClass::begin(uint8_t phy_addr, int power, int mdc, int mdio, eth_phy_typ
368368
log_e("esp_eth_init error: %d", err);
369369
}
370370
#endif
371+
// holds a few microseconds to let DHCP start and enter into a good state
372+
// FIX ME -- adresses issue https://github.com/espressif/arduino-esp32/issues/5733
373+
delay(50);
374+
371375
return true;
372376
}
373377

@@ -396,7 +400,8 @@ bool ETHClass::config(IPAddress local_ip, IPAddress gateway, IPAddress subnet, I
396400
if(err != ERR_OK){
397401
log_e("STA IP could not be configured! Error: %d", err);
398402
return false;
399-
}
403+
}
404+
400405
if(info.ip.addr){
401406
staticIP = true;
402407
} else {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.