Troubleshooting FTP errors with Speedgoat & Simulink Real-Time (SLRT) in R2020b and beyond

31 visualizaciones (últimos 30 días)
I use Simulink Real-Time R2020b and later and try to update the target software on the Speedgoat target. I can ping the target. But when clicking the "Update Software" button in SLRT Explorer, or running the "tg.update" command, I get the following error:
>> tg = slrealtime;>> tg.updateCannot update software on target 'TargetPC1' : Cannot copy file '...\slrtssd.raw' to '/home/slrt/.config/updateos/slrtssd.raw' on target 'TargetPC1': <some error message related to FTP>
Or in newer versions of MATLAB:
Unable to update software on target computer 'TargetPC1' : Unable to copy file '...\slrtssd.raw' to '/home/slrt/.config/updateos/slrtssd.raw' on target computer 'TargetPC1': <some error message related to FTP>
You may also see errors similar to the following while trying to load a real-time application onto the target:
>> tg = slrealtime; >> tg.load('slrt_ex_osc') Unable to load 'slrt_ex_osc' on target computer 'TargetPC1': Unable to install 'slrt_ex_osc' on target computer 'TargetPC1': Unable to copy file 'C:\work\slrt_ex_osc.mldatx' to '/tmp/slrt_ex_osc.mldatx' on target computer 'TargetPC1': Upload failed "C:\work\slrt_ex_osc.mldatx". 
Examples of error messages related to FTP:
- Could not open a connection to ftp://192.168.7.5, port "21" - An internal error occurred during FTP operation "PWD": - Could not match any server responses to the PWD command: HTTP/l.1 - 503 Service unavailable

Respuesta aceptada

MathWorks Support Team
MathWorks Support Team el 29 de Mayo de 2025
Editada: MathWorks Support Team el 7 de Jul. de 2025
If you encounter an error message indicating an issue with the FTP connection between your host and target, follow these recommended troubleshooting steps to resolve the problem.

Step 1: Establish an FTP Connection from MATLAB

Use MATLAB's built-in FTP function to establish a connection to the target. By default, the username and password are both "slrt". If you have changed the password, use the new password instead. Replace the IP address with your target's IP address. For example:
>> ftpobj = ftp('192.168.7.5','slrt','slrt');

Step 2: Establish an FTP Connection Using a Third-Party Application

Download and install a third-party FTP client, such as FileZilla Client. Try to establish an FTP connection to the target using the third-party application. Check if the connection works and note any error messages.
Try uploading and downloading files from the target's /tmp/ folder via drag-and-drop.
Note: If Step 1 fails but Step 2 works, the issue may be specific to MATLAB. If both steps fail, it could be a global network or firewall issue blocking all FTP connections.

Step 3: Ensure MATLAB Can Communicate with the Speedgoat Target

Follow all the instructions in the MATLAB Answers posts below to make sure MATLAB is allowed to communicate with the Speedgoat target using all required protocols on all required ports (especially FTP ports 20-23). This is particularly important if you are using a new MATLAB installation:
.

Step 4: Upgrade to the Latest MATLAB Release

Upgrade to the latest MATLAB release if possible. If upgrading is not possible, install the latest update for your current MATLAB release.

Step 5: Use the UseActiveFTP Option

Run the following command in MATLAB to see if it resolves the issue:
>> set(slrealtime('TargetPC1'),'UseActiveFTP',true)

Step 6: Disable Proxy in MATLAB

If there is a proxy configured in MATLAB, try to disable it. Follow the instructions in the MATLAB documentation.

Step 7: Check FTP Proxy Configuration in Windows

Open the Windows command prompt. Run the command set to list all Windows environment variables. Check if the environment variable FTP_PROXY is defined. If it is, it indicates that an FTP proxy is configured on Windows. Work with your IT department to relax the FTP proxy settings if necessary.

Further Assistance

By following these steps, you should be able to identify and resolve the FTP connection issue between your host and target. If you continue to experience problems, consider reaching out to your IT department or MathWorks support for further assistance:

Más respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by