Introduction

As per KM4ACK’s great video tutorial, I’ve decided to set up Pat (the Winlink client) on my notebook. It worked flawlessly, so I’ve decided to re-do it - just this time, on OrangePi PC2, running Armbian Buster.

The tutorial in the video is not quite straightforward for this platform. It’s written for Raspberry Pi, and the main problem we’re having with it, that we use arm64 (or aarch64) architecture. Files, compiled for Raspberry Pi, are armhf.

Disclamer: I am running a software as root. This is not a recommended way. In fact, it’s the very, very wrong way. Please use normal user, fix the scripts and configuration. Things can get messy, and as per Murphy, they always will. You have been warned.

So, let’s get to it.

Software instalation

Pat

Compiling, installing

As described, pat has to be compiled from source. We’ll need golang for that. Here’s the shell log of instalation of pat.

apt update
apt upgrade -y
apt install git golang golang-go
echo "export GOPATH=$HOME/go" >> ~/.bashrc

apt install -y ax25-apps ax25-tools libax25 libax25-dev # for -tags libax25 option

# go get -u github.com/la5nta/pat # Don't want AX.25?
go get -tags 'libax25' github.com/la5nta/pat # We want AX.25.
cp $GOPATH/bin/pat /usr/bin/ # Install the binary

pat help # test if it works

Service file

vim /etc/systemd/system/[email protected]
------
[Unit]
Description=pat - Winlink client for %I
Documentation=https://github.com/la5nta/pat/wiki
After=ax25.service network.target

[Service]
User=%i
ExecStart=/usr/bin/pat http
Restart=on-failure

[Install]
WantedBy=multi-user.target
------
systemctl daemon-reload
systemctl enable pat@root
systemctl start pat@root

USB to FT-857D adapter rule for custom alias

My personal touch - just if there’s the case of having more than 1 USB-to-serial adapters attached. This way, rigctld always works.

vim /etc/udev/rules.d/99-ttyUSBYaesu.rules
------
067b:2303

SUBSYSTEM=="tty", ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303", SYMLINK+="ttyYaesu", GROUP="dialout", MODE="0666"
------
reboot

Configuring pat

cd ~/.wl2k
vim config.json
------
Things to edit:
- mycall
- secure_login_password
- locator
- http_addr (listening - I've set 0.0.0.0:8081)
- motd ("test")
- connect aliases (if you have any)
- listen: ["ardop","ax25"]
- hamlib_rigs: add "857D":{"address":"localhost:4532","network":"tcp"}
- protocols: add your rig ("857D") to... basically every one of them
------

Rigctld, libhamlib, or ptt-control, whatever you say

apt install libhamlib-utils

ARDOP

KM4ACK video on playlist no. 3

If you were on raspberry pi or on amd64 architecture, you would do one of following:

wget http://www.cantab.net/users/john.wiseman/Downloads/Beta/piardopc
wget http://www.cantab.net/users/john.wiseman/Downloads/Beta/ardopc

However, this is arm64. This is where few hours of my searching began, until I found out how to do it here:

cd ~
mkdir dl && cd dl
wget http://www.cantab.net/users/john.wiseman/Downloads/Beta/TeensyProjects.zip
unzip TeensyProjects.zip
cd TeensyProjects/ARDOPC
make
cp ardopc ~/ham
cd ~/ham
chmod u+x ardopc

AX25

Basically, follow KM4ACK (he has config example on this one as well, video 4 on the playlist)

apt install libasound2-dev
cd ~/dl
git clone https://www.github.com/wb2osz/direwolf
cd direwolf
make
make install
make install-conf
vim ~/direwolf.conf
echo "wl2k MY_CALL 9600 255 7 Winlink" >> /etc/ax25/axports

Running the whole setup

So far, because they are sharing a same audio interface, I prefer to kill ax25 when starting ardop et vice versa, although I am not sure wether it is necesary. Need to investigate.

orangepipc2:root:[~/ham]:# ls
ardopc	kill_all.sh  start_ardop.sh  start_ax25.sh

kill_all.sh

## kill all AX25

screen -X -S direwolf kill
sudo killall kissattach
screen -X -S TNC kill

## kill all ARDOP
screen -X -S ARDOP kill
screen -X -S TNC kill

start_ardop.sh

cd $(dirname "$0")
./kill_all.sh
screen -S TNC -d -m rigctld -m 122 -r /dev/ttyYaesu -s 4800
screen -S ARDOP -d -m ./ardopc 8515 plughw:2,0 plughw:2,0
sleep 1
systemctl restart pat@$(whoami)

start_ax25.sh

cd $(dirname "$0")
./kill_all.sh
screen -S TNC -d -m rigctld -m 122 -r /dev/ttyYaesu -s 4800

screen -S direwolf -d -m direwolf -p -c /root/direwolf.conf
sudo kissattach /tmp/kisstnc wl2k
sudo kissparms -c 1 -p wl2k 

sleep 1
systemctl restart pat@$(whoami)