Hello Gregory, Got it! The flags are populated by the monitor thread.
I will enable here in my setup, test and report here. Thank you very much. Best regards, Flavio Em qua., 14 de abr. de 2021 às 10:31, Gregory Nutt <spudan...@gmail.com> escreveu: > > Examples: > > $ find boards/ -name defconfig | xargs grep CONFIG_NETINIT_MONITOR > > boards/arm/samv7/same70-xplained/configs/netnsh/defconfig:CONFIG_NETINIT_MONITOR=y > > boards/arm/samv7/samv71-xult/configs/netnsh/defconfig:CONFIG_NETINIT_MONITOR=y > > boards/arm/tiva/dk-tm4c129x/configs/ipv6/defconfig:CONFIG_NETINIT_MONITOR=y > boards/arm/tiva/dk-tm4c129x/configs/nsh/defconfig:CONFIG_NETINIT_MONITOR=y > > boards/arm/tiva/tm4c1294-launchpad/configs/ipv6/defconfig:CONFIG_NETINIT_MONITOR=y > > boards/arm/tiva/tm4c1294-launchpad/configs/nsh/defconfig:CONFIG_NETINIT_MONITOR=y > > On 4/14/2021 7:29 AM, Gregory Nutt wrote: > > Normally this is done using the PHY driver at > > nuttx/drivers/net/phy_notify.c that provides PHY-related events to > > applications via signals. It requires board-level support to handle > > PHY interrupts. > > > > The network monitor thread at apps/netutils/netinit (see > > CONFIG_NETINIT_MONITOR) will handle taking the network down if the > > cable is unplugged and bringing it back up when the cable is restored. > > > > On 4/14/2021 7:24 AM, Flavio Castro Alves Filho wrote: > >> Hello, > >> > >> I am implementing an application using NuttX where I need to detect if > >> the network cable is plugged or not in my board. > >> > >> Today I implemented the function netlib_getifstatus(), which automates > >> the read of SIOCGIFFLAGS, similar to what we have in Linux. > >> > >> But, in my tests, it seems that it is not working correctly. > >> > >> What is the recommended approach to have this feature implemented? > >> > >> Best regards, > >> > >> Flavio > >> > > > -- Flavio de Castro Alves Filho flavio.al...@gmail.com Twitter: http://twitter.com/#!/fraviofii LinkedIn profile: www.linkedin.com/in/flaviocastroalves