Hardware Support: Connecting Multiple Computers to LocoNet® via JMRI LocoNet Server
This page describes how to use the inbuilt LocoNet® Client/Server capability of JMRI to connect multiple computers to a single LocoNet-equipped layout.Briefly, one computer is physically connected to the LocoNet, and acts as a "Server" for others. One or more "Client" computers can then connect via standard TCP/IP protocols to the Server.
Setup for JMRI LocoNet Client/Server
One computer running JMRI acts as the Server, which is directly connected to the LocoNet, the other computers running JMRI connect to the Server computer as Clients.- Configure the LocoNet connection just like for any other use. Select the protocol that corresponds to your hardware (e.g. LocoBuffer-II, etc), the communication port, and other options. It's best to make sure this is working well before proceeding.
- You can then manually start the server by selecting "Start LocoNet Server" from the LocoNet menu. This will allow other computers to connect to the layout until you stop the program; the next time you start it, you'll have to do this again.
- You can also have the server start automatically every
time you start the program by
- Open the Preferences from the Edit menu (on Windows or Linux) or from the Application menu (OS X)
- Under "Start Up", click "Add ▾"
- Select "Perform action..."
- Find and select "Start LocoNet Server" and click "OK"
- Save the preferences.
The program in the Client computer can then be configured to connect to the layout via the LocoNet Server by:
- Make sure the Server computer is running the LocoNet server
- Open the program on the Client computer
- Open the preferences from the Edit menu
- For layout connection, select "LocoNet Server"
- In the "Server hostname" box that appears, type the Internet name or address of the computer that's running the LocoNet Server. An internet address is something like 127.0.1.12; a name is something like jmri.org
- Save the preferences and restart the program.
Notes:
- It's strongly recommended that you connect the master computer to the LocoNet with a LocoBuffer or LocoBuffer-II. Although a MS-100 will basically work for this application, correction of the resulting occasional LocoNet errors may cause noticeable delays in updating the remote computers.
- If the computers are all close to the LocoNet, e.g. acting as local control panels, you don't really need LocoNet Server to do this. You can instead connect each of the computers to the LocoNet via their own LocoBuffer or LocoBuffer-II (or MS-100, though this is not recommended) and have them individually take part in the LocoNet communications. This doesn't cause any additional communications load. It does cost a little more for the extra adapters, and doesn't permit you to put a computer remote from the layout.
LocoNet® is a registered trademark of Digitrax, Inc.