Packet Radio: ax25 node logon message: updating for a cleaner menu

After logging on to an ax25 node, you’re shown a message like this:

DAVBBS:KK6DCT-6 Welcome to KK6DCT-6 network node

Type ? for a list of commands. help <commandname> gives a description
of the named command.


@kk6dct-6 20:52:01>

This is what is shown by my node that I’m currently setting up. I’d like to show a list of the apps I currently have configured. You can see the configured commands by entering a ? as the message tells you, but the formatting is not ideal, especially as I’m adding more apps and this list is getting cluttered. This is what the ‘?’ command shows for my currently configured apps:

@kk6dct-6 20:52:01> ?
DAVBBS:KK6DCT-6 Commands:
?, Advent, Bye, Connect, Escape, Finger, Help, HItchhikers, HOst
Info, Links, Mheard, NLinks, Nodes, PIng, Ports, Routes, Status
TAlk, Telnet, TIme, Users, W1-WeatherDavisCA, W2-Weather5DaysDavisCA
W3-WeatherForCity, W4-Weather5DaysForCity, Z1-Zork1, Z2-Zork2
Z3-Zork3, ZConnect, ZTelnet

When you logon, the first part of the welcome message that’s displayed is configured in /etc/ax25/node.motd (message of the day). Editing this file I can now more cleanly format the menu (and I might come back and change some of the names of the apps to make the menu options clearer later) :

DAVBBS:KK6DCT-6 Welcome to KK6DCT-6 network node
  W1		- Weather in Davis, CA
  W2		- 5 day weather forecast: Davis, CA
  W3		- Weather in specified city
  W4		- 5 day weather forecast for specified city
  Advent	- Adventure / Colossal Cove
  Z1		- Zork I
  Z2		- Zork II
  Z3		- Zork III
Type ? for a list of commands. help <commandname> gives a description
of the named command.


Much better!

Running an ax25 netrom node on a Raspberry Pi

I’ve played with Packet Radio using a Raspberry Pi a number of times in the past, and have a posted a number of posts – here’s some of my previous posts:

At one point I set up a Node.js app that used a library to read ax25 packets over Serial, and then Tweet received packets (here, here, and here). I ran this for a while but then took it down when I reused that Pi for another project.

A number of times I wondered what would it take to use this same approach with a client app directly interacting via ax25 packets to build an interactive app or game over Packet Radio. I did look into options for a while but didn’t get too far. I had noticed a couple of times that the node software or BBS software accessed via Packet could allow access to interact with apps running locally. Again, I looked into this for a while but didn’t get too far.

During some recent searching online, I wondered if anyone else had some something similar to this and set up access to a text based game like a text adventure, and of course they have, because why not? Richard Osgood has a fantastically good and well written article here walking through setting up ax25, and ax25 node and integrating access to Zork. If you’ve never done any Packet setup on the Pi before, this covers everything you need to get up and running.

From my previous setups I have already done ax25 and Direwolf configs before, so what I was more interested in what the delta between my previous previous steps and getting ax-25 node setup and able to interact with other apps.

I’ve summarized my steps here from the point of assuming you already have ax25 and Direwolf setup. If not you’ll need to go back to Richard’s original article and start from the beginning, or look at the links to my previous articles at the start of this post.

So, picking up from already having ax25 installed and configured and working with Direwolf:

Install ax25-node and telnet (for local testing):

sudo apt-get install ax25-node telnet

I already had ax25-tools and ax25-apps installed from my previous setup.

Configure nrports:

sudo nano /etc/ax25/nrports

Add 1 line:

netrom KK6DCT-6 #DAVBBS 255     Netrom node

-6 is my SSID for the netrom node, DAVBBS is my node alias

ax25d config:

sudo nano /etc/ax25/ax25d.conf


Add these 2 sections, you can delete or commented out the example configs in the file:

[KK6DCT-6 VIA 1]
NOCALL * * * * * * L
default * * * * * * - root /usr/sbin/ax25-node ax25-node

NOCALL * * * * * * L
default * * * * * * - root /usr/sbin/ax25-node ax25-node

The ‘VIA 1’ in the fist config is referring to the ‘1’ interface already defined in my /etc/ax25/axports.

Configure the node:

sudo nano /etc/ax25/node.conf

There’s a lot of defaults and examples in this file. I kept any timeout values unchanged, but changed:

HostName KK6DCT-6

Node permissions:

sudo nano /etc/ax25/node.perms

I kept :

# user type port passwd perms
kk6dct * * CHANGEPASSWORD 255

# Default permissions per connection type.
* ax25 * * 7
* netrom * * 7
* local * * 7
* ampr * * 7
* inet * * 7
* host * * 7

Change CHANGEPASSWORD for a password for local testing via telnet.

TODO – check whether I changed these defaults

nrbroadcast – in my default copy of the file there’s 2 default lines, one I’m assuming for port 1 and one for port 2. I’ve only configured port 1, so I deleted the second line:

sudo nano /etc/ax25/nrbroadcast
# /etc/ax25/nrbroadcast
# The format of this file is:
# ax25_name min_obs def_qual worst_qual verbose
1	5	192	100	0
#2	5	255	100	1

Start up netrom:

sudo nrattach netrom

if you get a “no such device” error, do a “sudo modprobe netrom” first.

nrattach: SIOCGIFFLAGS: No such device
nrattach: cannot find free NET/ROM device
$sudo modprobe netrom
$ sudo nrattach netrom
NET/ROM port netrom bound to device nr0

Configure telnet for testing:

sudo nano /etc/services


ax25-node       4444/tcp        # KK6DCT-6 node

This allows an incoming connection e.g. via telnet to get handled by ax25-node.

Configure ax25-node to start at boot:

sudo nano /etc/inetd.conf


ax25-node stream tcp nowait root /usr/sbin/ax25-node ax25-node

Note that this file also has a default line added for a bbs service over ax25, but this line has wait instead of nowait. I don’t know what this option does, but if you use wait instead of nowait you won’t get a connection to the node – don’t uncomment this line:

#:OTHER: Other services
#<off># bbs     stream  tcp     wait    root    /usr/sbin/ax25-node     ax25-no$

Restart inetd:

sudo service inetd restart

Now start up netromd and ax25d:

sudo netromd
sudo ax25d

Ready to go!

At this point I can telnet into my node locally, and also receive incoming connections over Packet.

I tested this locally with 2 packet stations:

  • Raspberry Pi set up as above, using a Signalink connected to a Wouxun KG-UV5D HT, and a Ed Fong rollup 2m/440cm antenna hanging against a window indoors.

With this radio on low power (1w) I can get to the local BERR37 node on 145.370MHz up on the hills near Lake Berryessa – in a straight line that’s roughly 20 miles from my location.

To test accessing the node running Zork and a command line weather forecast util called ansiweather I used:

  • AES PK232 accessed via a VT132 terminal card, connected to an Icom 880h and my regular 1/4 wave antenna in my attic.

Here’s accessing the node (KK6DCT-6) via the VT132 and PK232. What you’re looking at here is the VGA output from the VT132 terminal connected to the PK232 TNC:

  • c KK6DCT-6 : connect to the node
  • ? : list commands for the node – note ‘Weather’ and ‘Zork1’ in the list
  • w : run the weather command which calls answeather

Here’s Direwolf running on the Raspberry Pi. The ax25 startup steps are on the left (I didn’t get them setup to start on boot yet), and Direwolf receiving and sending on the right:

Here’s the hardware side of this Packet craziness on my desk. The Wouxun and Signalink on the right are connected to the Raspberry Pi which is out of the picture on the right. The AES PK232 at the bottom is connected to the Icom 880h on the right (the rest of the gear is not in use for this packet setup):

Packet Radio with Debian Hamradio Pure Blend

I stumbled across this concept of ‘Debian Pure Blends‘ a couple of days back. These are Debian distros that are configured with software preinstalled for a specific purpose, like graphic design, and astronomy. The Ham Radio distro caught my eye as it’s preconfigured with ax25 and Direwolf for Packet Radio.

The trouble is, while it has these included in the distro so you get them out of the box, it doesn’t seem they’re configured, and worse, the ax25 support doesn’t appear to work with Direwolf.

Here’s a few notes of my experimenting:

Direwolf uses a direwolf.conf file in your home directory which you customize with your callsign and setup to connect with your soundcard input and output. There doesn’t seem to be a copy of this file anywhere on the filesystem. The file is usually created if you’re building/installing from source by running ‘make install-conf’. I searched my fresh Debian install and couldn’t find a copy of direwolf.conf anywhere, so already being familiar with Direwolf, I decided to uninstall the pre-installed version (apt-get remove direwolf) and build/install from source unstead. See my previous notes on how to do this.

Immediately ran into the libasound library missing:

/usr/bin/ld: cannot find -lasound
 collect2: error: ld returned 1 exit status
 Makefile.linux:257: recipe for target 'fsk_fast_filter.h' failed
 make: *** [fsk_fast_filter.h] Error 1

This is fixed by installing libasound:

apt-get install libasound2-dev


Edit /etc/ax25/axports and add a line like this:
1 YOURCALL-1 1200 255 2 2m packet

Starting up direwolf for the first time:

 kev@kh-debian:/etc/ax25$ direwolf -t 0 -p
 Dire Wolf version 1.3

Reading config file /home/kev/direwolf.conf
 Audio device for both receive and transmit: default (channel 0)
 Channel 0: 1200 baud, AFSK 1200 & 2200 Hz, E+, 44100 sample rate.
 ERROR can't open device /dev/ttyUSB0 for channel 0 PTT control.
 Permission denied
 Note: PTT not configured for channel 0. (Ignore this if using VOX.)
 Ready to accept KISS client application on port 8001 ...
 Ready to accept AGW client application 0 on port 8000 ...
 Virtual KISS TNC is available on /dev/pts/1
 WARNING - Dire Wolf will hang eventually if nothing is reading from it.
 Created symlink /tmp/kisstnc -> /dev/pts/1

Looks like /dev/ttyUSB0 cannot be opened for my PTT on my Rigblaster Plug n Play.

Following instructions from here, as root, I did:

usermod -a -G dialout kev

and then logged out and logged back in again. That fixed that issue.

The input volume was low, so I bumped up the mic slider in the top right to about half way, and now the input volume is better:

KG6SJT-10 audio level = 43(20/19) [NONE] |||||||__
 [0.3] KG6SJT-10>ID:Network Node (YCARES)
 Unknown message type N, motorcycle


Next up, starting Direwolf and then starting up my ax25 stack with kissattach and mkiss (which I’ve covered before here), I was getting a Permission Denied error:

kev@kh-debian:~$ sudo kissattach /dev/ptmx 1
AX.25 port 1 bound to device ax0
Awaiting client connects on

Followed by:

kev@kh-debian:~$ sudo mkiss /tmp/kisstnc /dev/pts/4
 mkiss: open: Permission denied

I posted a question about this on the Direwolf group on Yahoo Groups here. Since it looks like mkiss is getting permission denied accessing /tmp/kisstnc from Direwolf, I started Direwolf with a sudo and this avoided this error. Direwolf shouldn’t need to run with sudo permissions so something’s not quite right, but this did allow me to get up and running, and then I could ‘axcall 1 kberr’ to make a connection to nearest packet node.

To get to this point I could have installed a vanilla version of Debian, Direwolf from source, and ax25, and I probably would have got to the same point in about the same about of time, but when I have time I’ll take a look at the other apps that get preinstalled.