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

100 views (last 30 days)

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 25 Jul 2023
Edited: MathWorks Support Team on 25 Jul 2023
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:
However, in case you need to fix the 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.
To change the IP address of your Speedgoat computer from the target command line, please follow the steps below:
1. Attach a keyboard & screen to the Speedgoat computer, or use an SSH utility like PuTTY to send commands to the target from a host computer. You can find more information on how to do this at the following link:
2. Log in as user "slrt" with the password "slrt" to access the target command line.
3. Use the following target command to review the current content of the "/etc/slrtipaddr" file:
cat /etc/slrtipaddr
By default, the content should appear as follows:
192.168.7.5 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 "192.168.3.2" with a subnet mask of "255.255.255.0", execute the following command:
echo "192.168.3.2 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.
NOTE: The procedure outlined above is specifically intended for changing the IP address of the host-target link interface. If you need to modify the IP addresses for other Ethernet interfaces (ETH1, ETH2, ...), use the "speedgoat.configureEthernet" utility linked below, or reach out to Speedgoat support

More Answers (0)

Categories

Find more on Get Started with Simulink Real-Time in Help Center and File Exchange

Tags

No tags entered yet.

Community Treasure Hunt

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

Start Hunting!