CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2024
    Posts
    1

    stm32h7 ethernet tcp connection lwip

    Code:
    netif_add(&gnetif, &ipaddr, &netmask, &gw, NULL, &ethernetif_init, &tcpip_input);
    while(1){
    netif_set_default(&gnetif);
    
    if (netif_is_link_up(&gnetif))
    { netif_set_up(&gnetif);
    break;
    }
    else
    {  netif_set_down(&gnetif);
    }netif_set_link_callback(&gnetif, ethernet_link_status_updated);
    }
    I am using open source ethernet code and i am having trouble while connecting. Also when I connect i see my desired output with ARPlines does that mean my connection is lost than connected again or is it just for affirmation for the connection
    Screenshot 2024-07-11 112107.jpg

  2. #2
    Join Date
    Nov 2018
    Posts
    137

    Re: stm32h7 ethernet tcp connection lwip

    A couple of points for posting.

    1. Always format your code. You managed to use code tags, but it still doesn't look nice to read.
    Code:
      netif_add(&gnetif, &ipaddr, &netmask, &gw, NULL, &ethernetif_init, &tcpip_input);
      while (1) {
        netif_set_default(&gnetif);
        if (netif_is_link_up(&gnetif)) {
          netif_set_up(&gnetif);
          break;
        } else {
          netif_set_down(&gnetif);
        }
        netif_set_link_callback(&gnetif, ethernet_link_status_updated);
      }
    2. JPG is for your camera. Use PNG format for saving screen shots containing digitally generated information like program output.
    What you posted is borderline illegible.

    Do you see regular ARP lines when your program isn't running?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured