I'd like to implement a UDP echo client/server using Simulink (client) and Java (server). I'm able to send an integer value from Simulink client (using "UDP Send" block)** and receive it in the server. However, I wasn't able to receive the echoed value in Simulink client. The "UDP Receiver" times out each time no matter how high the timeout value is set to (I tried from 5 up to 50). (I double checked the port number and IP addresses in my Java code; it looks fine and there are no other exceptions on the server end).
I set the simulation configuration parameters to start at 0.0 and stop at 1.0 with a fixed-step (auto) solver. The priority values for send and receive blocks are set to 1 & 2 respectively so that the receive block is executed after send. Attached a snapshot of the receive block parameters.
** I had some issues in receiving the integer value in the Java code from "UDP Send" due to my lack of experience in Matlab/Simulink. The problem was resolved following a response I received from another user. Here is the link: How to receive a Simulink constant value in Java code?.