RMS Gate on a Raspberry Pi. Linux Raspberry

Updated 12 Sept 2018

Charles S. Schuman, K4GBB
k4gbb1@gmail.com

Install RMS Gate software

The INSTALLING file in the Linux RMS package is pretty straight forward. Brian & Hans have done an excellent job on the install process and documentation.

Execute the follow commands or download and run the Install Linux RMS Gate script

Switch to Super User

sudo su

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

adduser rmsgw –no-create-home

Install the packages needed for compiling the RMS Gate software.

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

Optional –

apt-get install xml utilities

Download 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.

cd /usr/local/src/ax25
git clone https://github.com/nwdigitalradio/rmsgw
cd rmsgw

make

make install

Configure RMS

Once the install is complete you will have to configure the RMS Gate for your call and location.

As of January 25, 2013, all sysops must obtain an authorization for gateway connections.
To request gateway station authorization contact Steve Waterman, K4CJX."

If you previously operated a gateway and your station has been on line less than 24/7/365 at any time in the past, you need to ask for an authorization.

The INSTALL file from the package [/usr/share/doc/rmsgw-2.3.0/] contains the information needed for editing the files in /etc/rmsgw/ - channels.xml, banner and gateway.conf. The INSTALL file from the source package can be viewed as a HTML page.

Help files and Manual Documents may be viewed from the command line with the man command

man rmsgw
man rmsgw-aci.1

SEE ALSO syslog.3, syslog.conf, syslogd.conf, ax25d.confg, rms-config, cms-hosts, rms-channels

Testing the Gate

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

rmsgw_aci.

  1. 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)

  2. 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.

  3. 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>.

Example:

rmsgw -P 1 k4gbb
  1. That is a Uppercase P.

  2. 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.

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

ax25d

The RMS Gate programe only runs when called. The ax25d programe listens for a connect request and when it detects the request causes rmsgw to run. Ax25d is usually started as part of the start up of the ax25 service. Ax25d is setup by the /etc/ax25/qx25d.conf file.

# /etc/ax25/ax25d.conf
[k4gbb-10 via 0 ]
NOCALL * * * * * * L
default * * * * * * - rmsgw /usr/local/bin/rmsgw rmsgw -l notice -P 0 %U
#
# (End)

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.


Sysop Tools

The Sysop Tools Suite contains utilities to maintain the RMS Gate Sysop's contact information in the WL2K Database. Currently it is an ADD-ON, but will be added to the RMS Gate package at the next upgrade.


USB Issues

The USB Hubs on the Raspberry are Version 1.1.
There have been problems with certain Powered hubs and USB devices. The ethernet port is actually a USB device. One of the problems experienced is a locked up Ethernet port.
If you experience locks ups try running the port at half duplex by adding the following two line to /boot/config.txt

# eth0 to halfduplex
smsc95xx.turbo_mode=N

It slows the port somewhat, but not enough to effect the packet thru-put.

I have found is that when a USB interface loses it's power it drops the Device's Hardware Id. When the USB is powered back up the system assigns a new Device ID. As a result the ax25 port is no longer associated with the hardware device. The same goes for other USB to Serial adapters.

We need to reference the port interface with a constant ID and link it to the hardware ID, /dev/ttyUSB(x), even if that Id changes. This is called Constant Device Enumeration. To do this we will write a Udev rule.

  1. Identify the TNC-X usb interface.
    Attach the TNC-X to the computer and execute the command..

    udevadm info -an /dev/ttyUSB0

    You will get a rather long output.
    Due to a Bug in the Rasberrian OS it WILL lock up the System after it displays the list.

    Look for a section that list the adaptor for the TNC-X It should look something like this:

     looking at parent device '/devices/pci0000:00/0000:00:1f.2/usb1/1-1':
        KERNELS=="1-1"
        SUBSYSTEMS=="usb"
        DRIVERS=="usb"
        ATTRS{configuration}==""
        ATTRS{bNumInterfaces}==" 1"
        ATTRS{bConfigurationValue}=="1"
        ATTRS{bmAttributes}=="80"
        ATTRS{bMaxPower}=="100mA"
        ATTRS{urbnum}=="1280557415"
        ATTRS{idVendor}=="0403"
        ATTRS{idProduct}=="6001"
        ATTRS{bcdDevice}=="0600"
        ATTRS{bDeviceClass}=="00"
        ATTRS{bDeviceSubClass}=="00"
        ATTRS{bDeviceProtocol}=="00"
        ATTRS{bNumConfigurations}=="1"
        ATTRS{bMaxPacketSize0}=="8"
        ATTRS{speed}=="12"
        ATTRS{busnum}=="1"
        ATTRS{devnum}=="2"
        ATTRS{version}==" 2.00"
        ATTRS{maxchild}=="0"
        ATTRS{quirks}=="0x0"
        ATTRS{authorized}=="1"
        ATTRS{manufacturer}=="Coastal ChipWorks"
        ATTRS{product}=="TNC-X by W2FS"
        ATTRS{serial}=="FTTAEGI2"

    Note the ATTRS{serial}=="FTTAEGI2" line and copy the string of characters behind the == ("FTTAEGI2").

  2. Create a Udev rule file named - /etc/udev/rules.d/99-usb-serial.rules

    Paste the following two lines into that file.

    #Device #1 - Coastal ChipWorks TNC-X by W2FS - 1-port USB to serial adapter (FTDI-based)
    SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="FTTAEGI2", SYMLINK+="tncx", RUN+="/etc/init.d/ax25 restart"

    Edit the ATTRS{serial}== part of second line so that the ATTRS{serial}=="FTTAEGI2" part of the text reflects the serial that you copied down in the first step.
    Save the file..

    The RUN+="...." in this example reinitializes the ax25 service. There is no need to restart udev. It will pickup the new rule as soon as you save the file. However, it will not execute the RUN command/script until you cycle the TNC power. That is easily done by removing the USB cable and reconnecting it.

  3. Edit the Port file or the kissattach statement that creates the port for the TNC-X.
    Change the /dev/ttyUSB(x) to /dev/tncx
    Example:
    /usr/local/sbin/kissattach /dev/ttyUSB0 0
    to
    /usr/local/sbin/kissattach /dev/tncx 0

  4. Test by unplugging the USB cable and plugging it back in.
    Check to see if the tncx link file is present in /dev/

    ls -l /dev/tncx

    The /dev/tncx file should be a link to /dev/ttyUSB(x).
    Check the transmit function with the Calibrate command to insure that the PTT led lites.