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 & MII_MSR_LINKSTATUS) != 0) {

==> change the net driver flag that indicates if the network interface
is up or not;

}

Then in the application, I continue to check regularly the netlib_getifstatus().

Is there any way, or is it feasible, to have something like that? How
should I proceed?

Best regards,

Flavio



Em qua., 19 de mai. de 2021 às 18:55, Gregory Nutt
<spudan...@gmail.com> escreveu:
>
>
> > 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
> polling the PHY in maintenance mode would interfere with normal
> operational mode, but I think David demonstrated that there was not an
> issue with that.
>
> I think these:
>
> https://github.com/apache/incubator-nuttx-apps/pull/402
>
> https://github.com/apache/incubator-nuttx-apps/pull/415
>
>


-- 
Flavio de Castro Alves Filho

flavio.al...@gmail.com
Twitter: http://twitter.com/#!/fraviofii
LinkedIn profile: www.linkedin.com/in/flaviocastroalves

Reply via email to