Simulink on Windows 11 cannot talk to WSL2 app over UDP sockets

12 views (last 30 days)
Hi,
I'm running a Simulink model on Windows 11 Pro that has "UDP Send" blocks. The "UDP Send" block will send UDP packets to the address and port you specify. I am trying to communicate from an executing Simulink model over UDP to a simple UDP client running on WSL2. My WSL2 system is configured for mirrored networking with loopback addressing enabled. However, I cannot receive any packets on my WSL2 UDP client, although when I run the exact same program ported to Windows it works perfectly fine. I can send UDP packets manually from Windows 11 to WSL2 on the command line in PowerShell, so I know the network path is fine. Something about the Simulink UDP implementation is unusual in that is does not send UDP packets to sockets in my WSL2 environment. I have tried so many things (using physical IP address, broadcast, loopback, etc.) and I have disabled checksums in WSL2 and temporarily turned off the both the Windows Defender firewall and Hyper-V firewall. Nothing works. Anyone have any ideas?
Thanks,
-Luke

Answers (0)

Products


Release

R2024b

Community Treasure Hunt

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

Start Hunting!