OpenDCC - A command station for DCC - Using Linux and Rocrail
- Written by Norbert Martsch; Please refer to the german page - there are some updates!
- This small howto deals with the operation of the command station OpenDCC under openSUSE 10.2,
Linux kernel 2.6.18.xx and RocRail.
I think that these steps also can be applied to other distributions, please change directories for the files
if required.
Kernel 2.6.22 (and later) OpenDCC (USB version) is officially supported! The popular distributions are Ubuntu 7.10 ( "Gutsy Gibbon), and openSUSE 10.3.
This approach follows a description from Guido Scholz in the (http://groups.google.de/group/de.rec.modelle.bahn/browse_thread/thread/58a6464772622da3?hl=de). Rocrail is used as software to control the model railway layout.
Step 1: Prepare Linux
-
Disconnect OpenDCC from the PC. It is required that the used distribution supports udev. (This is the case with
openSUSE 10.2). Login as root and change to the directory
/etc/udev/rules.d/
Now create a file named
10-opendcc.rules
and open it with an editor. The only content is (without any line breaks):
SYSFS{idVendor}=="0403", SYSFS{idProduct}=="bfd8", RUN+="/sbin/modprobe -q ftdi_sio vendor=0x0403 product=0xbfd8"
Save and close the file.
Step 2: Connect OpenDCC
-
Now connect OpenDCC to the computer and wait for a moment. Use the the command
lsusb
to control whether OpenDCC was recognized. OpenDCC should now be in the list of available devices. The used port is /dev/ttyUSB0 . OpenDCC can be accessed through this port.
Step 3: Configure RocRail
-
Now open the config file for RocRail (rocrail.ini) and enter this port and the correct protocol in section digint.
RocRail should now be able to detect OpenDCC on the next start.
<rocrail planfile="plan.xml" libpath="."> <trace file="rocrail" debug="false" byte="false" parse="false" automatic="false" monitor="true"/> <clock divider="1" hour="24" minute="60"/> <ctrl swtimeout="250" minbklc="20" ignevt="5" initfieldpause="500"/> <http port="0" refresh="0"> <webclient port="0" refresh="0"/> </http> <digint iid="OpenDCC" lib="p50x" ptsupport="true" device="/dev/ttyUSB0" bps="19200"/> <ctrl loccnfg="true"/> </rocrail>
Shopping Lists
- OpenDCC with USB:
https://secure.reichelt.de/?;ACTION=20;LA=4000;AWKID=14794;PROVID=2084 - OpenDecoder2:
https://secure.reichelt.de/?;ACTION=20;LA=5000;AWKID=20809;PROVID=2084