How can I establish communication with a Speedgoat target computer via an Ethernet interface configured as 'Public'?

88 views (last 30 days)
I am using Simulink Real-Time (SLRT) with a Speedgoat target computer. I need to configure the Windows Defender Firewall on my host PC to allow communication with the target. I have followed the steps provided in this link:
https://www.mathworks.com/matlabcentral/answers/396086-how-do-i-configure-windows-defender-firewall-for-matlab-to-communicate-with-external-hardware-such-a 
The Ethernet interface on my host PC, which is used for the host-target link, is configured as 'Public' according to the Windows Network and Sharing Center:
This means that any changes or rules I apply to the Windows Defender Firewall should be specific to 'Public' networks in order to take effect on the host-target link. However, due to my organization's IT policies, the options for 'Public' networks are grayed out when I try to allow MATLAB through the Windows Defender Firewall.
Consequently, I can perform a Speedgoat software update successfully, but I am unable to establish an actual connection to the target using MATLAB R2020b or later. I errors such as the following:
Cannot connect to target 'TargetPC1': Cannot connect to target.
or
Unable to connect to target computer 'TargetPC1': Unable to connect to target computer.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 22 Apr 2024 at 0:00
Edited: MathWorks Support Team on 23 Apr 2024 at 15:33
To ensure smooth host-target communication when using Simulink Real-Time R2020b or later, it is important to consider the configuration of the host PC Ethernet interface. If the interface is set to 'Public', disruptions in communication may occur.
One potential solution is to configure the host PC Ethernet interface used for the host-target link as 'Private'. Our documentation provides detailed instructions on how to achieve this:
However, many organizations have strict IT policies that prevent users from changing the network type to 'Private'. In such cases, the configuration may revert back to 'Public' after a period of time or following a PC restart.
To address this challenge, we recommend implementing the following Inbound rule in Windows Defender Firewall instead. We advise involving your IT helpdesk to assist you with this process:
1. Find "Windows Defender Firewall with Advanced Security" by using the Windows search:
2. Create a new custom inbound rule:
3. Allow UDP connections from remote ports 5505-5507, 5510-5512, 5515-5517:
4. Optionally, for enhanced security and to restrict the rule's scope, consider adding the Speedgoat's remote IP address:
5. Ensure that the rule applies to all three network types (Domain, Private, and Public) as illustrated below:
However, you can configure the firewall by using the following command in Windows Powershell. Please replace the 'SpeedgoatIPaddress' with your Speedgoat IP address.
New-NetFirewallRule -DisplayName "Speedgoat" -Direction Inbound -LocalPort 5505-5507,5510-5512,5515-5517 -Protocol UDP -Action Allow -Profile Any -RemoteAddress <SpeedgoatIPaddress>

Further Troubleshooting

If the above instructions don't help resolve the communication issues with your Speedgoat hardware, refer to the following MATLAB Answers post for further troubleshooting steps:

More Answers (1)

Pablo Romero
Pablo Romero on 8 Jan 2024
You can also use the following cmdlet in Powershell to configure the firewall accordingly in one single step. Please replace <SpeedgoatIPaddress> with your Speedgoat IP address, for example, 192.168.7.1 or remove that argument completely.
New-NetFirewallRule -DisplayName "Speedgoat" -Direction Inbound -LocalPort 5505-5507,5510-5512,5515-5517 -Protocol UDP -Action Allow -Profile Any -RemoteAddress <SpeedgoatIPaddress>

Categories

Find more on Get Started with Simulink Real-Time in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!