Linux Packet Radio

Before proceeding, start with the Packet Radio page.

Linux has the world’s best support for packet radio built right into the operating system. AX.25, NET/ROM, and ROSE are all directly supported in the Linux kernel. There is also substantial userland support for packet.

Getting Started Guides

There are some HOWTOs out there about getting started. Here are some links:

Soundmodem

Soundmodem is a software-defined TNC that hooks directly into the kernel AX.25 stack.

Its setup is generally fairly straightforward using Googleable documentation, but one thing that is not straightforward is 300bps packet support.

Apparently, due to a bug or design flaw, to make Soundmodem work, you must use tone frequencies below 1200Hz. You’ll of course need to watch the receive frequencies.

Please refer to my Packet Radio on HF page for background on this, which is not limited to soundmodem.

Following is an example config file with tones at 900Hz and 1100Hz.

  [phil@localhost ax25]$ more soundmodem.conf
  <?xml version="1.0"?>
  <modem>
    <configuration name="hf_packet">
      <channel name="Channel 0">
        <mod mode="afsk" bps="300" f0="900" f1="1100" diffenc="1"/>
        <demod mode="afsk" bps="300" f0="900" f1="1100" diffdec="1"/>
        <pkt mode="MKISS" ifname="sm0" hwaddr="VK4BVM-2" ip="10.0.0.1"
  netmask="255.255.255
  .0" broadcast="10.0.0.255"/>

Now, let’s look at an example. My Packet Radio page discusses Network 105. The Network 105 instructions are to tune your radio to 14105 LSB with tones at 1600Hz and 1800Hz.

Our tones at 900Hz and 1100Hz are 700Hz closer to the carrier (rig readout) frequency than the ones discussed. Therefore the rig will need to be tuned to a different frequency. Since soundmodem will use frequencies closer to frequency, and we’re using LSB, we need to lower the radio’s tuning frequency by 700Hz to 14104.30. You can verify that with:

  • 14105.00 - 1.600 = 14103.400
  • 14104.30 - 0.900 = 14103.400
  • 14105.00 - 1.800 = 14103.200
  • 14104.30 - 1.100 = 14103.200

So, to summarize, the rule is this: If you are given a carrier frequency, and offsets of 1600Hz and 1800Hz, and soundmodem is using 900Hz and 1100Hz, then:

  • On LSB, you tune your radio down 700Hz.
  • On USB, you tune your radio up 700Hz.

Serial TNCs

See Serial TNCs in Linux.

General HF suggestions

Based on tips from K7TMG, for use on HF, the following settings are suggested:

  • In axports, maximum packet length 60 and window 1

  • set /proc/sys/net/ax25/<port>/t1_timeout to 5000 (5 seconds) - FRACK

  • set /proc/sys/net/ax25/<port>/maximum_retry_count to 15 (RETRY)

  • If using soundmodem, in /etc/ax25/soundmodem.conf set ppersist to 63 and slottime to 30.

Jabber Bridge

John Goerzen KR0L wrote a bridge to Jabber, which is at https://github.com/jgoerzen/ax25xmpp.

Node and BBS software

Debian includes the full LinuxNode and F6FBB (aka FBB) BBS software. FBB is a bit odd configuration-wise, since its startup script creates config files the first time it’s run. I had some confusion setting it and other things up, as sometimes they assume a non-KISS-capable TNC or a non-AX.25 kernel, but in general it isn’t too bad.

Other node software

https://github.com/rthoelen/Unode

ax25ipd

AXIP is a protocol for routing AX.25 frames over the Internet. It is not the same as Telnet, which lets people without an AX.25 stack log in to your system. Rather, it is most commonly used as a long-haul backbone link between two AX.25 packet nodes.

ax25ipd is the Linux program that implements this and it is, sadly, rather under-documented. The default configuration file offers some clues but not quite enough.

ax25ipd is really an IP-KISS gateway. KISS is the stream protocol designed for serial port use between a TNC and PC, but is also used in some of the Linux AX.25 programs as a virtual link protocol.

What you will do is this:

  1. Use kissnetd to set up a KISS bridge
  2. Use kissattach to connect one end of this bridge to the AX.25 kernel stack
  3. Use ax25ipd to connect the other end to one or more IP destinations

Let’s go through these steps in order.

kissnetd setup

First of all, if you are running a modern Linux system, check to see if kissnetd supports the -p switch. If it doesn’t, grab my patch that supports Unix98 PTYs and recompile. (See the details about this problem if you care).

You will be running kissnetd -p2 to generate the appropriate PTYs. I’ll show you what to do with this in a bit.

kissattach

Next, you’ll want to create an entry in /etc/ax25/axports for your new link. You can just set the speed to 38400.

You’ll be running kissattach l $PTS1 axportname xx.xx.xx.xx where the end part can be a made-up IP address.

And then you’ll be running ax25ipd with this setup.

ax25ipd

You’ll need to configure /etc/ax25/ax25ipd.conf. This file is also a bit under-documented. Some hints:

  • At the top, use socket ip if you want TCP. If you want UDP, try something like socket udp 10093. Note that this gives the port that your system listens on.

  • It seems almost everyone wants mode tnc

  • Make sure the device line is uncommented and reads device /dev/whatever. We’ll fix that up later.

  • If you are using UDP, the route line should look like route remotecall remoteip udp 10093 b. This gives what protocol and port to use for outgoing connections.

A startup script

Now, we’re ready to start. Here’s an example script:

  tmpfile="/tmp/$$.startipd.pts"

  kissnetd -p2 > "$tmpfile" &

  sleep 2

  attachthem () {
          read PTS1 PTS2
          echo "Starting ipd on $PTS1 and $PTS2"
          kissattach -l $PTS1 ipct 44.254.1.120
          sleep 1
          sed -i "s,device /dev/.*$,device $PTS2," /etc/ax25/ax25ipd.conf
          ax25ipd
  }

  tail -n 1 $tmpfile | attachthem
  rm $tmpfile

(Note: this has a /tmp race and needs enhancement for multiuser systems.)

So, we fire up kissnetd and save off the PTYs that will be used. Next we load those saved PTYs and use them to attach things. We first set up kissattach, then we note the second PTY in the ax25ipd.conf file, and finally start up ax25ipd.

See Also


This page is about using serial TNCs with Linux Packet Radio.

Packet Radio is often used on VHF and UHF bands. It is also used on HF for longer-distance communications. You should familiarize yourself with the information on the Packet Radio page before proceeding here.

Here is a collection of tips for using Amateur Radio on Linux.

Packet radio, also known as AX.25, is a specific type of Digital Amateur Radio. Packet radio works somewhat like the Internet in that it splits communications into discrete packets, performs error checking on these packets, automatically requests retransmision of packets that arrived with errors, and thus provides a reliable and error-free communication channel.