MATLAB not receiving packets

1 回表示 (過去 30 日間)
Gideon Bergbaum
Gideon Bergbaum 2021 年 3 月 15 日
回答済み: Vidip 2024 年 2 月 21 日
Hi All,
I have some hardware that is continuously outputting packets to a multicast address. I have setup a MATLAB script that should receive the packets and store them. I have this working on an older version of Windows, so I'm pretty confident the code is working but since we upgraded our systems, the code is no longer working. This could be due to the group policy of the PCs but any troubleshooting ideas would be very helpful. I can see the incoming packets in Wireshark going to the correct address and port and I am setup via a direct connection. The network adapter used has also been set to have the highest priority. MATLAB is also successful at sending packets out to my hardware, just not receiving them.
udpport("datagram","LocalHost",'X.X.X.X',"LocalPort", X, "EnablePortSharing", true);
configureMulticast(DiscoveryListeningPort, "X");
DiscoveryListeningPort.OutputDatagramSize = 30;
When checking my defined udpport I can see 'NumAvailbaleDatagrams' 0. This is making me more confident that the packets aren't reaching MATLAB. Are there any ways to resolve this?

回答 (1 件)

Vidip
Vidip 2024 年 2 月 21 日
The packets can be rejected due to the MAC address mismatch between the remote device and address of your ethernet adapter. Apart from this, write a simple UDP multicast receiver in another programming language (such as Python) or use a network utility tool to test whether the system can receive multicast packets outside of MATLAB. This can help determine if the issue is specific to MATLAB or the system itself.
Also, check if your firewall settings are allowing incoming UDP packets on the port you're listening to. Firewalls can block incoming traffic, which would prevent MATLAB from receiving the packets.
For further information, refer to the documentation link below:

製品


リリース

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by