cancel
Showing results for 
Search instead for 
Did you mean: 

ARP response but no ACK from TCP server (stm32f4+freertos+lwip)

KNg.3
Associate

I'm implementing a TCP/HTTP server on a custom board with a LAN8710A PHY. The board is connected to a PC via an ethernet cable with static IP assigned on both sides. I'm stuck at Netconn_accept() (when I enable LWIP_SO_RCVTIMEO I see that Netconn_accept times out). On Wireshark I can see ARP request from the PC and the correct ARP response from STM. I also see a SYN request from the PC, followed by TCP retransmissions of SYN, but STM never responds back with an ACK. I don't know for sure if the ACK request ever gets to STM. Unfortunately I haven't been able to get USB_OTG to work either so I can't see any LWIP debug messages other than setting breakpoints.

I know this is not a new issue from all the online discussions I've come across, and it is a mystery to me why some get it to work and many don't, following essentially the STM examples. I'm hoping someone skilled with the art can give me some pointers given the symptoms I described above.

1 REPLY 1
KNg.3
Associate

I made some progress with USB_OTG_FS, and now get these debug messages when I start the system with the board connected to the PC. Is it obvious to anyone why the source and destination addresses from ethernet_input are always 0:0:0:0:0:0, when ARP request and reply have clearly been processed correctly (169.254.134.127 is PC, 169.254.134.254 is stm32f4)?

"9/11/2020 12:59:44 PM",etharp_timer

"9/11/2020 12:59:44 PM",pbuf_alloc(length=60)

"9/11/2020 12:59:44 PM",pbuf_alloc(length=60) == 0x2002d190

"9/11/2020 12:59:44 PM",ethernet_input: dest:0hx:0hx:0hx:0hx:0hx:0hx, src:0hx:0hx:0hx:0hx:0hx:0hx, type:ff

"9/11/2020 12:59:44 PM",pbuf_remove_header: old 0x2002d1a0 new 0x2002d1ae (14)

"9/11/2020 12:59:44 PM",etharp_update_arp_entry: 169.254.134.127 - 8c:16:45:3c:7d:02

"9/11/2020 12:59:44 PM",etharp_find_entry: found matching entry 0

"9/11/2020 12:59:44 PM",etharp_update_arp_entry: updating stable entry 0

"9/11/2020 12:59:44 PM",etharp_input: incoming ARP request

"9/11/2020 12:59:44 PM",pbuf_alloc(length=28)

"9/11/2020 12:59:44 PM",pbuf_alloc(length=28) == 0x2002a61c

"9/11/2020 12:59:44 PM",etharp_raw: sending raw ARP packet. 169.254.134.254 to 169.254.134.127

"9/11/2020 12:59:44 PM",pbuf_add_header: old 0x2002a63c new 0x2002a62e (14)

"9/11/2020 12:59:44 PM",ethernet_output: sending packet 0x2002a61c, src 00:80:e1:00:00:00 to dst 8c:16:45:3c:7d:02

"9/11/2020 12:59:44 PM",pbuf_free(0x2002a61c)

"9/11/2020 12:59:44 PM",pbuf_free: deallocating 0x2002a61c

"9/11/2020 12:59:44 PM",pbuf_free(0x2002d190)

"9/11/2020 12:59:44 PM",pbuf_free: deallocating 0x2002d190

"9/11/2020 12:59:45 PM",etharp_timer

"9/11/2020 12:59:45 PM",pbuf_alloc(length=60)

"9/11/2020 12:59:45 PM",pbuf_alloc(length=60) == 0x2002d190

"9/11/2020 12:59:45 PM",ethernet_input: dest:0hx:0hx:0hx:0hx:0hx:0hx, src:0hx:0hx:0hx:0hx:0hx:0hx, type:ff

"9/11/2020 12:59:45 PM",pbuf_remove_header: old 0x2002d1a0 new 0x2002d1ae (14)

"9/11/2020 12:59:45 PM",etharp_update_arp_entry: 169.254.134.127 - 8c:16:45:3c:7d:02

"9/11/2020 12:59:45 PM",etharp_find_entry: found matching entry 0

"9/11/2020 12:59:45 PM",etharp_update_arp_entry: updating stable entry 0

"9/11/2020 12:59:45 PM",etharp_input: incoming ARP request

"9/11/2020 12:59:45 PM",pbuf_alloc(length=28)

"9/11/2020 12:59:45 PM",pbuf_alloc(length=28) == 0x2002a61c

"9/11/2020 12:59:45 PM",etharp_raw: sending raw ARP packet. 169.254.134.254 to 169.254.134.127

"9/11/2020 12:59:45 PM",pbuf_add_header: old 0x2002a63c new 0x2002a62e (14)

"9/11/2020 12:59:45 PM",ethernet_output: sending packet 0x2002a61c, src 00:80:e1:00:00:00 to dst 8c:16:45:3c:7d:02

"9/11/2020 12:59:45 PM",pbuf_free(0x2002a61c)