💾 Archived View for complete.org › linux-packet-radio captured on 2024-08-24 at 23:44:50. Gemini links have been rewritten to link to archived content
-=-=-=-=-=-=-
Before proceeding, start with the Packet Radio[1] 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.
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/
* Ping-Pong Convers Server[4]
4: http://www.linux-ax25.org/wiki/Ping-Pong_Convers_Server_software
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.
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.
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:
See Serial TNCs in Linux[9].
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.
John Goerzen[10] KR0L wrote a bridge to Jabber, which is at https://github.com/jgoerzen/ax25xmpp[11].
11: https://github.com/jgoerzen/ax25xmpp
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
https://github.com/rthoelen/Unode
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.
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.
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.
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.
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.
ax25ipd UDP mode documentation
Linux AX.25 HOWTO: ax25ipd section
KR0L's bugfixes for:
*
*
ax25ipd not transmitting due to "control byte non-zero"
--------------------------------------------------------------------------------
This page is about using serial TNCs with Linux Packet Radio[16].
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.
Here is a collection of tips for using Amateur Radio[21] on Linux[22].
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.
(c) 2022-2024 John Goerzen