JMRI: CBUS® Hub Control
Author: Steve Young
Keywords: JMRI CBUS hub share can connection wifi network

# JMRI : CBUS® Hub Control

since 5.3.4

CBUS Hub Control enables a physical CAN connection to be shared across a Network Connection.

This connection is accessible on the local device, enabling other applications to send and receive CAN Frames.

The CBUS Hub Control borrows code extensively from the OpenLCB Hub Control.

The only differences being :

- The port number is set to 5550.
- The default for sending line termination characters is set to false.
- CAN Frames are converted into the CBUS variant of the GridConnect format.
- The JmDNS ZeroConf is advertised as `_cbus-can._tcp.local`

The Hub Control will need to be running on the host JMRI instance before remote connections connect.
You can start the Hub by the Main JMRI Menubar, MERG ( or connection name ) > CBUS Hub Control
The CBUS Hub Control can also be opened by adding as a System Startup Action.

If you are connecting another JMRI instance to the Hub, it's sensible to set a different CAN ID for that connection.

- PanelPro > Edit Preferences > Connections
- System Connection : MERG : CAN via MERG Network Interface
- Enable Additional Connection Settings
- Select a CAN ID which will be unique to that JMRI instance.
- Click Save, at the bottom left of the window.

### Sharing your CAN Connection with MERG CBUS FCU

After starting CBUS Hub Control, open up FCU.

- Communications > Enable Ethernet
- Communications > Add Network ...
- Add a name for the new Network Connection.
- Add the local IP address from the CBUS Hub.
  In the screenshot above, this is the IP4 version of the loopback address, `127.0.0.1`
- The default port number of `5550` should be retained.
- Click OK
- FCU Toolbar > Communications > Start Comms
- Select the newly created connection and click OK.
- FCU should display a Network Connected dialogue box and be able to communicate.

Most users should not have to be concerned about CAN ID clashes when using both programs on the same CAN connection.
The default for a JMRI MERG CAN-USB is 127 while FCU defaults to 125.

### JMRI Help

You can view this help page within JMRI by selecting Help > Window Help in the top bar of the CBUS Hub Control window.

Main JMRI CBUS Help page.

CBUS® is a registered trade mark of Dr Michael Bolton