JMRI Hardware Support - CBUS® - Tech Details
Keywords: JMRI help CBUS Connecting connection canusb4 network

# Hardware Support: CBUS - Connection Details

- CBUS CAN Network ID
- CAN via MERG CAN-RS or CAN-USB
- CAN via MERG Network Interface
- CAN via GridConnect adapter
- CAN via GridConnect Network Interface
- CAN via Lawicell CANUSB
- CAN Simulation
- Direct Serial Connection

This page describes technical details of JMRI's CBUS connection support.

## CAN Adapters

JMRI's general approach is to support as many hardware combinations as possible. By supporting as many people and their hardware desires as possible, we can create a growing community of developers, hence more code.
As part of this, the JMRI CAN support is designed to use as many CAN adapter types as possible.
Not many PCs have a RS232 serial port now, however is still supported.

- CAN via MERG CAN-RS or CAN-USB
- CAN via MERG Network Interface
- CAN via GridConnect adapter
- CAN via GridConnect Network Interface
- CAN via Lawicell CANUSB
- CAN Simulation
- Direct Serial Connection

Where USB interfaces are used, the Baud rate is irrelevant.

## CBUS CAN Network ID

All CBUS modules need a CAN ID, and JMRI is no exception.

Modules must not have a duplicate CAN ID

The CAN ID is separate to any NODE ID's used in CBUS Long Events.

Node numbers are for CBUS long events, CAN ID's are purely for the CAN protocol transmission and are largely irrelevant in JMRI processing CBUS events.

Most MERG modules can do "enumeration" for CBUS, but some other adapters can't because of their intrinsic latency. Their slow replies effectively make them invisible.
Therefore Mike Bolton, one of the CBUS developers suggested that JMRI use a CAN ID of 126.

If you have multiple copies of JMRI attached to a MERG CBUS network, be sure to give these unique CAN ID's.

### CAN via MERG CAN-RS or CAN-USB

A CANUSB4 should not normally require special drivers to be installed, it should just work.

If using a MacBook Pro running Mojave and are struggling with drivers for a CANUSB / CANUSB2, the appropriate driver is available from FDTI for the UM245R, the VCP option.
(Tip courtesy of John (G8GKU) via JMRI Users at Groups.io)

Default setting shown on right hand side after the " : "

Serial Port - Select the serial or USB port that your CAN interface is plugged in to.

Connection Prefix : "M"

Connection Name : "MERG"

Additional Connection Settings shown when box checked

Baud rate

- 57,600 (default)
- 115,200
- 230,400
- 250,000
- 333,333
- 460,800

CAN ID for JMRI : 126 ( selectable from 100-127 )

Connection Protocol : "CBUS" (other options are "OpenLCB", "Raw CAN" and "Test - do not use")

Output Interval : 250 ms

### CAN via MERG Network Interface

Methods using this option include:

- CBUS Hub Control
- CANPiCAP - The canpi service has to be active to accept connections.
- CANether
- CBUS Server ( Node.js )
- CANGC1e

IP Address/Host Name : (none) - enter an IP address for fully manual configuration.
Optional hostname for ZeroConf / mDNS configuration does NOT currently work, use IP or localhost.
"localhost" can be used on most systems if the CAN server is running on the same machine.

TCP/UDP Port : 5550 - Port address setting of the TCP connection

Connection Protocol : "CBUS" (other options are "OpenLCB", "Raw CAN" and "Test - do not use")

Connection Prefix : "M"

Connection Name : "MERG"

Additional Connection Settings shown when box checked

CAN ID for JMRI : 126 ( selectable from 100-127 )

Gateway : Pass All ( Filtering also selectable )

### CAN via GridConnect adapter

Serial Port - Select the serial or USB port that your CAN interface is plugged in to.

Connection Prefix : "M"

Connection Name : "MERG"

Additional Connection Settings shown when box checked

Baud Rate

- 57,600 (default)
- 115,200
- 230,400
- 250,000
- 288,000
- 333,333
- 460,800

Connection Protocol : "CBUS" (other options are "OpenLCB", "Raw CAN" and "Test - do not use")

Output Interval : 250 ms

### CAN via GridConnect Network Interface

IP Address / Host Name : (none) - enter an IP address for fully manual configuration. Optional hostname for ZeroConf / mDNS configuration.

TCP / UDP Port : 0 - Port address setting of the TCP connection

Connection Protocol : "CBUS" (other options are "OpenLCB", "Raw CAN" and "Test - do not use")

Connection Prefix : "M"

Connection Name : "MERG"

Additional Connection Settings shown when box checked

Gateway : Pass All ( Filtering also selectable )

Output Interval : 250 ms

### CAN via Lawicell CANUSB

Serial Port - Select the serial or USB port that your CAN interface is plugged in to.

Connection Prefix : "M"

Connection Name : "MERG"

Additional Connection Settings shown when box checked

Baud Rate

- 57,600 (default)
- 115,200
- 230,400
- 250,000
- 333,333
- 460,800
- 500,000

Connection Protocol : "CBUS" (other options are "OpenLCB", "Raw CAN" and "Test - do not use")

Output Interval : 250 ms

### CAN Simulation

A simulated Command Station is started for this connection, see CBUS Simulation Tools.

Defaults to CAN ID 120

Serial port : (none)

Connection Prefix : "M"

Connection Name : "MERG"

Additional Connection Settings shown when box checked

Connection Protocol : "CBUS" (other options are "OpenLCB", "Raw CAN" and "Test - do not use")

### Direct Serial Connection

Serial Port - Choose the serial or USB port that your CAN interface is plugged in to.

Concentrator range Select : "A-H" , unselectable in grayed out select box

Device Type Select : "MOD-RFID125", unselectable in grayed out select box

Adapter Select : Generic Stand-alone ( MERG Concentrator alternate option, choosing this allows the Concentrator Range select, with an additional "I-P" option )

Protocol Select : CORE-ID
Alternate option - Olimex, enables a device type of MOD-RFID1356MIFARE in the device type dropdown.
Alternate option - Parallax
Alternate option - SeeedStudio
Alternate option - EM-18

Connection Prefix : "F"

Connection Name : Rfid

Additional Connection Settings shown when box checked

Baud rate : automatic ( unselectable, grayed out select box )

Output Interval : 250 ms

## JMRI Help

Main JMRI CBUS Support page

JMRI's general CAN support

JMRI RFID Support

CBUS 3rd Party Links See link for the CBUS Developers Guide

CBUS® is a registered trade mark of Dr Michael Bolton