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

240 views (last 30 days)
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.
Unable to connect to target computer 'TargetPC1': Unable to connect to target computer.
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.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 14 Sep 2023
Edited: MathWorks Support Team on 14 Sep 2023
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)

The first important step is to allow MATLAB to communicate through the firewall(s) on all types of networks -- Public, Private, and Domain.
Refer to the following MATLAB Answers post for a detailed description of the steps to follow:
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. Considerations for Ethernet interfaces configured as 'Public'

Windows Defender Firewall and other firewalls 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.
If the solution from item 1 didn't help, or if you are unable to follow the steps 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', or by creating an additional inbound UDP rule. Refer to the following MATLAB Answers post for details:

3. Unblock Ports Used by Simulink Real-Time

Contact your IT department to have the ports mentioned in the post below unblocked through firewalls, network hubs/switches, and VPN security configurations (in case you connect to your target remotely), as explained in the following MATLAB Answers Post:
 

4. Further Troubleshooting

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

More Answers (1)

Pablo Romero
Pablo Romero on 4 May 2022
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!