Why is my USB device not recognized by the Speedgoat target computer, with an error saying "USB serial port error: No such file or directory", when using Simulink R2023a?

15 visualizzazioni (ultimi 30 giorni)
I am trying to use "Legacy Serial" blocks from the Simulink Real-Time library in my model to communicate with a device that I connected to the USB port of the Speedgoat. I chose "USB Serial Port 1" for the Serial Port in the block parameters. However, when I try to run the model on the Speedgoat computer, I get this error:
Error running 'testmodel' on target computer:
Unable to load 'testmodel' on target computer 'TargetPC1':
TESTMODEL:INITIALIZE ERROR:USB serial port 1 error: No such file or directory
I tried out the other ports 2-8, it made no difference. How do I resolve this error?

Risposta accettata

MathWorks Support Team
MathWorks Support Team il 2 Set 2025
Modificato: MathWorks Support Team il 15 Set 2025 alle 18:16
This error message means that the device has not been found. Some debugging tips are as follows:
1) Double-check your hardware setup. Try a different cable if possible, other chipsets may bay recognized by the Speedgoat Target.
2) Follow the steps below for further diagnosis:
  1. Unplug the USB cable from the Speedgoat and plug it back in.
  2. Connect a PuTTY session to the Speedgoat target computer. See this example and use "slrt" for both the username and password: Execute Target Computer Command-Line Commands Via SSH
  3. Then, run the following command:
>> ls /dev
You will want to look and confirm whether a device exists by the name of "/dev/serusb<x>". For example, if the device is plugged into serial port 1, you will look for "dev/serusb1".
3) Some Speedgoat units have various USB port types (2.x and 3.x). If yours has multiple USB port types, try inserting the cable into each of these and try step 2 again to see if they show up. 
4) Connect the USB cable to the Windows host PC and check in the "Device Manager" under "Ports (COM & LPT)" tree. Confirm whether the cable appears there, and how it appears.
5) Confirm whether the USB cable appears on the other device (how to do this depends on the operating system of the other device).
6) Use another interface on the target. Try using another form of communication, for example the 9-pin serial interface, instead of the USB interface on your target deceive.
7) It is possible to use the target to communicate over UDP communication back to the host computer. This documentation page gives a basic example of how to re-use the host-target connection to facilitate UDP communication: Target to Host Transmission by Using UDP
8) If the above doesn't help, contact 
 with the outcome from the debugging steps above, as well as detailed information about your setup:
  1. What is the other device that you are trying to communicate with?
  2. Do you have any additional technical information, such as the chipset used and required drivers?
  3. What kind of cable are you using?

Più risposte (0)

Categorie

Scopri di più su Simulink Coder in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by