Files
2026-06-17 14:00:51 +02:00

211 lines
8.4 KiB
Plaintext

<!DOCTYPE html>
<html lang="en">
<head>
<meta name="generator" content="HTML Tidy for HTML5 for Apple macOS version 5.8.0">
<title>JMRI: Network Access</title>
<meta name="author" content="Bob Jacobsen">
<meta name="keywords" content="JMRI network access"><!--#include virtual="/help/en/parts/Style.shtml" -->
</head>
<body>
<!--#include virtual="/help/en/parts/Header.shtml" -->
<div id="mBody">
<!--#include virtual="Sidebar.shtml" -->
<div id="mainContent">
<h1>JMRI Code: Network Access</h1>
<p>This page describes various forms of network access available in JMRI. More capabilities
are added all the time, so please check with the user group for up-to-date information.</p>
<h2>Methods of Network Access</h2>
JMRI interacts with networks in two basic forms: downstream connections and upstream
connections.
<p>A downstream connection allows JMRI to connect to a layout via a network for operations
and control. This uses a network connection to do the same kinds of things that are often
done via serial RS232 and USB links. In the client-server architecture, JMRI is usually one
of potentially many clients connecting to a server in this case.</p>
<p>An upstream connection allows other devices to command JMRI over a network connection. In
this case, the network connection allows other devices and/or programs to do things that are
normally done via scripts and the graphical user interface. In the client-server
architecture, JMRI is usually a server with one or more clients connecting to it in this
case.</p>
<p>Note that the JMRI JSON and Web servers can be used by other layout-connected devices such
that both the JMRI application and the other device can be simultaneously "downstream" and
"upstream" of each other for specific aspects of layout control. In this case, although JMRI
is functionally the server (in a client-server architectural sense), it is receiving layout
updates from the client device.</p>
<p>In the rest of this page, we provide links to the various examples of those two general
areas.</p>
<h2>Downstream (networked layout hardware) connections</h2>
<ul>
<li>LocoNet systems
<ul>
<li>
<a href="../../hardware/loconet/LbServer.shtml">LocoNet over TCP</a>
<p>This uses <a href="https://loconetovertcp.sourceforge.net/">LocoNet over TCP</a> to
provide client-server access to the LocoNet message stream from <a href=
"https://loconetovertcp.sourceforge.net/Server/index.html">various servers</a>.</p>
</li>
</ul>
</li>
<li>C/MRI
<ul>
<li>This exchanges the C/MRI poll/response protocol via a <a href=
"../../hardware/TerminalServer.shtml">terminal server</a>
</li>
</ul>
</li>
<li>CAN via GridConnect Network Interface
<ul>
<li>This network interface can be used for the <a href=
"../../../package/jmri/jmrix/openlcb/swing/hub/HubPane.shtml">OpenLCB Hub Control</a>
</li>
</ul>
</li>
<li>CAN via MERG Network Interface
<ul>
<li>The network interface can be used for the CANEther, CANGC1e, CANPi, <a href=
"https://github.com/phillipsnj/mergCbusServer">CBUS&reg; Server</a>, or <a href=
"../../../package/jmri/jmrix/can/cbus/swing/hubpane/CbusHubPane.shtml">CBUS&reg; Hub Control</a></li>
</li>
</ul>
</li>
<li>EasyDCC
<ul>
<li>This exchanges the EasyDCC ASCII command station protocol via a <a href=
"../../hardware/TerminalServer.shtml">terminal server</a>
</li>
</ul>
</li>
<li>JMRIClient
<ul>
<li>
<a href="../../hardware/jmriclient/index.shtml">Via network connection to a JMRI
Simple Server</a>
</li>
</ul>
</li>
<li>NCE
<ul>
<li>This exchanges the NCE command station protocol via a <a href=
"../../hardware/TerminalServer.shtml">terminal server</a>
</li>
</ul>
</li>
<li>SRCP
<ul>
<li>
<a href="../../hardware/SRCP/index.shtml">Via network connection to SRCP server</a>
</li>
</ul>
</li>
<li>ECOS
<ul>
<li>
<a href="../../hardware/ecos/index.shtml">Via network connection to ECOS command
station</a>
</li>
</ul>
</li>
<li>XPressNet
<ul>
<li>
<a href="../../hardware/XPressNet/index.shtml">Via network connection to an XnTcp
adapter</a>
</li>
<li>
<a href="../../hardware/XPressNet/index.shtml">Via network connection to the Lenz
LIUSB Server (Windows only)</a>
</li>
</ul>
</li>
</ul>
<h2>Upstream (networked JMRI operations) connections</h2>
<ul>
<li>Built-in <a href="../../web/index.shtml">web server</a> (<a href=
"https://www.jmri.org/JavaDoc/doc/jmri/web/server/package-summary.html">code</a>)
<p>This is advertised on Bonjour/Zeroconf as a "_http._tcp.local." service. In
particular, this contains the <a href=
"https://www.jmri.org/JavaDoc/doc/jmri/server/json/package-summary.html">JMRI JSON
protocol</a>, which allows web browsers to monitor and control a layout by accessing a
<a href="https://www.jmri.org/JavaDoc/doc/jmri/web/servlet/json/JsonServlet.html">JMRI JSON
Servlet</a>. It also includes facilities for displaying and clicking on any <a href=
"https://www.jmri.org/JavaDoc/doc/jmri/web/servlet/frameimage/package-summary.html">open JMRI
window</a>.</p>
</li>
<li>Via Python/jython scripting</li>
<li>For <a href="../../../package/jmri/jmrit/withrottle/UserInterface.shtml">remote
throttles</a> such as the iPhone or Android. (<a href=
"https://www.jmri.org/JavaDoc/doc/jmri/jmrit/withrottle/package-summary.html">code</a>)
(<a href="https://www.withrottle.com/">WiThrottle product website</a>) (<a href=
"https://enginedriver.mstevetodd.com/">Android Engine
Driver page</a>)
<p>This is advertised on Bonjour/Zeroconf as a "_withrottle._tcp.local." service.</p>
</li>
<li>Via running JMRI as an <a href=
"http://www.modelrailroadmanager.com/MRRM_Advanced_Edition/Software_Architecture.html">Enterprise
Java Bean</a>
</li>
<li>Via providing a <a href="https://loconetovertcp.sourceforge.net/">LocoNet over TCP</a>
implementation.
<p>This is advertised on Bonjour/Zeroconf as a "_loconetovertcpserver._tcp.local."
service. (Name pending approval from the original protocol developers)</p>
</li>
<li>Via providing an <a href="https://srcpd.sourceforge.net/">SRCP</a> server
implementation.
<p>This is advertised on Bonjour/Zeroconf as a "_srcp._tcp.local." service.</p>
</li>
<li>Via providing a <a href="../../hardware/jmriclient/index.shtml">JMRI Simple Server</a>
implementation.
</li>
<li>Via providing an <a href="../../../package/jmri/jmrix/openlcb/swing/hub/HubPane.shtml">OpenLCB Hub</a> implementation.
<p>This is advertised on Bonjour/Zeroconf as a "_openlcb-can._tcp.local." service.</p>
</li>
<li>Via providing a <a href="../../../package/jmri/jmrix/can/cbus/swing/hubpane/CbusHubPane.shtml">CBUS Hub</a>
implementation.
<p>This is advertised on Bonjour/Zeroconf as a "_cbus-can._tcp.local." service.</p>
</li>
</ul>
<p>See also the <a href="http://www.dns-sd.org">DNS-SD</a> page for more information on
Zeroconf/Bonjour/"DNS Service Discovery" networking.</p>
<p>Search "man dns-sd" for more information on the dns-sd debugging command-line tool.</p>
<p>CBUS&reg; is a registered trade mark of Dr Michael Bolton</p>
<!--#include virtual="/help/en/parts/Footer.shtml" -->
</div>
<!-- closes #mainContent-->
</div>
<!-- closes #mBody-->
<script src="/js/help.js"></script>
</body>
</html>