Closed nnarain01 closed 8 years ago
I figure that when a packet is received its IP is added to the ARP cache, and that's why things start working
That's correct. The reason for an ARP lookup timeout is that the ARP probe sent out by stm32plus was not received by the PC or the response from the PC was not received by stm32plus. Can you run Wireshark and set the filter to "arp" and watch the traffic? You should be able to see if the probe reaches the PC and if the PC responds. Unfortunately you won't be able to see if a reponse makes it to stm32plus.
Thank you. After looking at the arp packet I realized I needed to set the gateway as the address of my PC.
This should not be necessary. The code does a match using your PC's IP address against the subnet mask received from either DHCP lookup or static configuration. If your PC's IP address matches the subnet then it's local and an ARP probe is issued to get the MAC address. Otherwise the ARP probe is issued for the gateway's MAC address so that the frame can be sent to a different subnet.
Can you verify that your PC's IP address is covered by the subnet mask?
When attempting to send a UDP packet to a PC the ARP lookup always fails until an initial packet is received from the PC.
The error callback gives:
Network Stack Setup
Network Parameters
I figure that when a packet is received its IP is added to the ARP cache, and that's why things start working.
However I'm wondering what the possibilities could be that would cause the lookup to fail.