2024-07-08 07:08 AM - edited 2024-07-08 07:15 AM
/* add the network interface (IPv4/IPv6) with RTOS */
netif_add(&gnetif, &ipaddr, &netmask, &gw, NULL, ðernetif_init, &tcpip_input);
/* Registers the default network interface */
netif_set_default(&gnetif);
if (netif_is_link_up(&gnetif))
{
/* When the netif is fully configured this function must be called */
netif_set_up(&gnetif);
}
else
{
/* When the netif link is down this function must be called */
netif_set_down(&gnetif);
}
/* Set the link callback function, this function is called on change of link status*/
netif_set_link_callback(&gnetif, ethernet_link_status_updated);
I am using open source lwip.c and I realized my ethernet connection breaks and reconnects time to time. I was wondering if it is okey or expected behaviour in ethernet connections or it shouldnt be disconnecting at the first place.
Solved! Go to Solution.
2024-07-15 06:45 AM
Hello @tugbaozcan,
Ethernet connections are generally stable and should not disconnect frequently. To ensure the stability of your connection, please verify that your application performs a periodic check of the link. This involves ensuring that a function is regularly called to monitor the Ethernet link status and appropriately handle any changes.
With Regards,
2024-07-15 06:45 AM
Hello @tugbaozcan,
Ethernet connections are generally stable and should not disconnect frequently. To ensure the stability of your connection, please verify that your application performs a periodic check of the link. This involves ensuring that a function is regularly called to monitor the Ethernet link status and appropriately handle any changes.
With Regards,