Skip to main content
Visitor II
July 5, 2024
Solved

STMH743ZI2 - Ethernet with LWIP transmitting, but not receiving

  • July 5, 2024
  • 2 replies
  • 1076 views

I followed this tutorial and I'm able to transmit UDP packets from my nucleo board to my computer. I've configured the code to use lwIP without freeRTOS. 

I'm trying to receive packets on my board over Ethernet by setting up a callback and it never enters the callback even though wireshark shows that packets are being sent. I'm also able to ping the ip address of the nucleo board and get a response. Any thoughts/debugging tips would be helpful!

 

struct udp_pcb* my_udp = udp_new();
udp_connect(my_udp, &PC_IPADDR, 9000);

printf("Connected to Ethernet.\n\r");

udp_recv(my_udp, UDP_RXCallback, NULL);
void UDP_RXCallback(void *arg, struct udp_pcb *upcb, struct pbuf *p, const ip_addr_t *addr, u16_t port)
{
	printf("in callback\n\r");

	/* Free receive pbuf */
	pbuf_free(p);
}

 

 

    This topic has been closed for replies.
    Best answer by STea

    Hello @ss4 & @SITARAM ,

    I suggest you follow the tutorial found in this Article as well as the working example in this GitHub repo with working Lwip Ethernet examples on the STM32H7 series.
    Regards

    2 replies

    Explorer II
    July 6, 2024

    hello mr ss4 . can you send your ping working code plzz. im also trying same as you but im not able to ping . and mention the which version of firmware u are used. thanksss

    STeaAnswer
    ST Employee
    July 22, 2024

    Hello @ss4 & @SITARAM ,

    I suggest you follow the tutorial found in this Article as well as the working example in this GitHub repo with working Lwip Ethernet examples on the STM32H7 series.
    Regards