w5500 UDP server. Updating sender information for incoming packets

Hello to all Wiznet users.
Help me solve the problem? I’m using a w5500 in UDP server mode and a stm32h750 connected to the router. I don’t use libraries, I work with registers directly.
If the first user sends a message to my server, I see under the stm32 debug in the packet the IP address, port and length of the message. I use this to know where to report the answer. But if a second user sends a message to this socket, I see the first user’s IP address and port in the second user’s message. Only the length of the message changes. Why is the IP address and port information not updated if the message comes from different users from different PCs on the same subnet. How can I force it to update? Or is it necessary to restart the server after each message?

This should not happen, each data chunk including its header must provide valid information. Maybe you read this data from wrong location?

1 Like

Thank you, Eugeny, you suggested a solution. I checked my code again and found an error there. Using a circular receive buffer, I did not take care of the increment in the function that takes the address. I’m ashamed. I’ll rewrite the code soon and most likely everything will work.

1 Like