| srcpd.conf(5) | File Formats Manual | srcpd.conf(5) |
srcpd.conf - The configuration file for the srcpd daemon
The file /etc/srcpd.conf is used by the srcpd (8). This file contains the runtime configuration for the daemon and it's connection(s) to model railroad system. See srcpd (8) for instruction how to use the daemon.
The default file is shipped as with the srcpd and contains both default settings and an example bus configuration.
<?xml version="1.0"?>
<srcpd version="2.0">
<bus>
<server>
<tcp-port>4303</tcp-port>
<pid-file>/var/run/srcpd.pid</pid-file>
<username>nobody</username>
<groupname>nogroup</groupname>
</server>
<verbosity>5</verbosity>
</bus>
<bus>
<loopback>
<number_fb>3</number_fb>
</loopback>
<use_watchdog>no</use_watchdog>
<verbosity>5</verbosity>
<auto_power_on>yes</auto_power_on>
</bus>
</srcpd>
The configuration file for srcpd is stored in XML format. As XML files are plain text, experienced users can manipulate such files with the help of a text editor. Less experienced users should select an external configuration tool to ensure a syntactically correct format.
If errors occur while reading the configuration file, the daemon will send appropriate notifications to the syslog daemon. These messages can be watched using the syslog facility user.info. This facility is usually sent to the file /var/log/messages (or /var/log/syslog). On some systems the /etc/syslog.conf may need to be edited to access the user.info facility:
user.info /var/adm/user-info.log
Currently there is no document type definition (DTD) available, to validate the format of a user created configuration file.
Each configuration file must provide the following base structure:
<?xml version="1.0"?>
<srcpd>
...
</srcpd>
Within this structure (...) the necessary buses are configured, each using a separate substructure:
<bus>
...
</bus>
<bus>
...
</bus>
The first configured bus should always be the server-bus. Sequence and number of the following buses are any desired. Numbering of each single bus is done according to the sequence in this configuration file. The server bus itself gets number 0, all following buses are numbered continuously starting with 1 up to a maximum limit of 20.
Only buses that are actually used with the daemon should be filed. Not used buses can be commented out:
<!--
<bus>
...
</bus>
-->
Please bear in mind in this case the numbering of the following buses will be changed accordingly.
The following options are usable for all used bus sections. Universal options must be specified after bus specific options.
This bus is needed every time. The following options can be used for individual setup.
This driver supports DC-Car Infrared Remote Control. This mode supports remote control of cars (e.g. Faller Car-System) with a DC-Car decoder or Infracar decoder. A sender must be connected to your PC's seriall port. Some USB/Serial Adapter also work, e.g. Prolifi PL 2303 based adapter.
A description of the sender is available at http://www.dc-car.de/pc-sender.html
<bus> <dccar> <mode>dccar</mode> <number_gl>1024</number_gl> <pause_between_commands>10</pause_between_commands> </dccar> <auto_power_on>yes</auto_power_on> <verbosity>4</verbosity> <device>/dev/ttyUSB0</device> </bus>
Digital Direct for Linux (DDL) via serial line (RS232). With this module the PC is enabled to generate a digital control voltage for Maerklin/Motorola (MM) and/or NMRA/DCC using the serial interface (RS232) hardware. Output lines TxD and GND are used by this feature and must be connected to booster inputs properly.
This module exposes optimal signal performance if special user rights for the srcpd are applied. It is recommended especially for Maerklin/Motorola users to configure a system user srcpd and a group srcpd with these command lines:
$ addgroup --system srcpd
$ adduser --system --no-create-home --ingroup srcpd srcpd
In order to increase the realtime priority for this user the system file /etc/security/limits.conf must be edited to add following line:
srcpd - rtprio 99
According to these measures the configuration file must be adapted as follows:
<server>
...
<username>srcpd</username>
<groupname>srcpd</groupname>
...
</server>
please note that there is an offset of 4 between the DDL addresses and the addresses according to the documentation from maerklin. The equation ddl-address = maerklin docu address + 4 is used. This is due to some interpretation differences what the trits mean. Details can be found at http://vogt-it.com/OpenSource/DDL/Addrestable.html
It is also possible to enable both digital protocol formats, to drive decoders of both digital systems attached to the same power line. In order to minimize CPU load, the not used protocol should always be disabled.
<bus>
<ddl>
<number_ga>200</number_ga>
<number_gl>81</number_gl>
<enable_maerklin>yes</enable_maerklin>
<enable_nmradcc>no</enable_nmradcc>
<enable_usleep_patch>yes</enable_usleep_patch>
<usleep_usec>200</usleep_usec>
</ddl>
<auto_power_on>no</auto_power_on>
<verbosity>4</verbosity>
<device>/dev/ttyS0</device>
</bus>
<bus>
<ddl>
<number_ga>160</number_ga>
<number_gl>60</number_gl>
<enable_maerklin>no</enable_maerklin>
<enable_nmradcc>yes</enable_nmradcc>
<nmradcc_translation_routine>3</nmradcc_translation_routine>
</ddl>
<auto_power_on>no</auto_power_on>
<verbosity>4</verbosity>
<device>/dev/ttyS0</device>
</bus>
Digital Direct for Linux S88 via parport (IEEE 1284). This bus provides up to four S88 data links attached to the parallel port to connect S88-feedback modules. Usage of one S88 line is possible by simply wiring modules to the parallel port connectors; for advanced applications involving more than one line the wiring scheme is equivalent to the one from the DDL daemon erddcd (http://www.vogt-it.com/OpenSource/DDL) as shown in the circuit of Martin Wolf. The four S88 data links are managed as separate buses.
The maximum count of modules (with 16 contacts) which can be connected to a data link is 31; so maximal 496 contacts are supported per link. When using modules with 8 contacts two modules count as one.
For each data link a separate bus is initialized where the sequence of the feedback contacts of the modules is increasing as the modules are connected to the data link. If there are no modules connected to a data link the respective value of number_fb_x must be set to 0. Nevertheless this bus is initialized, that means also if only one bus is used, all four buses are initialized.
dmesg | grep parport
The higher this value the less often the attached modules are read and the less is the resulting system load. Useful values are between 100 and 250.
Inside of the configuration the common values should be arranged before the bus specific values.
<bus>
<auto_power_on>yes</auto_power_on>
<verbosity>5</verbosity>
<ddl-s88>
<ioport>0x378</ioport>
<number_fb_1>9</number_fb_1>
<number_fb_2>0</number_fb_2>
<number_fb_3>0</number_fb_3>
<number_fb_4>0</number_fb_4>
</ddl-s88>
</bus>
This driver supports the HSI-88 device from Littfinski connected via serial line. An USB2Serial converter should work fine. The serial line speed setting is fixed to 9600 baud and cannot be changed.
The HSI-88 device provides three lines for feedback modules. To each line a maximum of 31 modules (each with 16 inputs) can be attached. If modules with 8 inputs are used, two modules count as one.
<bus>
<hsi-88>
<number_fb_left>8</number_fb_left>
<number_fb_center>5</number_fb_center>
<number_fb_right>0</number_fb_right>
<refresh>10000</refresh>
</hsi-88>
<auto_power_on>yes</auto_power_on>
<verbosity>4</verbosity>
<device>/dev/ttyS0</device>
</bus>
Bus driver for i2c-dev interface of the Linux kernel, can be used to access hardware found on http://www.matronix.de/.
This driver supports the Intellibox device from Uhlenbrock (IB) connected via the serial port. Only extended mode commands are used (P50X binary protocol); this should be taken into account if protocol compatible devices (e.g. OpenDCC, DiCoStation, EasyControl) are used. Programming decoders is currently implemented for DCC only. Possible values for speed of serial port are depending from device and interface type 2400 baud, 4800 baud, 9600 baud, 19200 baud, 38400 bau and 57600 baud.
<bus>
<intellibox>
<number_ga>250</number_ga>
<number_gl>100</number_gl>
<number_fb>4</number_fb>
<fb_delay_time_0>0</fb_delay_time_0>
<pause_between_commands>0</pause_between_commands>
</intellibox>
<speed>19200</speed>
<auto_speed_detection>no</auto_speed_detection>
<auto_power_on>no</auto_power_on>
<verbosity>4</verbosity>
<device>/dev/ttyUSB0</device>
</bus>
This driver connects with the LI100, LI100F, LI101F or LI-USB devices from Lenz connected via the serial port/USB-interface. An USB2Serial converter should not be used. The serial line settings are depending on type of interface. For LI-USB it's fixed to 57600 baud with no chance to change. Autodetection of serial port interface speed is currently under construction. If connection fails, try restart of srcpd with another speed. Possible values are 9600 baud, 19200 baud, 38400 baud, 57600 baud and 115200 baud, depending on your interface.
For Lenz USB interfaces It is very important to have the kernel module ftdi_sio available. Due to the Lenz concept, the interface unit returns different values after start.
This bus provides a driver for the Loconet system by Digitrax. The device settings may be either serial connections (e.g. MS100, LocoBuffer) or TCP/IP network links (e.g. LbServer, http://loconetovertcp.sourceforge.net/).
<bus>
<loconet>
<loconet-id>80</loconet-id>
<sync-time-from-loconet>no</sync-time-from-loconet>
<ms100>no</ms100>
</loconet>
<device type="network" port="1234">127.0.0.1</device>
<!--
<device type="file">/dev/ttyS0</device>
-->
</bus>
This bus does not connect to real hardware. It is used primarily for development tasks but may be useful for real installations too. Every command on this bus does only have an echo effect on the INFO sessions. This device may be used as virtual device for communication tasks.
<bus>
<loopback>
<number_ga>120</number_fb>
<number_gl>100</number_fb>
<number_fb>64</number_fb>
</loopback>
<verbosity>2</verbosity>
<auto_power_on>no</auto_power_on>
</bus>
This supports communication with the 6051 or 6050 devices from Maerklin connected via the serial port. An USB2Serial converter should work fine. The serial line settings are fixed to 2400 baud 8N2 and cannot be changed.
<bus>
<m605x>
<number_ga>120</number_fb>
<number_gl>60</number_fb>
<number_fb>8</number_fb>
<ga_min_activetime>150</ga_min_activetime>
<pause_between_bytes>2</pause_between_bytes>
<pause_between_commands>50</pause_between_commands>
</m605x>
<auto_power_on>no</auto_power_on>
<verbosity>4</verbosity>
<device>/dev/ttyS0</device>
</bus>
Selectrix CC-2000 and Rautenhaus SLX852.
This bus provides support for the old ASCII based Zimo MX1 interface protocol. The baud rate can not be changed and has an internal preset of 9600 Baud.
/etc/srcpd.conf
srcpd (8)
This man page was written by Matthias Trute (mtrute@users.sourceforge.net), Frank Schimschke (schmischi@users.sourceforge.net) and Guido Scholz (gscholz@users.sourceforge.net).
| December 19, 2009 |