Is there any api to know the reason of ETHERNET_EVENT_DISCONNECTED

axellin
Posts: 197
Joined: Mon Sep 17, 2018 9:09 am

Is there any api to know the reason of ETHERNET_EVENT_DISCONNECTED

Postby axellin » Tue Jan 12, 2021 9:41 am

My device sometimes got ETHERNET_EVENT_DISCONNECTED after running for several
days. Checking the esp-idf code, it's because got ETH_STATE_LINK with link == ETH_LINK_DOWN.
I'm sure nobody touches the device, the device just got ETHERNET_EVENT_DISCONNECTED
then got ETHERNET_EVENT_CONNECTED and continue to work.
My question: Is there any way to know why got ETH_LINK_DOWN?
Or what is the possible reasons to cause ETH_LINK_DOWN?

BTW, there is no api to get speed and duplex mode.
Maybe it's good to also report speed and duplex mode when got ETHERNET_EVENT_CONNECTED event.

Who is online

Users browsing this forum: No registered users and 122 guests