Installing JMRI on RedHat Fedora Core 3
Jonathan
Miner
November 23, 2006
Introduction
JMRI is a Java-based software package that interfaces with many popular
Digital Command Control system. Since it is written in Java, it
will run on both Windows and Linux systems, and purhaps others.
My personal preference is use Linux because of its stability and
reliability. I'm running it on an old DELL Inspron 5000 laptop
with a 500Mhz CPU, and 96MB of RAM. This system interfaces with
my personal Digitrax system with an MS-1001,
and with the Concord Model
Railroad Club's Wangrow System One.
Obtaining Software
Java Development Kit
Go to http://java.sun.com/j2se/1.5.0/download.jsp
Click on "Download JDK 5.0 Update 6"
Read the license, click the "Accept"
radio button, then click the "Continue"
button.
Click on "Linux RPM in self-extracting file",
and save the resulting file.
Java Communications API
Go to http://java.sun.com/products/javacomm/index.jsp
Click on the "Download" button
to download "Version
2.0 for Microsoft Windows and Solaris/x86"
Again, read the license, click on "Accept"
radio button, then click the "Continue"
button.
Click on the "Solaris x86 Platform"
version, and save the resulting file.
RXTX Serial and Parallel I/O Library
Go to http://rxtx.org
Click on "Download" from the
top menu bar.
Click the link for "source
only for late 1.4 and current 1.5 JREs rxtx-2.0-7pre2", and save
the resulting file.
JMRI
Go to http://jmri.sourceforge.net/download/
Under the "JMRI 1.6 - Stable
Production Release" section, click on "Linux"
Select a mirror site, and save the resulting file.
Installating Packages
Java Development Kit
Execute the following commands as "root" to install the Java
Development Kit.
# chmod +x
jdk-1_5_0_06-linux-i586-rpm.bin
#
./jdk-1_5_0_06-linux-i586-rpm.bin
Review the license, then answer "yes", press <Return>
Java Communications API
Execute the following commands as "root" to extract and install the
communications library.
# zcat javacomm20-x86.tar.Z | tar
xf -
# cp commapi/comm.jar
/usr/java/jdk1.5.0_06/jre/lib/ext
# echo "Driver=gnu.io.RXTXCommDriver" > /usr/java/jdk1.5.0_06/jre/lib/javax.comm.properties
RXTX Serial and Parallel I/O Library
Execute the following commands as "root" to extract and build the RXTX
library.
# export JAVA_HOME=/usr/java/jdk1.5.0_06
# PATH=$JAVA_HOME/bin:$PATH
# tar zxf rxtx-2.0-7pre2.tar.gz
# cd rxtx-2.0-7pre2
# ./configure
# make
# make install
You will also want to add the JMRI user to the uucp and lock groups, and optionally,
change the permissions on the desired serial port. You may want to see
David Zuhn's site (http://stpaulterminal.org/software/jmri/)
for more information on building the RXTX libraries.
JMRI
Execute the following commands as the JMRI user.
% mkdir JMRI
% cd JMRI
%
PATH=/usr/java/jdk1.5.0_06/jre/bin:$PATH
% tar zxf
{path_to_files}/JMRI.1.6.tgz
% cd JMRI
% chmod +x
*.csh
and that's it! At this point, you should be able to run any of the JMRI
tools. If you have any problems, see the JMRI Linux FAQ, at http://jmri.sourceforge.net/install/FAQLinux.html
Notes
1 The only problem I have with the
MS-100 is that JMRI can not set the right baud rate. However,
there is an easy work-around. Start the JMRI application, then
wait for the baud rate error message. Now, in another window, run
these commands:
% port=/dev/ttyS0
% setserial $port divisor 7
% setserial $port spd_cust
% stty speed 38400 < $port
This sets the serial baud rate to be 16457 (115200 / 7), which is close
enough to the Digitrax Loconet speed. Now, press on the "OK" button,
and continue using the application.