Setup PAT Winlink On Raspberry PI with RigControl

This page will walk you through downloading and installing the PAT Winlink software on your raspberry pi. Afterwards, we will setup a basic RigControl and PTT Interface for your radio with rigctl, and enable the service to start on boot. This is mainly for my own documentation, so it may not be pretty.

Installing PAT Winlink

Install the Prerequisites

sudo apt get update
sudo apt get upgrade
sudo apt install wget libhamlib-utils screen

Download the PAT Winlink Software
If using 64bit:

wget https://github.com/la5nta/pat/releases/download/v0.16.0/pat_0.16.0_linux_arm64.deb

If using 32bit:

https://github.com/la5nta/pat/releases/download/v0.16.0/pat_0.16.0_linux_armhf.deb

Install the PAT Winlink Package:
(Replace the xyz with the version number of the file downloaded above.)
If you’re unsure, just use the ls command.

sudo dpkg -i pat_x.y.z_linux_arch.deb

Configure PAT Winlink Basics

We will now open the configuration file and input some very basic configuration options.

Open the config file:

nano ~/.config/pat/config.json

At the top of the file, replace the following settings I’ve marked with “—” here with your own information.


  "mycall": "---YOUR HAM CALLSIGN----",
  "secure_login_password": "----PASSWORD FOR WEB INTERFACE----",
  "auxiliary_addresses": [],
  "locator": "----6 CHAR GRID----",
  "service_codes": [
    "PUBLIC"
 

Now Optionally, you can configure PATs http server to allow connections from outside the device (such as another device in your LAN)
To do this find the line:
"http_addr": "127.0.0.1:8015",
And Replace it with:
"http_addr": "0.0.0.0:8015",

Configuring a Connection Method

The official DOCS are a great resource for configuring the several connection methods.

Please use one of the following links to setup the method/s you’d like to use for Winlink connections:

https://github.com/la5nta/pat/wiki/ARDOP
https://github.com/la5nta/pat/wiki/AX.25-with-Direwolf
https://github.com/la5nta/pat/wiki/AX25-Linux
https://github.com/harenber/ptc-go/wiki#setup
https://github.com/la5nta/pat/wiki/VARA

Once your finished, save and close the file.

Set PAT Winlink to start on Boot

sudo systemctl enable pat@$USER

Add Hamlib Rig Control:

Find the following line in the file:
“hamlib_rigs”: {},

Right between those {}, we will hit the enter button to insert a new line. Paste the following, taking care to replace “ft-891” with your own rigs name.

  "ft-891": {"address": "localhost:4532", "network": "tcp"}

The section should end up looking like this:

  },
  "listen": [],
  "hamlib_rigs": {
  "ft-891": {"address": "localhost:4532", "network": "tcp"}
  },
  "ax25": {
    "engine": "linux",

Next you will find the connection method you would like to use rig control with by looking for one of these headers:
“ax25”: { , “ax25_linux”: {, “ardop”: {, “winmor“: {

Right under the main header for the connection method you will insert the following lines:
Take care to replace “ft-891” with the same rig name you used above.

    "rig": "ft-891",
    "ptt_ctrl": true,

For Example, the default blank AX25 Port:


  "ax25": {
    "engine": "linux",
    "rig": "",
    "beacon": {
      "every": 3600,
      "message": "Winlink P2P",
      "destination": "IDENT"
    }
  },

Becomes

  "ax25": {
    "engine": "linux",
    "rig": "ft-891",
    "ptt_ctrl": true,
    "beacon": {
      "every": 3600,
      "message": "Winlink P2P",
      "destination": "IDENT"
    }

Save the file and close it.

Configure Rigctl

Enter the following command to see the list of all supported radios and their “ids”

rigctl -l

Find yours, and note down the associated “id”

Next, obtain the serial port path for your radio interface. You can get an idea of what this may be by first navigating to /dev and listing the contents:

cd /dev
ls

If using a USB connection to your radio, it will probably be one of the ttyUSBX devices

In my case, my radio’s Serial path is /dev/ttyUSB0 and my FT-891s ID is: 1036

Now we will create a new service to start RigCTL on boot for your radio.

sudo nano /etc/systemd/system/rigctl.service

Paste the following in:
Take care to replace 1036 with the ID you found above, /dev/ttyUSB0 with your radios serial port, and 19200 with your radios CAT rate.

[Unit]
Description=rigctl
After=network.target

[Service]
Type=forking
ExecStart=screen -S rigctl -dm bash -c "rigctld -m 1036 -r /dev/ttyUSB0 -s 19200; exec sh"
Restart=always
User=kn4mkb
Group=kn4mkb

[Install]
WantedBy=default.target

Save the file, and enable it to auto start on boot:

sudo systemctl enable rigctl

Restart to Finish

That’s really all there is to it. Restart your PI, and both rigctl, as well as PAT winlink should come up. You can navigate in your browser to http://YOUR-PI-IP:8015 to access your new web based winlink client.

Consider Subscribing!

Signup for our once a month newsletter!

We don’t spam! Read our privacy policy for more info.

Leave a Reply

Your email address will not be published. Required fields are marked *