Operating Systems » UNIX (Linux All Variants)

ID #1002

How to set up an RMS Gate on Linux

I just want to jot down some of the steps I took to create the RMS Gateway I'm currently running. Just to be clear I could not have done any of this with out the help of others especially Charles Schuman (K4GBB).
I set up a PC that is fan less and runs on 12 volts. Its 1.6 GHz, 4 GB Ram, 250 GB HD, 3 USB ports, 2 PS2 ports, Video, Serial Port and Printer Port runs at about 30 watts.

Here is Charles Cheat Sheet: (
How to install RMS Gate.

Updated 17 April 2011
Charles S. Schuman, K4GBB


I service and administer the Linux Packet Servers for The Florida Amateur Digital Communications Association (FADCA). The list of Packet Servers maintained by FADCA is growing every month. To keep up with the changes and new installations I have had to streamline the various processes with scripts. Here is my scripted process with explanations and hints. Since I do this via remote access, SSh, the document is written from the command line view.

Setting up a Server is easy.

1. Install the Operation System.
2. New Linux 2.6 kernel?
3. Install the Building tools
4. Install Ax.25 Support
* File Structure
* Support packages
* devfs and udev
5. Configuring the Basic AX.25 Service
6. Starting AX25 at Boot up
7. Installing and Configuring a RMS Gate
8. Troubleshooting The RMS Gate
9. The RMSGWMON Utility
10. Add RMS to FPAC

1. Install the Operation System.

For Ubuntu or Kubuntu, (Server or Desktop) download the ISO files and burn the CD. For Debian the process is pretty much the same. Best results are achieved by burning at a low speed. Even when your burner is capable of higher speeds use X4.

Ubuntu 7.10 (Gutsy Gibbon) is a kernel.
Ubuntu 8.04 (Hardy Heron) is a 2.6.25 kernel
Ubuntu 8.10 (Intrepid Ibex) is a 2.6.27 Kernel
Ubuntu 9.04 (Jaunty Jackalope) is a 2.6.28 Kernel
Ubuntu 9.10 (Karmic Koala ) is a 2.6.31 Kernel
Ubuntu 10.04 (Lucid Lynx ) is a 2.6.34 Kernel
Ubuntu 10.10 (Maverick Mandrake) is a 2.6.35 Kernel

Now set your computer to boot from the CD and reboot. Choose the Install option and follow the prompts. During the installation you will be asked for a user name and password. If you are installing a Server version you want to include the SSH server. When installation is complete – reboot and you will be running under a Linux operating system.

2. A New 2.6.x Kernel?

The Generic Kernel is a one size fits all compromise made to work on MOST systems. It is customized for the distro. The older distro's Kernel may not include the latest updates to the ax.25 network modules . The distros with kernels > 2.6.28 are up to date and stable. They do not require any customization. I have been using Ubuntu 8.10 and later straight out of the box. We are presently using Version 10.04LTS.

However, if you need to compile a custom kernel jump to New Kernel?

3. Installing the Build Tools.

Build support is the GC Compiler and the compiler support libraries.

You can download Getbuild Script and run it as root or execute commands one at a time.

We are going to execute all of the following as root.
First we need to update the package list and the upgrade the distribution.

apt-get update && apt-get dist-upgrade

Next get the Compiler Package and the development Libraries for Ax.25.

apt-get install build-essential libax25-dev libx11-dev zlib1g-dev libncurses5-dev

We now have the tools to compile our ax.25 sources.
4. Install the AX.25 Support.
File structure

The Debian policy for files would have ax25 binary files placed in /usr/sbin/ or bin, configuration files in /etc/ax25, and data files in /var/ax25/Other distros would have them placed in /usr/local/sbin – bin, /usr/local/etc/ax25/ and /usr/local/var/ax25/. I find that the Debian file locations are already heavily populated and finding the needed file in the crowded directory is sometimes difficult.

To make the two file structures work I placed everything in the /usr/local/..... directories and symlinked the Debian locations.

/etc/ax25/ > /usr/local/etc/ax25/
/var/ax25/ > /usr/local/var/ax25/
AX25 support

The basic Ax.25 support packages are :

* Libax25 – The runtime library
* Ax25-tools – Ax.25 Utilities
* Ax25-apps – Ax.25 applications

The Ubuntu HAM radio packages do not include the latest AX25 updates. Ubuntu uses the “Stable” version which I have discovered is 10 month to a year behind the development curve. I use a “Test” version from the F6BVP source. It is closer to the development process. You may chose to use files from the "Official" Ax.25 archive.


Check to be sure that there are no libax25 files installed in /usr/lib/ directory.
If they are - remove them! The new RT Lib files will be placed in /usr/local/lib/.

Get the AX.25 source files.

Download and execute the Getax25 Script or execute the following steps via the command line.

We will be working out of the /usr/local/src/ax25/ directory.

mkdir /usr/local/src/ax25 && cd /usr/local/src/ax25

Get Libax25 and unpack Tar file.

wget http://f6bvp.free.fr/logiciels/ax25/lib ... vp.tar.bz2

tar xf libax25-0.0.12-rc2.patched_f6bvp.tar.bz2

Get Ax25 tools and unpack the Tar file.

wget http://f6bvp.free.fr/logiciels/ax25/ax2 ... vp.tar.bz2

tar xf ax25-tools-0.0.10-rc2.patched_f6bvp.tar.bz2

Get Ax25 Apps and unpack the Tar file

wget http://f6bvp.free.fr/logiciels/ax25/ax2 ... vp.tar.bz2

tar xf ax25-apps-0.0.8-rc2.patched_f6bvp.tar.bz2

Get Script – Bernard has written a little Housekeeping script that puts the polish on the installation and ties up loose ends.

http://f6bvp.free.fr/logiciels/ax25/rc.init.script && mv rc.init.script script && chmod 755 script
Compile the Ax.25 files

You are now ready to start compiling Ax.25.
Download and execute Make Ax.25 Script or enter the following commands from the command line as root.

Compile & Install Runtime Lib files.

cd /usr/local/src/ax25/libax25-0.0.12-rc2.patched_f6bvp
make && make install

Compile Ax25 Apps

cd /usr/local/src/ax25/ax25-apps-0.0.8-rc2.patched_f6bvp
make && make install

Compile Ax25-tools.

cd /usr/local/src/ax25/ax25-tools-0.0.10-rc2.patched_f6bvp
make && make install

Anyone see a pattern developing here?
Prepare Files System.

First run Bernard's Housekeeping script.


Set permissions for /usr/local/sbin/.

cd /usr/local/sbin
chmod 2755 *

The support AX.25 modules and drivers (ax25, rose, mkiss, 6pack, netrom, etc) .. are already compiled.

Now load the ax25 modules.

modprobe ax25
modprobe rose
modprobe mkiss

You can preload the ax25, rose, and mkiss modules by adding them to the /etc/modules file.

The Command lsmod will display the list of modules modules that are loaded.

Ax25 support is now installed.
5. Configuring the Ax.25 Service.
A word about devfs and udev

There are two device system managers in use.... devfs and udev. Udev is also referred to as Unix98.

Devfs is the older of the two and will soon be replaced by udev. The devfs system takes up a big chunk of memory with device control files, most of which are unused. To save memory, Unix98 only creates device control files as they are needed. The problem is the two are not compatible and older ax.25 code has not completely been updated to use Unix98. The source code I have referenced above does support Unix98,

A work around is available for the newer Kernels, that have been compiled w/o devfs support.....
Edit /boot/grub/menu.lst.
Add the option – pty.legacy_count=10.

title Ubuntu 9.04, kernel 2.6.28-16-server
uuid 9c478291-6c6a-4d25-9360-fda2da47802c
kernel /vmlinuz-2.6.28-16-server root=/dev/mapper/deland1-root pty.legacy_count=10 ro quiet splash
initrd /initrd.img-2.6.28-16-server

For those using Grub2, the default boot manager in > Ubuntu 10.04...
Edit /etc/default/grub add pty.legacy_count=10 between the double quotes behind GRUB_CMDLINE_LINUX.

GRUB_CMDLINE_LINUX "pty.legacy_count=10"
Then run update-grub.

Upon boot up this will initialize ten pty/tty devices.

If you don't have a copy of the AX25 How to.. this would be a good time to make a bookmark to Terry Dawson's Ax25-HowTo

I reference it so much that I have worn out three hard copies of this document.
I also use F6FBB, Bernard Pidoux's, How to http://rose.fpac.free.fr/MINI-HOWTO/
This site has a lot of good info for Mandrovia Systems and Configurations for FPAC & FBB BBS.

Let's start with the axports file. This is the base for the configuration of all of the ax.25 devices. Axports is located in /etc/ax25/

Here is an example:

#Port Call Baud PacLen Window Description
0 K4GBB-15 19200 256 7 Radio - 145.030 MHz
1 K4GBB-13 19200 256 7 Radio - 145.630 MHz
#2 RFUSER-2 9600 256 7 Radio - ?
#3 RFUSER-3 9600 256 7 Radio - ?
#4 RFUSER-4 9600 256 7 Radio - ?
#5 RFLINK-4 9600 256 7 Radio - ?
#6 RFLINK-3 9600 256 7 Radio - ?
#7 RFLINK-2 9600 256 7 Radio - ?
8 RFLINK-1 19200 256 7 Radio - ?
9 AXLINK-0 115200 256 7 AXIP – Internet

1. We, FADCA, use Numbers for Port names, but you can give them names like radio or UHF1. That means more key strokes when you need to specify a Port name.
2. Some ports do not have a valid Call/SSID. This is a default and OK for ports that will never send over a radio link.
3. The PacLen and the Window or MaxFrame values are set at max. All of these values are Defaults, including the baud rate, and are usually modified by the using Applications.

The next step is ????? Linux is so versatile that I can think of three ways to accomplish a port's creation. For now... I'm going with a TNC2 type TNC set into the native Kiss mode and attached to the first Serial Port. For other TNC configurations see "Configuring an Ax.25 Port"

The 1st command would be..

/usr/local/sbin/kissattach /dev/ttyS0 0

Where /dev/ttyS0 is the first serial device (com1),
0 is the port name from axports, and is an IP Address.
The RMS Gate software requires EACH ax25 device to have a unique ip address. Do not use the address of your server or the loop back address ( It is safe to use Amprnet addresses in the range of to

If the command does not return an error message – The 2nd command is:

/usr/local/sbin/kissparms -p 0 -r 128 -s 10 -t 250

Where :
-p is the Port name from axports,
-r is the Persistence value,
-t is the TxDelay

See the manual file for more info.

man kissparms
Testing Ax Ports

Stop a minute and test your device!

Be Sure that your TNC is in the KISS mode.
The Calibrate utility is from the FPAC package. Download calibrate and use it to see if you have control of the TNC's PTT.

The command is calibrate <port>

calibrate 0

This will send a full frame (256 chars) of 50/50 % 1s & 0s to port 0.
Press Return to stop the process. The PTT will stay active until the TNC's transmit buffer is emptied.
If you get a error message about frame length being too long - check your axports file. The value for PacLen must be 256 and MaxFrames 7.

Note: The ax25-tools package from my source still uses the old file names for call and listen. They are the same as axcall and axlisten.

Use (ax)listen to check the receiver monitoring process.

listen -cart

The screen will go blank and print received frames as the are decoded by the TNC. Use Ctl-C to close the listen screen.

The (ax)call command can be used to check the port's ability to connect and pass data. Call is a simple Term program.
The syntax is call {port} {call}v{path}

call 0 n1pdq v kp4djt-8
6. Starting Ax.25 at boot up

If everything is good you will need a script to start the ax.25 service at boot up.

My ax25 script points to /etc/ax25/ax25-up to start and /etc/ax25/ax25-down to stop the ax25 service.
It has four options [ start | stop | restart | status ]

Start by placing the script Ax25 in /etc/init.d/ and update the start with the command

update-rc.d ax25 defaults 95 5

Here is a start up script Ax25-up script and another for shutdown... Ax25-down script
shut down is as important as start up when you need to restart.

Place them in /usr/local/etc/ax25/
7. Installing and Configuring a RMS Gate

The INSTALLING file in the RMS package is pretty straight forward. It tells you is what support files are needed to compile the RMS Gate code, but it is difficult to translate that to packages. Brian & Hans have done an excellent job on the install process and documentation.

Here are the packages needed.

apt-get install xutils-dev libxml2 mysql-client libmysqlclient15-dev libxml2-dev

Optional –

apt-get install xml utilities

Move the RMS Gate .tar file into /usr/local/src/ax25 and unpack the file.
Change directory into the Directory that was created by the unpacking of the tar file.
The Installation instructions are in a file named INSTALLING.

Read through the instructions before going any farther.

Create a user account – w/o a home directory.

adduser rmsgw –no-create-home
RMS Credentials

You will need a set of credentials. These credentials will allow to you to access the CMS.
The credentials consist of call, keyword, and password.
Go to http://www.winlink.org/ContactByEmail and contact the person under request a KEY CODE for RMS Packet software.

Compiling the RMS code


When compiling the Gate code you may encounter a problem with no stack smashing (Stack Protection) support being missing. Some kernels are created with stack protection enabled and some with stack protection disabled. The package is distributed with the libwl2k.a for enabled stack protection. You will need to go to the Linux-RMS web site and download the version for no stack protection. The libwl2k.a file for 64 bit kernels is also available at the same source....

http://groups.yahoo.com/group/LinuxRMS/ ... e/libwl2k/.

Another stumbling stone is the lack of makedepend.
Debian (etch) has included it in the xutils-dev package.

Recently Ubuntu has also moved makedepend to the xutils-dev package.
Install the RMS Gate and it's support files.

make install

Once you have installed the code and have received your credentials you are ready to configure the RMS Gate
Edit the /etc/rmsgw/gateway.conf file. Replace the example entries with your own information.

Don't forget to edit the banner and channels.xml files.
Testing the Gate

To check your Automatic Check In (ACI) start Ax.25 and run.



You should receive a status message saying that your Ax.25 port is up and running. (see Troubleshooting the RMS Gate if you get an error message)


Go to the WL2K position website and check on your information and position. The position may not be 100% accurate, but should be close enough to supply locals with information about your service.


Changing the frequency or call-ssid will generate an additional tab. The old information will remain on the map for 24 hours and then disappear.

To test the configuration files, Run

rmsgw -P <portname> <call>.

rmsgw -P 1 k4gbb


That is a Uppercase P.

If your configuration is correct you will connect to the CMS and receive a > prompt. You will not be able to send anything. The line end characters of Linux and Windows are different and only work with the proper terminal setup. Disconnect with a Ctl-C.

If you have setup the logging properly you should see entries in /var/log/rms

Now connect to the Linux RMS gate via RF. If your ax25d.conf is configured properly you should get a connect and be able to send commands and messages to the CMS.
8. Trouble Shooting RMS
The rmschanstat file

The RMS Gate software requires the verification of a properly configured and operational ax.25 port. It does this via a script named rmschanstat.
Rmschanstat is located in /usr/local/bin/. In the case that you need to modify this script to accommodate your hardware or software it is suggested that you that you rename your file and edit the channels.xml file to point to your customized file. This will keep an update install from replacing it.

Rmschanstat can be run from the command line for trouble shooting purposes.

rmschanstat ax25 0 W4XYZ

Note that the call is in uppercase. The rmschanstat script is case sensitive.

Error message - "channel {NAME} unavailable"

Rmschanstat first checks axports to see that the port name in channels.xml is valid.
Check to see that the name in /etc/rmsgw/channels.xml and the port name in /etc/ax25/axports are the same.

Error message - "port {NAME} unavailable"

Next rmschanstat checks to see if there is a device attached to the named port.
It does this by reading the output of the command ps -ax and searching for kissattach.
The kissattach entries are checked to see that there is a proc for the the named port and the IP address is noted.

Error Message - "interface with {ip} unavailable"

The script then checks ifconfig to see what device was attached to the named port with the ip address found in the kissattach statement.
Check to see if you have more that one device with the same IP address.

Error Message -"status for interface {INTERFACE[0]} unavailable"

Last rmschanstat checks the status of the device. Rmschanstat reads the output of the command netstat --{type}.
The {type} should match the type of channel named in channels.xml. The script looks for a entry that matches the call-ssid from channels.xml, the device and that the status is LISTENING.
Note that if you have more than one channel defined in channels.xml each channels is checked and the script reports on the status of each channel.

9. The RMSGWMON utility

The rmsgwmon utility opens a two window display in a terminal and is closed with a q.

The top half displays data from the /etc/rmsgw/stats file.
This CMS hosts are listed and show the statics for each host as they relate to the local client since the system was (re)started.
RMSGW Monitor

The bottom half displays the Gateway status.
10. Adding the RMS Gate to FPAC

Begin by adding the folowing line to to the Application section of the .../fpac.conf file.
Note: The 0 behind the -P option is the Port Name from My axports file. You may have a different name for your port.

K4GBB-10 = /usr/local/bin/rmsgw -P 0 %U

K4GBB-10 = /usr/local/bin/rmsgw -P 0 %U

Once this is done this you may remove the RMS Gate block(s) from ax25d.conf.

#[k4gbb-10 via 0 ]
#NOCALL * * * * * * L
#default * * * * * * - rmsgw /usr/local/bin/rmsgw rmsgw -l notice -P 0 %U
FPAC will take over the LISTENING function for ALL User ports.

FPAC causes changes in the netstat output and the rmschanstat script may fail in the final step.
The latest version of the rmschanstat script has a check for fpac included.
To fix this problem edit the channels.xml file and change the type="ax25" to type="fpac"

You may want to add a line in the Other Commands section of the fpac.conf file to add RMS to the FPAC command list

RMS = connect k4gbb-10 3100352726

Once that is all in place the User can connect to:
k4gbb-10 v k4gbb-8 3100352726 ...this works great across the network!

Users may also connect to the FPAC node and enter RMS at the FPAC command prompt.

Tags: -

Related entries:

Last update: 2011-05-06 06:50
Author: C Schuman
Revision: 1.1

Digg it! Share on Facebook Print this record Send FAQ to a friend Show this as PDF file
Propose a translation for Propose a translation for
Please rate this FAQ:

Average rating: 0 (0 Votes)

completely useless 1 2 3 4 5 most valuable

You cannot comment on this entry