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.
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
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 <netrom> 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 NodeId #DAVBBS:KK6DCT-6
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$
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):