User Tools

Site Tools



ContentCommand StationsMBUS

  • CANService


The CANService is a small application which acts like a bridge between UDP/TCP and CAN.

Protocols and Ports

Märklin CS2 CAN

It provides the same UDP ports as the Märklin CS2/CS3, 15730/15731, and TCP default port 15731 for communicating with a PC.


The TCP port 5550 is for use with CBUS. The linefeed option is required.


The TCP/IP can only handle one client.
If there is need for multiple connections, this can be extended.



  1. Debian based Linux platform like Raspberry Pi + Raspbian.
  2. Hardware CAN interface like Pi01CAN or RPI-CAN.


The CANService application is installed in the /opt/rocrail directory, and is included in all provided rocrail*.deb packages.

SocketCAN Setup

CAN bit rate

Set the CAN bit rate according to the target CAN:

CAN Bit rate
CBUS 125000
MBUS/CS2/MS2 250000
Zimo/Z21/MX10 125000

CANService Setup

There are no settings to configure, just run it in user context.
To run it automatically after every boot, it can be setup like the Rocrail Server.

mbus/canservice-en.txt · Last modified: 2019/06/20 15:10 by rjversluis