Troubleshooting connection issues with Speedgoat target computers

344 views (last 30 days)
How do I troubleshoot connection issues between my Windows or Linux host PC, and a Speedgoat target computer configured with Simulink Real-Time (SLRT)?

Accepted Answer

MathWorks Support Team
MathWorks Support Team about 21 hours ago
Edited: MathWorks Support Team 30 minutes ago

1. Involve your IT team

Some of the steps below may require system administrator permission and will be easier to follow with the expertise of your IT helpdesk.

2. Connect a screen to verify Speedgoat boot-up & software version

Connect a screen to your Speedgoat to verify the successful boot-up. You should see a black screen displaying the software version, IP address, and system log. If the target software version is R2020a or earlier, you must use the Target Migration Tool to operate the Speedgoat with MATLAB R2020b and later. See this MATLAB Answer for more information. For assistance with the dual-boot feature, the Target Software Migration tool, or boot errors, contact Speedgoat support.

3. Use a direct wired connection

Use a direct point-to-point Ethernet connection between the Speedgoat and your host PC for troubleshooting. This helps rule out the impact of network devices like hubs, switches, or routers that might be blocking the connection.
Note that we develop and test Simulink Real-Time with the assumption that the host and target are connected directly through a local network (LAN) with the same subnet. For remote access, the recommended approach is to install a host PC next to the Speedgoat real-time target machine and then establish a remote desktop connection to this PC. For more information, see:

4. Allow MATLAB through the firewall

On Windows PCs, Speedgoat connection issues are mostly caused by Windows Defender Firewall blocking the host-target communication. This is particularly relevant if you are setting up a Speedgoat connection for the first time, if you are upgrading to a new version of MATLAB, or in case a Windows Update or other IT software rollout wiped out your existing settings.
Refer to the following MATLAB answers for a detailed description of the steps to follow:
Users with Linux host PCs may find this link helpful:

5. Ping your Speedgoat target

Next, try to ping the Speedgoat target from the host PC command line using the IP address shown on the target screen, for example:
> ping 192.168.3.1
If the ping fails, double-check the IP address and subnet mask that you selected for the Speedgoat computer and development computer Ethernet interface. For details, see:
  • Ethernet Interface Configuration (Linux)
  • To change the Speedgoat IP address from its command line, see this MATLAB answer.

    6. Update the target software

    Once the target is reachable via ping, we need to ensure that the target software version matches the versions of MATLAB, the Simulink Real-Time Target Support Package & Speedgoat I/O Blockset installed on your host PC. Use the following commands in MATLAB to enforce a software update:
    >> tg = slrealtime; >> tg.update('force',true);
    After the target has rebooted, verify that the connection is successful - the command below should not return an error:
    >> tg.connect;

    7. Configure the Ethernet interface as 'Private'

    If "tg.connect" fails with a generic "Unable to connect" error, it is recommended to configure the host PC Ethernet interface used for the host-target link as 'Private'. Having the Ethernet interface configured as 'Public' may block certain protocols used for the host-target communication. Follow the instructions here:
    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 some time, or following a PC restart. To address this challenge, allow incoming UDP traffic on ports 55xx as shown in the following answer:

    8. Open ports used by Simulink Real-Time

    Make sure to allow the ports mentioned in the post below through your firewall and network, as explained in the following MATLAB Answers Post:

    9. Verify Ethernet interface properties

    When configuring the properties of the Ethernet interface on the host PC, we typically recommend disabling everything except IPv4. Do this with any Ethernet interface used for host-target communication. See the attached screenshot ethernetAdapterSettings.png. This step is particularly important in the case where third-party Ethernet drivers are installed, such as the Beckhoff Ethernet driver for EtherCAT.
    Another thing to check is that sometimes multiple IP addresses are assigned to the Ethernet card for host-target communication. It's better to have one unique IP address assigned when working with the Speedgoat target. The attached screenshot ethernetConfigs.png shows where the multiple IP addresses would be listed. 

    10. Try different hardware & avoid USB-Ethernet adapters

    Try using different hardware components, such as cables, host PC, Ethernet interface on the host, USB-Ethernet adapter, or docking stations. USB-Ethernet adapters are particularly known to cause problems and it is always worth swapping your currently used adapter with another one. It is recommended to use a direct Ethernet interface whenever possible.

    11. Update the Ethernet driver on your PC

    In some cases, updating the Ethernet network interface card (NIC) driver resolves communication issues with the target computer.

    12. Check for additional firewall and antivirus software

    While Windows Defender is the most common firewall software, there may be additional software active on Windows systems. Run the following command in MATLAB to get the list of all antivirus software present on your Windows development computer:
    [~,antivirus]=system('WMIC /Node:localhost /Namespace:\\root\SecurityCenter2 Path AntiVirusProduct Get displayName /Format:List')
    For every software returned by the above command, with the help of your IT team, make sure that:
    1. The firewall/antivirus software allows the <matlabroot>\bin\matlab.exe process through the firewall. The software will have to be configured for every installed version of MATLAB that you intend to use with Speedgoat hardware.
    2. The firewall/antivirus software does not block the IP addresses, ports, or protocols that the development and target computers use to communicate (see step 8).
    For Symantec Endpoint Protection software, see:

    13. Temporarily disable firewall and antivirus software

    If possible, temporarily disable all firewall and antivirus software on your PC. You can either do this manually or by booting your PC in "Windows Safe Mode with Networking", as explained in the link below:
    NOTE: By disabling one firewall/antivirus software, another software (usually Windows Defender Firewall) may automatically be activated as a fallback.
    If your IT does not allow this, try another host PC that is air-gapped (not connected to the company network and/or internet).

    14. Contact MathWorks technical support

    If the above troubleshooting steps don't resolve the issue, contact MathWorks technical support with the following information:
    • A detailed description of your network setup.
    • The outcome after performing the troubleshooting steps above.
      1 Comment
    Stefanie Schwarz
    Stefanie Schwarz on 24 Apr 2023
    Edited: Stefanie Schwarz on 17 Oct 2023
    Hi Pedro, is there any chance to use an offline PC in a separate lab or so that does not have to fully comply with company IT policies? For more feedback regarding your specific inquiry regarding the domain, please contact MathWorks technical support.

    Sign in to comment.

    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.

    Categories

    Find more on Troubleshooting in 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!