Skip to content

Setting up a Station

The Physical Station

If you have already set up your station, or you only intend to play with pax25 offline/using Internet protocols instead of RF, skip to the next section.

Setting up a packet radio station requires acquiring a Terminal Node Controller (TNC) and connecting it to a radio. Even a simple Baofeng UV-5R will work. The cables required to connect your TNC and your radio will vary depending on the model of radio and TNC you are using. Consult the documentation for your TNC and radio for more information.

Likewise, the cables connecting your TNC and your computer may also vary, but for most cases you will at least want a USB to serial adapter.

Most major cities in the United States have Packet Radio networks you can connect to. You can check the map1 that lists several registered stations within the US. If you're outside the major cities you may need more powerful equipment (or taller towers) to reach a node. Alternatively, you can try HF packet frequencies. We highly recommend enlisting the help of your local Amateur Radio club to help you get set up. They will be able to help you find the best equipment for your area.

Once connected, you should check your local band plan to determine where packet radio stations are likely to be listening. Once tuned to the correct frequency, you will want to drop your TNC into KISS mode, assuming it is not already in it. This will allow you to use your TNC with Pax25.

Initializing the Pax25 Station

Once you have your physical station set up, it's time to build your virtual one! The first step is to create a new Python file. We'll call it main.py for now, but you can name it whatever you like.

main.py
from pax25.station import Station
from pax25.interfaces import FileInterface
from pax25.contrib.bulletin_board import BulletinBoard
import asyncio

station = Station(
    config={
        # Replace this with your callsign.
        "name": "N0CALL",
    }
)
# This interface allows us to connect using the keyboard and terminal,
# as the default files are stdin/stdout.
FileInterface.install(station, name="file", settings={})
# As this is the first application installed on our file interface, we'll
# connect to it by default.
station.connection.add_app(BulletinBoard, interfaces=["file"], settings={})

asyncio.run(station.start())

If you run this script, you'll find yourself face-to-face with the included Bulletin Board System.

Let's break the script down:

from pax25.station import Station
from pax25.contrib.bulletin_board import BulletinBoard
import asyncio

First, we import the Station class from pax25.station, and the BulletinBoard application from pax25.contrib.bulletin_board. In addition, we import the FileInterface which allows us to take input from a file. We also import asyncio, which we'll use to run our station. The asyncio library is a part of the standard Python library is used to run asynchronous code, which is a fancy way of saying code that can run in the background while other code is running. This is important for our station, because we want to be able to send and receive packets while we're doing other things.

station = Station(
    config={
        # Replace this with your callsign.
        "name": "N0CALL",
    }
)

Next, we create a new Station object. The Station class takes a config argument, which is a dictionary containing the configuration for the station. Our config dictionary has only one key, the station's name. You can read more about Station configuration options if you'd like.

# This interface allows us to connect using the keyboard and terminal,
# as the default files are stdin/stdout.
FileInterface.install(station, settings={})

We install an interface onto the station so that it can communicate. The file interface is a special interface that allows us to use files on our computer as if they were a TNC. This is useful for testing or using the command line to interact with Pax25, but not very useful for actually sending and receiving packets to other stations. We'll add a real interface later.

In this case, the default input and output files are stdin/stdout. Unless you're doing something especially fancy, that should be your keyboard and command line terminal.

station.connection.add_app(BulletinBoard, interfaces=["file"], settings={})

Next, we register the BulletinBoard application with the station. The register_app method takes three arguments: an application, interfaces, and settings. The app argument is the application we want to register. The interfaces argument is a list of interfaces we want to register the application with. The settings argument is a dictionary of settings for the application. In this case, we're going to use the default settings, so we pass an empty dictionary.

asyncio.run(station.start())

Finally, we 'start' the station by using asyncio.run on the result of the station's start method. This method sets up all the interfaces we registered with the station and instantiates the applications. In this case, it will set up the file interface and instantiate the BulletinBoard application, and begin receiving and sending packets against the various interfaces.

Now that we have a working station, we can learn how to build our own applications, or we can configure a real interface.


  1. This map is maintained by WW2BSA. His website contains additional maps and information about packet radio