Why am I unable to connect to my Speedgoat target computer after upgrading to R2020b or later?

조회 수: 218(최근 30일)
I am trying to upgrade my Speedgoat target computer to Simulink Real-Time R2020b or later, which comes with a new 64-bit QNX real-time operating system. 
The target migration and software update were successful. On the target screen, I can see that the Speedgoat boots correctly.
However, the host-target connection between my Speedgoat hardware and MATLAB fails. When I press the connection button in Simulink Real-Time Explorer, MATLAB will either hang, or I get errors such as the following:
Cannot connect to target 'TargetPC1': Timed-out waiting for target connection.
Cannot connect to target 'TargetPC1': Cannot connect to target.
I receive the same error when I try to connect to my Speedgoat using the 'connect' command in the MATLAB Command Window:
>> tg= slrealtime;
>> tg.update('force',true);
>> tg.connect
However, clicking the 'Update' or 'Reboot' buttons in Simulink Real-Time Explorer will work, indicating that the target can be reached on the network. I am able to ping the Speedgoat, and I can access the target command line using an SSH client (e.g. PuTTY).
Furthermore, I had no issues with the host-target communication in R2020a and earlier using the exact same setup.

채택된 답변

MathWorks Support Team
MathWorks Support Team 2022년 9월 28일
편집: MathWorks Support Team 2022년 6월 21일
In MATLAB R2020b and later, Simulink Real-Time uses a new protocol and ports for the host-target connection. As a result, the firewall or security configuration needs to be adjusted. Go through the following with your IT team:

1. Configure Your Firewall(s)

Windows Defender Firewall may block the new protocol for the host-target connection by default for networks classified as 'Public'. Note that Windows classifies all Ethernet connections as 'Public' by default.
This problem can be resolved by allowing MATLAB to communicate on all types of networks -- either when prompted on the first connection, or later via the Windows Defender Firewall Allowed apps section. If that is not possible due to privilege restrictions, the issue can also be resolved by changing the classification of the Ethernet interface used for host-target connection from 'Public' to 'Private'.
Refer to the following MATLAB Answers post for a detailed description of steps to follow:
Other Firewalls or Antivirus Software will have to be adjusted in a similar manner if they are enabled on your host computer.
Important Note: If you are using a standalone application created with MATLAB Compiler to connect to the target, make sure that the application (e.g. "app1.exe") is added to your firewall exception list rather than matlab.exe.

2. Allow Ports Used by Simulink Real-Time

Make sure to allow the ports mentioned in the post below through your firewall, network hubs/switches, and VPN security configuration (in case you connect to your target remotely), as explained in the following MATLAB Answers Post:

3. Further Troubleshooting

If the above doesn't help, refer to the following MATLAB Answers post for further troubleshooting steps:

추가 답변(1개)

Pablo Romero
Pablo Romero 2022년 5월 4일
Please don't forget to check out the following resource from the MathWorks documentation with the most up-to-date recommendations to troubleshoot your host-target connection.

Community Treasure Hunt

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

Start Hunting!

Translated by