I am using an STM32f407 MCU with Keil UV4 and RTX. My application requires bidirectional UDP communication between several machines with static IP addresses and the MCU. I am running into a situation where I can communicate fine and then I suddenly can't. In those situations, I try to send data to the MCU from my computer, but wireshark shows my computer sending ARP request of the IP address of the MCU and no data. Should this be automatically resolved by calling the Main_TcpNet function often or do I also need to be purposely dealing with ARP?
Thanks in advance.
Don't know what's wrong with your configuration, but TCPnet can (and does) do it automatically.
Okay. So it is probably a function of an incorrect setting or how often I am calling main_TcpNet().
I am currently using Rev 4.71 of net_config.c and my ARP settings are as follows:
// </h> // <h>ARP Definitions // ================== // Address Resolution Protocol Definitions // <o>Cache Table size <5-100> // Number of cached hardware/IP addresses // Default: 10 #define ARP_TABSIZE 10
// <o>Cache Timeout in seconds <5-255> // A timeout for a cached hardware/IP addresses // Default: 150 #define ARP_TIMEOUT 150
// <o>Number of Retries <0-20> // Number of Retries to resolve an IP address // before ARP module gives up // Default: 4 #define ARP_MAXRETRY 4
// <o>Resend Timeout in seconds <1-10> // A timeout to resend the ARP Request // Default: 2 #define ARP_RESEND 2
// <q>Send Notification on Address changes // When this option is enabled, the embedded host // will send a Gratuitous ARP notification at startup, // or when the device IP address has changed. // Default: Disabled #define ARP_NOTIFY 1
Do you see anything wrong there?