Difference between revisions of "IP Address"

From SoftMC-Wiki
Jump to: navigation, search
Line 44: Line 44:
  
 
Note that '''inet addr''' will show your MC's current IP address, and not '''10.4.20.210''' as in the example above.
 
Note that '''inet addr''' will show your MC's current IP address, and not '''10.4.20.210''' as in the example above.
 
== Setting Temporary IP Address ==
 
 
Create a temporary IP address:
 
<pre>sudo /sbin/ifconfig eth0 90.0.0.51
 
</pre>
 
Your MC will get the new IP address.
 
 
[[Image:TANK-SETUP-SCR5.PNG|600px]]
 
 
{{Note| The above example sets the permanent IP address only, this address will vanish immediately after }}
 
  
 
= Setting the Permanent Default IP Address =
 
= Setting the Permanent Default IP Address =
 
Once the temporary IP address has been set, you can connect to the MC with ControlStudio:
 
 
{{Note| Your PC must have Ethernet port configured for the same address, that is: '''90.0.0.1''' }}
 
 
 
The following steps describe how to set the default IP address. <br/>
 
The following steps describe how to set the default IP address. <br/>
 
To set a non-default address, use the command [[MC-Basic:SYSTEM.IPADDRESSMASK|SYS.IPADDRESSMASK]]  
 
To set a non-default address, use the command [[MC-Basic:SYSTEM.IPADDRESSMASK|SYS.IPADDRESSMASK]]  
Line 68: Line 52:
 
Create a text file FWCONFIG (no extension) with the following content:
 
Create a text file FWCONFIG (no extension) with the following content:
 
<pre>
 
<pre>
ipaddressmask 90.0.0.51:255.0.0.0
+
ipaddressmask aaa.bbb.ccc.ddd:255.255.255.0
 
sleep 20
 
sleep 20
 
ramdisksize=64 mByte
 
ramdisksize=64 mByte
Line 74: Line 58:
 
</pre>
 
</pre>
  
 +
Where aaa.bbb.ccc.ddd holds the permanent IP address you are interested in assigning to the MC.<br/>
 
For more details on the FWCONFIG file refer to: [[Debugging_softMC_Firmware_Linux#FWCONFIG | FWCONFIG syntax]]
 
For more details on the FWCONFIG file refer to: [[Debugging_softMC_Firmware_Linux#FWCONFIG | FWCONFIG syntax]]
  

Revision as of 13:07, 27 August 2014

Introduction

There are three ways to define the IP address of softMC:

  • DHCP - the recommended method
  • Fixed IP address
  • Manual IP address - assigned by ControlStudio.


Cable Connections

Two connections are needed:

Serial:

  • Connect MC's COM1 serial port to your PC's serial port using a serial cable.

Ethernet

  • Connect MC on Ethernet port 1 (LAN) via to the network where your PC is connected to (or directly with cross-cable to the PC)

Serial Communication Parameters

Open any serial console program. Putty, for example, can be downloaded from http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html.
Configure the serial port with the following parameters and click 'open':

Putty Config0.JPG Putty Config1.JPG

Connecting to Motion Controller

Once the communication parameters are set and the serial cable is connected between MC and PC, turn on the MC.

On the serial console screen you will see the boot printouts. After MC boot is complete, type:

/sbin/ifconfig

Putty Config2.JPG

You will see:

Putty Config3 1.JPG

Note that inet addr will show your MC's current IP address, and not 10.4.20.210 as in the example above.

Setting the Permanent Default IP Address

The following steps describe how to set the default IP address.
To set a non-default address, use the command SYS.IPADDRESSMASK

Creating FWCONFIG File

Create a text file FWCONFIG (no extension) with the following content:

ipaddressmask aaa.bbb.ccc.ddd:255.255.255.0
sleep 20
ramdisksize=64 mByte
StringPreload=300000

Where aaa.bbb.ccc.ddd holds the permanent IP address you are interested in assigning to the MC.
For more details on the FWCONFIG file refer to: FWCONFIG syntax

Setting the IP Address of the Motion Controller

Save the FWCONFIG file in the current directory of the ControlStudio. From the ControlStudio terminal window send the file to the MC.

-->privilegelevel=1
-->send FWCONFIG

Now you can reset the MC and it will boot up with the 90.0.0.51 address.

Getting the IP Address from DHCP Server

Once the temporary IP address has been set, you can connect to the MC with ControlStudio:

NOTE-Info.svgNOTE
Your PC must have Ethernet port configured in the same address space e.g. 90.0.0.1

Creating FWCONFIG File

Create text file FWCONFIG (no extension) with the following content:

ipaddressmask dhcp
sleep 20
ramdisksize=64 mByte
StringPreload=300000

For more information on setting up the FWCONFIG file, refer to: FWCONFIG syntax

Setting the IP Address of the Motion Controller

Save the file in the current directory and send it to MC using:

-->privilegelevel=1
-->send FWCONFIG

typed from the terminal windows of ControlStudio.

Now you can reset the MC and it will boot up with the IP address from DHCP pool. This is how the default IP address is set, the non-default address can be set using SYS.IPADDRESSMASK command.