*> Have you reported a problem? If not why are you surprised it's not
fixed?*
I'm Sorry if I sounded harsh or pretencious, it was not my intention. I did
not have reported this issue because as far as I could see it is well known
by the community.

*> Now this can't be an lwIP bug: lwIP knows nothing of phys. That is part
of your netif driver, which probably needs fixing.*
That's not necessarily true, during DHCP and AutoIP routines (which are
part of lwIP Stack) there is a need to know about the Phy Link status, so
when the network has changed it can take action. Anyway, my problem is a
bit bigger, I want to monitor the Phy Link using
the  LWIP_NETIF_LINK_CALLBACK, but, inspite of my code is setting this
function, it never gets called. See the demicode below:




*#if LWIP_NETIF_STATUS_CALLBACK*
*void status_callback(void) {*
* LED_BLUE_TOGGLE();*
*}*
*#endif /* LWIP_NETIF_STATUS_CALLBACK */*
*#if LWIP_NETIF_LINK_CALLBACK*
*void link_callback(void) {*
* if (netif_is_link_up(&fsl_netif0)) {  //DES link up blink fast*
* LED_GREEN_ON();*
* dhcp_start(&fsl_netif0);*
* netif_set_up(&fsl_netif0);*
* } else {*
* LED_GREEN_OFF();*
* dhcp_stop(&fsl_netif0);*
* netif_set_down(&fsl_netif0);*
* }*
*}*
*#endif /* LWIP_NETIF_LINK_CALLBACK */*

-------------------------------------------------------------------

*        PRINTF("TCP/IP initializing...\r\n");*
* tcpip_init(NULL, NULL);*
* PRINTF("TCP/IP initialized.\r\n");*

* xSemaphoreENET = xSemaphoreCreateBinary();*

* while (netif_add(&fsl_netif0, &fsl_netif0_ipaddr, &fsl_netif0_netmask,*
* &fsl_netif0_gw,*
* NULL, ethernetif_init, tcpip_input) == NULL) {*

* netif_remove(&fsl_netif0);*
* vTaskDelay(1000 / portTICK_PERIOD_MS);*
* }*

* WDOG_Refresh(WDOG);*

* netif_set_default(&fsl_netif0);*
* netif_set_up(&fsl_netif0);*

*#if LWIP_NETIF_STATUS_CALLBACK*
* netif_set_status_callback(&fsl_netif0, status_callback);*
*#endif /* LWIP_NETIF_STATUS_CALLBACK */*
*#if LWIP_NETIF_LINK_CALLBACK*
* netif_set_link_callback(&fsl_netif0, link_callback);*
*#endif /* LWIP_NETIF_LINK_CALLBACK */*

* err = dhcp_start(&fsl_netif0);*

---------------------------------------------------------------------------------------

I've already modified the lwIP so I can olny add a new network if there's a
Phy Link. Now I need to continuously act over any Phy changes. As I could
see the link_call was the better way, but it never gets called.

Any thoughts abou it?

*> What are deeper layers? You need get someone fix your netif driver.*
By deeper layers I meant the lwIP stack itself. I need a fix that can be
done in my own code, if possible.

Thank you.

Best Regards,




*Gustavo Costa*
*Engenheiro Eletricista*

*Departamento de P&D*

*Tap Eletro Sistemas Ltda.*

*(31) 3395-1180/9 8769-8593 <callto:(31)%203395-1180>*

*[email protected] <[email protected]>*




2017-10-12 5:33 GMT-03:00 Simon Goldschmidt <[email protected]>:

> Gustavo Costa TAP wrote:
> > I've recently upgraded my project to lwIP v2.0.0, but to my surprise a
> problem was not fixed.
>
> Have you reported a problem? If not why are you surprised it's not fixed?
>
> > When the "netif_add" api is called without the cable being actually
> plugged the function just hangs and my wdog barks.
>
> Now this can't be an lwIP bug: lwIP knows nothing of phys. That is part of
> your netif driver, which probably needs fixing.
>
> > Any work arrounds for this issue without having to modify the deeper
> layers of the stack?
>
> What are deeper layers? You need get someone fix your netif driver.
>
> Simon
>
> _______________________________________________
> lwip-users mailing list
> [email protected]
> https://lists.nongnu.org/mailman/listinfo/lwip-users
>
_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to