Why can I ping my Speedgoat target and update the software, but the connection from MATLAB fails?
89 次查看(过去 30 天)
显示 更早的评论
MathWorks Support Team
2023-9-13
编辑: MathWorks Support Team
2024-9-5
I'm using Simulink Real-Time (SLRT) with a Speedgoat target computer. I configured Windows Defender Firewall to allow traffic between MATLAB and Speedgoat as explained in this MATLAB Answer.
I can ping the Speedgoat target and update the software from MATLAB. However, when I try to establish the host-target connection from MATLAB using SLRT Explorer or the "tg.connect" command, I get one of the following errors:
Unable to connect to target computer 'TargetPC1': Unable to connect to target computer.
Cannot connect to target 'TargetPC1': Cannot connect to target.
Unable to connect to target computer due to possible firewall issue.
采纳的回答
MathWorks Support Team
2024-9-25
编辑:MathWorks Support Team
2024-9-5
If the ping and software update succeed but the connection from MATLAB fails with one of the above errors, it is likely that incoming UDP traffic is blocked. This issue specifically affects ports used by the RTPS/FastDDS protocol. To address this, create a UDP-specific inbound rule in Windows Defender Firewall. Coordinate with your IT team to follow these steps:
You can use the following command in PowerShell, replacing <SpeedgoatIPaddress> with your Speedgoat IP address (e.g., 192.168.7.1):
New-NetFirewallRule -DisplayName "Speedgoat" -Direction Inbound -RemotePort 5505-5507,5510-5512,5515-5517 -Protocol UDP -Action Allow -Profile Any -RemoteAddress <SpeedgoatIPaddress>
Alternatively, implement the rule in the Windows Defender Firewall GUI as shown below:
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:
If the above instructions don't help resolve the communication issues with your Speedgoat hardware, refer to this MATLAB Answer for additional troubleshooting steps:
0 个评论
更多回答(1 个)
Pablo Romero
2024-1-8
编辑:Pablo Romero
2024-6-28
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 -RemotePort 5505-5507,5510-5512,5515-5517 -Protocol UDP -Action Allow -Profile Any -RemoteAddress <SpeedgoatIPaddress>
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Target Computer Setup 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!