Tech support contacted me directly about this issue, so I'll post what I received from them:
After discussing with my colleagues, I have confirmed that the behavior you are observing using the "EnablePortSharing" property is expected.
The 'EnablePortSharing' option when set to 'on' would allow two separate applications (for example MATLAB and a 3rd party application, or two MATLAB processes) to bind to the same Ethernet interface and port in order to both receive the same UDP packets that are transmitted in broadcast mode by another application or a separate device/computer.
If the UDP packets are sent in unicast mode (to a specific IP and port), only one of the applications listening on that port will receive the UDP packets (as seen in this case).
In MATLAB, to broadcast / send UDP packets to all computers in the same subnet to port 8888, we would need to specify the subnet broadcast IP as the remote host (in this case '192.168.1.255') when creating the UDP object:
u = udp('192.168.1.255', 'RemotePort', 8888) Also, please note that to get information on the sender of the UDP packet (IP address and port), you can use the following syntax of the "fread" function:
[A,count,msg,datagramaddress,datagramport] = fread(obj);