💾 Archived View for alaskalinuxuser.ddns.net › 2021-12-22.gmi captured on 2024-09-29 at 00:19:21. Gemini links have been rewritten to link to archived content

View Raw

More Information

-=-=-=-=-=-=-

Pat, Winlink, and AX.25

">

62w, https://alaskalinuxuser3.ddns.net/wp-content/uploads/2021/10/ax25-

300x178.png 300w" sizes="(max-width: 662px) 100vw, 662px" />

As I continue to learn about digital modes and ham radio, I was intrigued with

the idea of testing ax.25 vs ardop in real world situations. As it turns out, I

had no idea what I was getting myself into! It was one of the most painful

Linux setups that I’ve ever done, not because it was so terribly hard, but I

did not fine one complete step by step document to guide me through it. It took

me several days of fiddling and lots of research to get it sorted out. I’m

putting it all together here, in hopes that it will help the next guy!

First, I needed to install direwolf and ax.25 utilities in Ubuntu:

$ sudo apt-get update\n $ sudo apt-get install ax25-tools\n $ sudo apt-get

install direwolf

Then, I had to create a system service to start and stop the ax.25 interface

and reload the daemons:

$ sudo nano /lib/systemd/system/ax25.service\n \n =======================\n

[Unit]\nDescription=AX.25 KISS interface\nAfter=network.target\n\n

[Service]\nType=forking\nExecStart=/usr/local/bin/ax25-up /dev/ttyUSB0 wl2k

1200\n\n[Install]\nWantedBy=default.target\n\n =======================\n $

sudo systemctl daemon-reload

Next, I needed to download an ax.25-up binary and make it executable:

\n $ sudo curl -o /usr/local/bin/ax25-up https://raw.githubusercontent.com/

la5nta/pat/master/share/bin/axup\n $ sudo chmod +x /usr/local/bin/ax25-up

Now I had to create virtual ports for ax.25 to use. Notice that since I am

using HF, I needed a low baud rate (speed) of 300, rather than 1200, as you

would expect to see with VHF/UHF.

$ sudo nano /etc/ax25/axports \n \n ======================= \n# /etc/ax25/

axports\n#\n# The format of this file is:\n#\n# name callsign speed paclen

window description\n#\n\n#1\tOH2BNS-1\t1200\t255\t2\t144.675 MHz (1200

bps)\n#2\tOH2BNS-9\t38400\t255\t7\tTNOS/Linux (38400 bps)\n\n#portname

callsign speed paclen window description\nwl2k KL4TH

300 255 7 Winlink\n\n =======================

Now I can start and stop the ax.25 service, or check the status at will, like

so:

$ sudo systemctl start ax25\n $ sudo systemctl status ax25 -l\n $ sudo

systemctl stop ax25\n $ sudo systemctl start ax25

After that I edited my PAT configuration file. Notice in the PAT configuration

file that the ax.25 port of wl2k matches the axport portname that we made

earlier:

$ pat configure\n \n =======================\n {\n "mycall":

"KL4TH",\n "secure_login_password": "<EDITED>",\n

"auxiliary_addresses": [],\n "locator": "BP64du",\n "service_codes":

[\n "PUBLIC"\n ],\n "http_addr": "localhost:8080",\n "motd": [\n

"Open source Winlink client - getpat.io"\n ],\n "connect_aliases": {\n

"telnet": "telnet://{mycall}:CMSTelnet@cms.winlink.org:8772/wl2k"\n },\n

"listen": [],\n "hamlib_rigs": {"myrig": {"address": "localhost:

4532", "network": "tcp"}},\n "ax25": {\n "port": "wl2k",\n

"beacon": {\n "every": 3600,\n "message": "Winlink P2P",\n

"destination": "IDENT"\n },\n "rig": ""\n },\n "serial-tnc":

{\n "path": "/dev/ttyUSB0",\n "baudrate": 4800,\n "type":

"Yaesu"\n },\n "winmor": {\n "addr": "localhost:8500",\n

"inbound_bandwidth": 1600,\n "drive_level": 0,\n "rig": "",\n

"ptt_ctrl": false\n },\n "ardop": {\n "rig": "myrig",\n

"ptt_ctrl": false,\n "addr": "localhost:8515",\n "arq_bandwidth":

{\n "Forced": false,\n "Max": 500\n },\n

"beacon_interval": 0,\n "cwid_enabled": true\n },\n "pactor": {\n

"path": "/dev/ttyUSB0",\n "baudrate": 57600,\n "rig": "",\n

"custom_init_script": ""\n },\n "telnet": {\n "listen_addr": ":

8774",\n "password": ""\n },\n "gpsd": {\n "enable_http":

false,\n "use_server_time": false,\n "addr": "localhost:2947"\n

},\n "schedule": {},\n "version_reporting_disabled": false,\n

"forms_path": "/home/alaskalinuxuser/.wl2k/Standard_Forms"\n}\n

=======================\n \n

Before I could start direwolf, I needed to define a few things in the config

file. There file is huge, and I didn’t change too much, the rest I left as

default. This file can be downloaded here, and you put it in your home folder

as ~/direwolf.conf making the necessary edits:

\n#

\n# FIRST AUDIO DEVICE PROPERTIES #\n#

(Channel 0 + 1 if in stereo) #\n#

\n#############################################################\n\n# Get this

with aplay -l\nADEVICE plughw:1,0\n\n#\n# Number of audio channels for this

souncard: 1 or 2.\n#\n\nACHANNELS

1\n\n#############################################################\n#

\n# CHANNEL 0 PROPERTIES #\n#

\n#############################################################\n\nCHANNEL

0\n\nMYCALL KL4TH-0\n\nMODEM

300\n\n#############################################################\n#

\n# VIRTUAL TNC SERVER PROPERTIES #\n#

\n#############################################################\n\n\nAGWPORT

8000\nKISSPORT 8001

Then I could start direwolf with sudo, because it didn’t work right without

using sudo:

$ sudo direwolf -t 0 -p\n \nDire Wolf version 1.5\nIncludes optional support

for: gpsd hamlib\n\nReading config file direwolf.conf\nAudio device for both

receive and transmit: plughw:1,0 (channel 0)\nChannel 0: 300 baud, AFSK 1600 &

1800 Hz, D, 44100 sample rate / 3.\nNote: PTT not configured for channel 0.

(Ignore this if using VOX.)\nReady to accept AGW client application 0 on port

8000 ...\nReady to accept KISS TCP client application 0 on port 8001

...\nVirtual KISS TNC is available on /dev/pts/5\nCreated symlink /tmp/kisstnc

-> /dev/pts/5

With direwolf running, we can see the created symlink to /dev/pts/5 (in this

case), and we can use that with kissattach to link the dev port to our axport.

Keep in mind, you have to launch this with sudo, or it will not work!

$ sudo /usr/sbin/kissattach /dev/pts/5 wl2k\n \nAX.25 port wl2k bound to

device ax0

Of course, I also needed rig control, so I launched that as usual with

rigctrld:

$ rigctld -m 105 -s 4800 -r /dev/ttyUSB0

Finally, we are ready to start PAT and listen on ax.25:

$ pat --listen "ax25" http

Now when I open up my browser, pointed to localhost:8080, I get the usual PAT

interface with the “listening on ax.25” banner at the top!

All in all, it is much more complicated to use and setup than ardop, by far.

However, it was supposed to be faster and more robust from the studies I

reviewed. Unfortunately, I couldn’t put that to a test, as the nearest station

using HF and ax.25 was 700km away, and I couldn’t get it to connect. Likewise,

with ardop, I couldn’t connect to anyone that far away either, so I didn’t

conclusively prove anything.

Linux – keep it simple.