Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions libraries/Ethernet/src/ETH.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,8 @@ bool ETHClass::begin(eth_phy_type_t type, int32_t phy_addr, int mdc, int mdio, i
/* attach to receive events */
initNetif((Network_Interface_ID)(ESP_NETIF_ID_ETH+_eth_index));

Network.onSysEvent(onEthConnected, ARDUINO_EVENT_ETH_CONNECTED);

ret = esp_eth_start(_eth_handle);
if(ret != ESP_OK){
log_e("esp_eth_start failed: %d", ret);
Expand All @@ -308,8 +310,6 @@ bool ETHClass::begin(eth_phy_type_t type, int32_t phy_addr, int mdc, int mdio, i
if(!perimanSetPinBus(_pin_power, ESP32_BUS_TYPE_ETHERNET_PWR, (void *)(this), -1, -1)){ goto err; }
}

Network.onSysEvent(onEthConnected, ARDUINO_EVENT_ETH_CONNECTED);

// holds a few milliseconds to let DHCP start and enter into a good state
// FIX ME -- adresses issue https://github.com/espressif/arduino-esp32/issues/5733
delay(50);
Expand Down