Packet Radio on a Raspberry Pi the cheap way!

Packet radio is, in essence, the transmission of data over radio using a protocol called AX.25. It is the mechanism of transmission under the hood for APRS. However, APRS is unconnected packet, while Packet Radio is connected. This implies that Packet can be used for a number of other applications, such as keyboard-to-keyboard chat or connecting to a mail server or a BBS -- not just "blast away" the message.

In this post, I'll cover how to install and setup packet radio from a Raspberry Pi, without any additional hardware, and for a fraction of the cost.

A terminal showing the output of the HELP command in a TNC

I was recently introduced to the wonders packet radio. It has both a post-apocalyptic and 80's nerd feelings to it that I'm enjoying a lot. The fact that my background is in computer science might have something to do with it, too.

Packet Radio is a marketing term to refer to AFSK-modulated FM using AX.25 at 1200 baud (or 300 baud on most HF bands). Traditionally, the modulation of the data was achieved by a TNC or Terminal Node Controller connected both the a computer and to a radio. On top of the ability to connect to other systems, TNCs usually provide a "listener program" that replies to incoming connections, as well as other applications such as mailbox and BBS.

A Kantronics Packet Communicator 3 sitting on top of a 7100 and a IT-100

TNCs are not cheap, and they provide only a limited functionality, which prevents many amateurs from buying and using one. From time to time, some of this devices appear on eBay, which drastically reduces the cost. Still, you will need to wire your own cable and mess around with the settings on your radio, and this is something that not everyone is up to.

There's a cheaper alternative for those who like to tinker with computers. Any Raspberry Pi - and any Linux system, for that matter - can handle the modulation and offer similar functionalities to a TNC, including PTT control.

Following below, you'll find a step-by-step guide on how to install AX.25 and Linpac on your computer:

Step 1. Install Hamlib and Direwolf
On one side, Hamlib is a software library that most amateur radio applications use to connect to your radio. Direwolf, on the other side is a software TNC: it will handle audio in and audio out, together with CAT and PTT control.

The installation of Hamlib and Direwolf, as well as their configuration,  is extensively covered in steps 2 and 3 in this previous blog post. If you follow those instructions, you will get them up and running in some minutes.

Note August 2023: You don't need to complete any other steps rather than 2 and 3 on the other blog post.

Step 2. Install AX.25
AX.25 is an old data link layer protocol for communications based on an even older protocol named X.25. X.25 was widely use before TCP/IP and the definition of the ISO/OSI stack -- it literally pre-dates the Internet as we know it. It was the protocol that ATMs used to communicate with the central offices of their banks.

The installation of AX.25 is as simple as installing a few packets:
sudo apt-get install libax25 ax25-apps ax25-tools
Once done, you will need to add a line to a file. In order to do so, just execute the following:
cd /etc/ax25/
sudo nano axports
The contents of my /etc/ax25/ax25ports file

Go to the end of the file and add the following line:
vhfdrop M0PQA-1         19200   236     4       VHF Radio
  • vhfdrop is the name of your port
  • M0PQA-1 is YOUR callsign, followed by a -1
  • 19200 is the Data Terminal Equipment (DTE) speed which is the speed between the computer and the TNC. When using Direwolf, this is totally meaningless.
  • 236 is the Maximum Transmission Unit (MTU). You can increase this value up to a maximum of 255 if your connection is stable. If not, reduce it to a reasonable number such as 128.
  • 4 is the maximum number of packets that your radio will send before waiting for a confirmation. The higher it is, the higher the speed of your comms. However, if one of this packets fail, they all will be re-send. 4 is a reasonable value.

Step 3. Compile and Install LinPac
Unfortunately, the official Raspbian package for Linpac presents many issues. I strongly advice against using it. It will work much better if you compile Linpac yourself following these commands:

sudo apt-get install checkinstall libncurses5-dev libncursesw5-dev
cd /tmp
mkdir Linpac
cd Linpac
git clone linpac-linpac
cd linpac-linpac
git checkout develop
autoreconf --install
./configure --prefix=/usr
make -j8

Note that the following  lines are a single command. If you are copying and pasting them, make sure you select all the next lines:
sudo checkinstall --pkgname linpac --pkgversion 0.28 --pkgrelease 1 \
--pkggroup hamradio --pkgsource \
--maintainer --provides linpac \
--requires libax25,ax25-apps,ax25-tools,libncurses6 
make install

After running the last command, follow the command prompts to complete the installation. Essentially press Enter if you don't get any errors.

Step 4. Configure LinPac
Most of the configuration for LinPac will be done in the first launch. Before you can lauinch it, you need to execute the following instructions:
sudo chmod 4755 /usr/bin/listen
sudo mkdir -p /var/ax25/mail
sudo chown $USER /var/ax25/mail

Step 5. Start Direwolf and attach a AX.25 port
Considering that you have followed the instructions to install and configure Direwolf from this other post, you can now safely start Direwolf, AX25 and LinPac. The order of the following commands is critical.

In a new terminal, type:
sudo direwolf -t 0 -p
Output from the command above

In yet another terminal, type:
sudo kissattach /tmp/kisstnc vhfdrop
sudo kissparms -c 1 -p vhfdrop
sudo mheardd
sudo axlisten -archt
You will need to execute these 6 lines every time you want to use LinPac. Maybe you want to consider creating a shell script file to launch all of them together.

Step 6. Launch LinPac
Now, onto LinPac. Open (yet) another terminal and type:


And answer the following questions:
  • Callsign without SSID. In my case M0PQA
  • Home BBS callsign. In my case: M0PQA-1
  • Name of the port to connect to: vhfdrop (this is the same name that you added to the end of the ax25ports before)
  • Digipeaters used to connect: None. Just hit Enter.
  • Full hierarchical address will depend on your region. I'm using #32.GBR.EURO
At this point LinPac is ready to use! Just try your first connection with this command (yes, the : is a part of the command in this case).
MB7NCR is my regional server, managed expertly by Paul G4APL and Ann Lewis G7BSF. Their website is, and you can find a plethora of information about Packet Radio and AX.25 in there. Big thanks to Paul for all his patience with noobs.

If connected, you will get a prompt. Use :D (DISCONNECT) to disconnect when you are done. To exit LinPac, use ALT+X.

LinPac screen once launched

And that's it. You are now ready to connect to other stations using Packet Radio from your Raspberry Pi, without any additional hardware.

As usual, leave a comment below, or drop me a note over email, Instagram or Twitter, in case you encounter any issues.


  1. Very detailed one. I will try my hands on it. Cheers. M6KNB/VU3KNB

  2. Thank you. Let me know if it works for you.
    73 de M0PQA

  3. This comment has been removed by the author.

    1. Thanks. I'll be trying it out when it gets cooler. I ran GB7HAS here in Hastings - one of the first packet stations in the country. None of the local hams were interested, though!

      73 de G1HSM


Post a Comment