/
Networking.shtml
263 lines (214 loc) · 9.11 KB
/
Networking.shtml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta name="generator" content=
"HTML Tidy for Mac OS X (vers 31 October 2006 - Apple Inc. build 15.17), see www.w3.org">
<title>JMRI: Network Access</title>
<meta name="author" content="Bob Jacobsen">
<meta name="keywords" content="JMRI network access">
<!-- The combination of "Define" and {Header,Style, Logo and Footer} comments -->
<!-- are an arbitrary design pattern used by the update.pl script to -->
<!-- easily replace the common header/footer code for all the web pages -->
<!-- delete the following 2 Defines if you want to use the default JMRI logo -->
<!-- or change them to reflect your alternative logo -->
<!-- Style -->
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii">
<link rel="stylesheet" type="text/css" href="/css/default.css"
media="screen">
<link rel="stylesheet" type="text/css" href="/css/print.css"
media="print">
<link rel="icon" href="/images/jmri.ico" type="image/png">
<link rel="home" title="Home" href="/">
<!-- /Style -->
</head>
<body>
<!--#include virtual="/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/LocoNetServer.shtml">LocoNet
RMI client server connection</a>
<p>This uses Java RMI to provide client-server access
to the LocoNet message stream on another JMRI
instance.</p>
</li>
<li>
<a href=
"../../hardware/loconet/LbServer.shtml">LocoNet over TCP</a>
<p>This uses <a href=
"http://loconetovertcp.sourceforge.net/">LocoNet over TCP</a>
to provide client-server access to the LocoNet message stream
from
<a href="http://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 MERG Network Interface
<ul>
<li>The network interface can be used for the CANEther, CANGC1e, CANPi and CBUS Server.
</li>
<li>
CBUS Server is a <a href="https://nodejs.org/en/">Node.js</a> program to allow multiple network connections
to a MERG CANUSB4.
<a href="https://github.com/phillipsnj/mergCbusServer">MERG CBUS Server</a>
</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=
"http://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=
"http://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=
"http://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=
"http://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=
"http://jmri.org/JavaDoc/doc/jmri/jmrit/withrottle/package-summary.html">code</a>)
(<a href="http://withrottle.com">WiThrottle product web
site</a>) (<a href=
"../../../package/jmri/jmrit/withrottle/EngineDriverAndroidThrottle.shtml">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=
"../../hardware/loconet/LocoNetServer.shtml">LocoNet RMI
server</a>.
<p>This is advertised on Bonjour/Zeroconf as a
"_jmri-locormi._tcp.local." service.</p>
</li>
<li>Via providing a <a href=
"http://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=
"http://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>
</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>
<!--#include virtual="/Footer.shtml" -->
</div><!-- closes #mainContent-->
</div><!-- closes #mBody-->
</body>
</html>