help & more
Skip to main content
There's an emerging trend to develop model-railroad control systems that are based on standard CAN technology. JMRI provides support for the development and use of these. Two systems are described below.
OpenLCB is a group of hobbyists and manufacturers who have come together to produce a
future-oriented layout control bus, also called OpenLCB.
JMRI includes basic support for OpenLCB, and more is being developed along with OpenLCB itself.
The NMRA has decided to adopt OpenLCB and standardize it as Layout Command Control (LCC, formerly NMRAnet).
Originally named CBUS by co-founder Gil Fuchs, CBUS is an 'open' protocol for Model Railway use. The protocol and other useful information is hosted on the MERG public website (see further support links). CBUS is not owned or controlled by MERG but the co-founders Gil Fuchs and Mike Bolton are active members. MERG members are able to purchase a range of CBUS kits.
CBUS adopted the Gridconnect scheme but with a slight modification.
The header is always HEX bytes and maps directly to the PIC CAN registers, left justified.
JMRI CBUS support is available for linking JMRI with CBUS,
aimed at users.
Extensive details of the CBUS protocol are available to developers, see the CBUS Wiki hosted on the MERG public website.
There are many MERG module kits available to help running a layout.
Modules can be thought of as
The 3,000+ MERG members are encouraged to to build and design their own modules, and with
MERG being over 50 years old, there is a strong peer review process behind CBUS.
Module firmware updates can be performed over the CBUS network
JMRI includes support for CBUS events, also DCC over CBUS via a CANCMD kit (a fully featured DCC Command Station, mini booster and track programmer). This interfaces to JMRI and / or MERG handheld controllers over a CBUS network.
CBUS events are sent as one-to-many, enabling multiple modules to listen and change status on 1 single event. eg.
JMRI can send and receive events for any module node and any module event.
JMRI can provide the usual Sensor and Turnout features, once configured for OpenLCB or CBUS "Events".
Example System Naming:
( Event 18 Active / Inactive )
( Node 2 Event 18 Thrown / Closed )
( Event 18 On / Off )
JMRI can connect to CAN networks in several ways:
To use any of the above adapters, select the appropriate device/connection type in the
JMRI Preferences. If using a GridConnect or Lawicel device, be sure to set the appropriate
baud rate under Advanced Preferences.
The TCH Technology adapter does this automatically, so no setting is required.
To connect to a CANUSB4, select "MERG" as system manufacturer, then "CAN via MERG CAN-RS or CAN-USB" as system connection.
It's also possible to attach via a TCP/IP connection (EtherNet or WiFi). This can either go to another JMRI instance running e.g. an OpenLCB hub, directly to an IP-CAN adapter, or a CAN Server. To configure one of these, open the Connections tab in the JMRI Preferences.
OpenLCB CAN Adapters advertise under mDNS/Bonjour, so you can use that to specify the IP address if JMRI is on the same network segment as your adapter. In that case, put "openlcbcan.local." (note trailing period!) in the IP address field.
The port number for OpenLCB adapters is 23 by default.
CBUS Server is a Node.js program, licensed under MIT to allow multiple network connections to a MERG CANUSB4.
JMRI Scripting for CAN frames.
CBUS is a registered trade mark of Dr Michael Bolton