💾 Archived View for gemini.complete.org › linux-packet-radio captured on 2024-08-31 at 12:02:56. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2024-07-09)

-=-=-=-=-=-=-

Linux Packet Radio

Before proceeding, start with the Packet Radio[1] page.

1: /packet-radio/

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:

Configuring Linux AX.25[2] -- a very useful site

2: http://www.febo.com/packet/linux-ax25/ax25-config.html

Linux Amateur Radio AX.25 HOWTO[3] -- also very useful

3: http://tldp.org/HOWTO/AX25-HOWTO/

ax25ipd configuration

The Netrom-Node mini-HOWTO

The Linux AX.25 project

* Ping-Pong Convers Server[4]

4: http://www.linux-ax25.org/wiki/Ping-Pong_Convers_Server_software

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[5]. You'll of course need to watch the receive frequencies.

5: http://www.spinics.net/lists/linux-hams/msg02615.html

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

6: /packet-radio-on-hf/

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

7: http://www.spinics.net/lists/linux-hams/msg02617.html

  [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[8] page discusses Network 105. The Network 105 instructions are to tune your radio to 14105 LSB with tones at 1600Hz and 1800Hz.

8: /packet-radio/

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:

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:

Serial TNCs

See Serial TNCs in Linux[9].

9: /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/&lt;port&gt;/t1_timeout to 5000 (5 seconds) - FRACK

set /proc/sys/net/ax25/&lt;port&gt;/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[10] KR0L wrote a bridge to Jabber, which is at https://github.com/jgoerzen/ax25xmpp[11].

10: /john-goerzen/

11: https://github.com/jgoerzen/ax25xmpp

Node and BBS software

Debian includes the full LinuxNode[12] 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.

12: http://wiki.complete.org/LinuxNode

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[13] that supports Unix98 PTYs and recompile. (See the details about this problem[14] if you care).

13: http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=15;filename=kissnetd.patch;att=1;bug=603169

14: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=603169

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.

Further ax25ipd links

ax25ipd UDP mode documentation

Linux AX.25 Hints: ax25ipd

Linux AX.25 HOWTO: ax25ipd section

KR0L's bugfixes for:

*

kissnetd Unix98 PTY support

*

ax25ipd not transmitting due to "control byte non-zero"

See Also

axports file

Configurable parameters

--------------------------------------------------------------------------------

Links to this note

15: /serial-tncs-in-linux/

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

16: /linux-packet-radio/

17: /packet-radio-on-hf/

Packet Radio[18] 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[19] page before
proceeding here.

18: /packet-radio/

19: /packet-radio/

20: /linux-amateur-radio/

Here is a collection of tips for using Amateur Radio[21] on Linux[22].

21: /amateur-radio/

22: /linux/

23: /packet-radio/

Packet radio, also known as AX.25, is a specific type of
Digital Amateur Radio[24].
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.

24: /digital-amateur-radio/

More on www.complete.org

Homepage

Interesting Topics

How This Site is Built

About John Goerzen

Web version of this site

(c) 2022-2024 John Goerzen