cancel
Showing results for 
Search instead for 
Did you mean: 

stm32h7 ethernet tcp connection lwip

tugbaozcan
Associate II

 

 

 /* add the network interface (IPv4/IPv6) with RTOS */
  netif_add(&gnetif, &ipaddr, &netmask, &gw, NULL, &ethernetif_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.

1 ACCEPTED SOLUTION

Accepted Solutions
ASEHST
ST Employee

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,

If your question is answered, please close this topic by clicking "Accept as Solution".

View solution in original post

1 REPLY 1
ASEHST
ST Employee

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,

If your question is answered, please close this topic by clicking "Accept as Solution".