Ethernet

How to set up the Ethernet, and how it is used

Ethernet

There is one Ethernet port on the board, which has a variety of uses.
The Ethernet is set 100M, and this cannot be changed.  The ETH LED (yellow) on the board, and the left hand LED in the ethernet socket work together, to indicate the following:
LED off - No connection
LED on - Connection present
LED blinking - data being transferred.
The Ethernet port can connect in TCP mode, or  it can just send data in UDP mode.  The usage of the ethernet port is determined by the Option Switch. 
Each board has it's own MAC address, and this is printed on a label on the board.  The MAC address is also the serial number of the board.

Using the Ethernet

The Ethernet is used for connection to your control computer.  For JMRI, the data on the CBUS is packetised, and can be used on the MERG CBUS window.  Rocrail user should be able to use the data directly.  Other train control systems will be accomodated in time.

Setting IP Address

The hub comes with a default IP Address of 192.168.200.100, unless you have asked us during ordering to change it.
In order to change the address, you must do the following.
1] Switch the Option Switch to position "F".
2] Use the arp table from the terminal or command window to set a new IP address, using the MAC address on the board.
3] Ping the new IP address with a Ping packet of length 40 (this set sets the new IP address).
4] Check the new IP address by sending a Ping with default length (32)
5] Switch the Option Switch to the working position required (0-E)
A detailed set of instructions for Windows, Linux and Apple is below.  As there are so many variations in operating systems, if you find that these instructions are not correct, please email us, and we will amend this page.

Setting IP address in Windows

You need to open a Command Prompt Window, with Administrator privileges. This can be done from the Start Menu, either directly, or going through "All Programs>Accessories, and then right clicking on "Run as Administrator". Windows has multiple ways of getting to the Administrator Command Prompt, depending on which version of Windows you are running - but there is plenty of help on the web if you get stuck. Check the arp table using the command arp -a
If you are altering the IP address, rather than setting it for the first time, then you will see an entry in the table with the IP address and the MAC such as
192.168.100.200 54-10-ec-e4-d2-7e
If this occurs, delete the entry by typing
arp -d 192.168.100.200
and then check that the entry has disappeared by typing arp -a
In this example, the required IP address is 192.168.100.201, and the MAC address on the label is 54-10-ec-e4-d2-7e. Substitute your required IP address and MAC address as required.
Do the following commands (type each command as is, with spaces, followed by return).
1] Type arp -s 192.168.100.201 54-10-ec-e4-d2-7e
2] Type ping -l 40 192.168.100.201
3] Type ping 192.168.100.201
Step[1] populates the arp table, associating the IP address 192.168.100.201 with the MAC (hardware) address of 54:10:ec:e4:d2:7e
Step[2] send a Ping command to the Hub, with a length of 40 (the -l 40 bit), and this instructs the hub to alter the IP address. (the "l" is a small "L", not a capital "i".
Step[3] checks that step[2] has worked, by pinging the new IP address.





Setting IP address in Linux

In Linux, open a terminal window. In this example, the required IP address is 192.168.100.201, and the MAC address on the label is 54-10-ec-e4-d2-7e. Substitute your required IP address and MAC address as required. Do the following steps:
1] Type sudo arp -s 192.168.100.201 54:10:ec:e4:d2:7e
2] Type ping -c 4 -s 40 192.168.100.201
3] Type ping -c 4 192.168.100.201
Step[1] populates the arp table, associating the IP address 192.168.100.201 with the MAC (hardware) address of 54:10:ec:e4:d2:7e
Step[2] send a Ping command to the Hub, with a length of 40 (the -s 40 bit), and this instructs the hub to alter the IP address.
Step[3] checks that step[2] has worked, by pinging the new IP address.Remember, in Linux, if typing the Ping command to make sure the connection is live, you must also type -c 4 for 4 repetitions - if you forget the -c command, it will continue to ping until you shut the command window down.

Setting IP address in Apple

More to come .....

Ethernet Data

JMRI and MERG FCU can connect with the hub using TCP.  The format of the data sent is identical, as you should use the MERG window in JMRI to get data into the JMRI system.  This data is essentially the CBus data, packaged as would be expected.
There is a UDP packet identifying the hub, with MAC number and various other information, that occurs about once very 30 seconds.