How can I change the IP address of my Speedgoat computer using the target command line?

83 views (last 30 days)

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 15 Oct 2025 at 0:00
Edited: MathWorks Support Team on 15 Oct 2025 at 13:32
The recommended way to change the IP address of your Speedgoat computer's host-target link interface is by using the "Change IP Address" button in SLRT Explorer: Configure Target with SLRT Explorer
However, in case you need to fix the IP address of a target that can't be reached, or you want to change the address so that it is no longer on the same subnet, it may be beneficial to do this outside of MATLAB from the target command line.
NOTE: The procedures outlined below are specifically intended to change the HostLink Ethernet interface IP address. If you need to modify the IP addresses for other Ethernet interfaces (ETH1, ETH2, ...), use the speedgoat.configureEthernet utility provided by Speedgoat.

Option 1: Use "speedgoat_setHostLink"

To change the IP address of your Speedgoat computer from the target command line, you can use the "speedgoat_setHostLink" utility provided by Speedgoat (no reboot required). See the "Configuring Host Link on the Target Machine" section in:

Option 2: Edit "slrtipaddr" file on target

Alternatively, you can follow the basic steps below:
1. Attach a keyboard & screen to the Speedgoat computer, and press CTRL+ALT+2 to enter the console. If you can ping the Speedgoat, you can also use an SSH utility like PuTTY to send commands to the target from a host computer. See: Execute Target Computer RTOS Commands at Target Computer Command Line 
2. Log in as user "root" to access the target command line (the default password is "root").
3. Use the following target command to review the current content of the "/etc/slrtipaddr" file:
cat /etc/slrtipaddr
If the target is currently configured with the IP address "172.16.20.90" and subnet mask "255.255.255.0", the content should appear as:
172.16.20.90 netmask 255.255.255.0
4. To change the target IP address, use the following target command syntax:
echo "<new_ip> netmask <new_netmask>" > /etc/slrtipaddr
Replace <new_ip> with the desired new IP address and <new_netmask> with the new subnet mask.
For example, to set the IP address to the default setting "192.168.7.5" with a subnet mask of "255.255.255.0", execute the following command:
echo "192.168.7.5 netmask 255.255.255.0" > /etc/slrtipaddr
5. Reboot the target machine to apply the IP address change.
6. Review the target screen to verify if it rebooted successfully with the new IP address.
7. Make sure to adjust the IP address, subnet mask, and default gateway settings on your host computer to match the new target IP address.
For detailed instructions, refer to the following links:
8. Launch MATLAB and verify the connection by pinging the target from the host computer:
>> system('ping 192.168.3.2')
9. Open SLRT Explorer by entering the following command:
>> slrtExplorer
10. Select the target name from the Targets Tree, enter the new IP address in the "Target Configuration" tab, and Connect.

More Answers (0)

Categories

Find more on Multicore Processor Targets 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!