필터 지우기
필터 지우기

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

조회 수: 87 (최근 30일)
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.

채택된 답변

MathWorks Support Team
MathWorks Support Team 2024년 4월 22일
편집: MathWorks Support Team 2024년 4월 23일
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:

추가 답변 (1개)

Pablo Romero
Pablo Romero 2024년 1월 8일
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>

카테고리

Help CenterFile Exchange에서 Get Started with Simulink Real-Time에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by