Difference between revisions of "Change Network Address of Embedded Linux PC"

From Wiki
Line 3: Line 3:
 
Nevertheless here's a short how-to:
 
Nevertheless here's a short how-to:
 
   
 
   
# Log into the Embedded Linux Computer via ssh.
+
* Log into the Embedded Linux Computer via ssh.
# Check what robot '''Type''' is referenced in <code>/home/root/TinyCtrl/Data/Projects/EmbeddedCtrl.prj</code>
+
* Check what robot '''Type''' is referenced in <code>/home/root/TinyCtrl/Data/Projects/EmbeddedCtrl.prj</code>
 
<syntaxhighlight lang=xml>
 
<syntaxhighlight lang=xml>
 
[...]
 
[...]
Line 10: Line 10:
 
[...]
 
[...]
 
</syntaxhighlight>
 
</syntaxhighlight>
#Edit the IP in the file <code>/home/root/TinyCtrl/Data/Robots/<ROBOT_TYPE>/<ROBOT_TYPE>.xml
+
*Edit the IP in the file <code>/home/root/TinyCtrl/Data/Robots/<ROBOT_TYPE>/<ROBOT_TYPE>.xml
 
<syntaxhighlight lang=xml>
 
<syntaxhighlight lang=xml>
 
   <RemoteConfiguration IP="192.168.3.11" CycleTimeMS="50" Protocol="CRI_V01" />
 
   <RemoteConfiguration IP="192.168.3.11" CycleTimeMS="50" Protocol="CRI_V01" />
 
</syntaxhighlight>
 
</syntaxhighlight>
#Edit the file <code>/lib/systemd/network/10-eth0.network</code>
+
*Edit the file <code>/lib/systemd/network/10-eth0.network</code>
 
<syntaxhighlight lang=bash>
 
<syntaxhighlight lang=bash>
 
[Match]
 
[Match]
Line 25: Line 25:
 
[DHCP]
 
[DHCP]
 
#When CriticalConnection is applied to networkd, the IP address will not
 
#When CriticalConnection is applied to networkd, the IP address will not
# change after this service was reloaded. Just reboot the system.
+
#change after this service was reloaded. Just reboot the system.
 
CriticalConnection=true
 
CriticalConnection=true
 
</syntaxhighlight>
 
</syntaxhighlight>
  
#Start CPRog. Do not maximise the Window and check which Project (xml) file is loaded by looking at the title bar
+
*Start CPRog. Do not maximise the Window and check which Project (xml) file is loaded by looking at the title bar
# Close CProg and open the project file (C:\CProg\Data\Projects\<PROJECTFILE.XML>). Check what Robot file is referenced (same as in step 2.).
+
*Close CProg and open the project file (C:\CProg\Data\Projects\<PROJECTFILE.XML>). Check what Robot file is referenced (same as in step 2.).
#Edit the robot file C:\CProg\Data\Robots\<ROBOT_TYPE>\<ROBOT_TYPE>.xml
+
*Edit the robot file C:\CProg\Data\Robots\<ROBOT_TYPE>\<ROBOT_TYPE>.xml
#Change the IP in that file to the same IP that you entered in step 3.
+
*Change the IP in that file to the same IP that you entered in step 3.
#Reboot the Embedded Linux Computer.
+
*Reboot the Embedded Linux Computer.
# Make any changes required to your network settings on the Windows PC and/or Router
+
*Make any changes required to your network settings on the Windows PC and/or Router
# Done.
+
*Done.

Revision as of 15:28, 14 August 2019

Changing the IP address of the embedded Linux PC is highly discouraged, as it is very easy to lock oneself out of the system. Once that happens, only serial terminal access may remain, which requires additional hardware.

Nevertheless here's a short how-to:

  • Log into the Embedded Linux Computer via ssh.
  • Check what robot Type is referenced in /home/root/TinyCtrl/Data/Projects/EmbeddedCtrl.prj
[...]
<Robot Name="igus Gantry" Type="igus_xyzGantry" Homepos="100.0 100.0 20.0 0.0 0.0 0.0"
[...]
  • Edit the IP in the file /home/root/TinyCtrl/Data/Robots/<ROBOT_TYPE>/<ROBOT_TYPE>.xml
  <RemoteConfiguration IP="192.168.3.11" CycleTimeMS="50" Protocol="CRI_V01" />
  • Edit the file /lib/systemd/network/10-eth0.network
[Match]
Name=eth0

[Network]
DHCP=ipv4
Address=192.168.3.11/24

[DHCP]
#When CriticalConnection is applied to networkd, the IP address will not
#change after this service was reloaded. Just reboot the system.
CriticalConnection=true
  • Start CPRog. Do not maximise the Window and check which Project (xml) file is loaded by looking at the title bar
  • Close CProg and open the project file (C:\CProg\Data\Projects\<PROJECTFILE.XML>). Check what Robot file is referenced (same as in step 2.).
  • Edit the robot file C:\CProg\Data\Robots\<ROBOT_TYPE>\<ROBOT_TYPE>.xml
  • Change the IP in that file to the same IP that you entered in step 3.
  • Reboot the Embedded Linux Computer.
  • Make any changes required to your network settings on the Windows PC and/or Router
  • Done.