Re: Ethernet cable (network interface availability) detection

2021-05-21 Thread Flavio Castro Alves Filho
others wanted and I >> could not test what they wanted. >> >> David >> >> -Original Message----- >> From: Gregory Nutt [mailto:spudan...@gmail.com] >> Sent: Wednesday, May 19, 2021 2:56 PM >> To: dev@nuttx.apache.org >> Subject: Re: Ethernet c

Re: Ethernet cable (network interface availability) detection

2021-05-19 Thread Flavio Castro Alves Filho
56 PM > To: dev@nuttx.apache.org > Subject: Re: Ethernet cable (network interface availability) detection > > > > Considering this scenario, is there any alternative approach that I > > could use to have this detection? Polling the phy, or something > > similar? >

RE: Ethernet cable (network interface availability) detection

2021-05-19 Thread David Sidrane
Message- From: Gregory Nutt [mailto:spudan...@gmail.com] Sent: Wednesday, May 19, 2021 2:56 PM To: dev@nuttx.apache.org Subject: Re: Ethernet cable (network interface availability) detection > Considering this scenario, is there any alternative approach that I > could use to have this det

Re: Ethernet cable (network interface availability) detection

2021-05-19 Thread Flavio Castro Alves Filho
Hello Gregory, Thank you for your quick response. Looking at the PRs, they seemed a bit complex for me :-| And I'm not sure if it is that what I want or need. What I was thinking was to use this call: stm32_phyread(CONFIG_STM32F4_PHYADDR,MII_MSR,&phyval); Then make the check: if ((phyval & MI

Re: Ethernet cable (network interface availability) detection

2021-05-19 Thread Gregory Nutt
Considering this scenario, is there any alternative approach that I could use to have this detection? Polling the phy, or something similar? As I recall, David Sidrane submitted a PR to do just this but it was not incoporated.  I don't recall why.   I recall having some concerns that pollin

Re: Ethernet cable (network interface availability) detection

2021-05-19 Thread Flavio Castro Alves Filho
Hello, Coming back to this issue. Looking at STM32F4DISCOVERY code, I could see that the NETINIT_THREAD is disabled because the IRQ pin from the PHY is not available. It happens when the RMII configuration is set and the IRQ pin is also used as REFCLK0. This is also the situation with my hardwa

Re: Ethernet cable (network interface availability) detection

2021-04-14 Thread Flavio Castro Alves Filho
Gregory, Thank you for your support. I will work on this. Best regards. Flavio Em qua., 14 de abr. de 2021 11:09, Gregory Nutt escreveu: > You board must provide CONFIG_ARCH_PHY_INTERRUPT: > > $ find boards/ -name Kconfig | xargs grep ARCH_PHY_INTERRUPT > boards/Kconfig: select ARCH_P

Re: Ethernet cable (network interface availability) detection

2021-04-14 Thread Gregory Nutt
You board must provide CONFIG_ARCH_PHY_INTERRUPT: $ find boards/ -name Kconfig | xargs grep ARCH_PHY_INTERRUPT boards/Kconfig: select ARCH_PHY_INTERRUPT boards/Kconfig: select ARCH_PHY_INTERRUPT if SAMA5_EMACA || SAMA5_EMAC0 || SAMA5_EMAC1 || SAMA5_GMAC boards/Kconfig: select ARCH_

Re: Ethernet cable (network interface availability) detection

2021-04-14 Thread Matias N.
Contributing and Glossary should be left at the end. I would put it right before Guides. Maybe one file with subsections is enough for now. On Wed, Apr 14, 2021, at 11:03, Alan Carvalho de Assis wrote: > Hi Matias, > > I can submit a PR with it. > > Where the FAQ should be added? Is it ok to be

Re: Ethernet cable (network interface availability) detection

2021-04-14 Thread Alan Carvalho de Assis
Hi Matias, I can submit a PR with it. Where the FAQ should be added? Is it ok to be after Glossary? BR, Alan On 4/14/21, Matias N. wrote: > We do not yet have a "Networking" section under "OS Components" where a lot > of network related stuff should > be. However, I have thought about a FAQ s

Re: Ethernet cable (network interface availability) detection

2021-04-14 Thread Flavio Castro Alves Filho
The netinit_monitor code is self-explanatory :-/ I could understand what must be done ... and, naturally, it is in accord with the documents. In my case, I cannot easily enable it from menuconfig ... as far as I understood. Em qua., 14 de abr. de 2021 às 10:49, Gregory Nutt escreveu: > > This i

Re: Ethernet cable (network interface availability) detection

2021-04-14 Thread Matias N.
We do not yet have a "Networking" section under "OS Components" where a lot of network related stuff should be. However, I have thought about a FAQ section for having brief question/answers where this kind of information can be (until a proper section is added). If anyone wants to start this it

Re: Ethernet cable (network interface availability) detection

2021-04-14 Thread Gregory Nutt
This is very out of date, but 90% accurate: https://cwiki.apache.org/confluence/display/NUTTX/Network+Link+Management https://cwiki.apache.org/confluence/display/NUTTX/NSH+Network+Link+Management This was not updated after the network initialization and network monitor were removed from NSH and

Re: Ethernet cable (network interface availability) detection

2021-04-14 Thread Flavio Castro Alves Filho
Hello, In my case, there is an additional challenge: the CONFIG_NETINIT_MONITOR is not supported by STM32F4DISCOVERY. What should I have to do to enable the feature for the board? Best regards, Flavio Em qua., 14 de abr. de 2021 às 10:41, Alan Carvalho de Assis escreveu: > > I think this is k

Re: Ethernet cable (network interface availability) detection

2021-04-14 Thread Alan Carvalho de Assis
I think this is kind of question that should be in some FAQ or in our documentation, it is asked often... Is there some only place in our Documentation where we could include it? BR, Alan On 4/14/21, Gregory Nutt wrote: > Normally this is done using the PHY driver at > nuttx/drivers/net/phy_no

Re: Ethernet cable (network interface availability) detection

2021-04-14 Thread Flavio Castro Alves Filho
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 escreveu: > > Examples: > > $ find boards/ -name defconfig | xargs grep

Re: Ethernet cable (network interface availability) detection

2021-04-14 Thread Gregory Nutt
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/def

Re: Ethernet cable (network interface availability) detection

2021-04-14 Thread Gregory Nutt
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 ta