The Future of AX.25

Oooo man this is totally awesome. ARDC has grant an amount of 180 thousand dollars for fixing the AX.25 stack/kernel.

https://www.ampr.org/grants/grant-fixing-the-linux-kernel-ax-25/

Grant: Fixing the Linux kernel AX.25
Date: December 2021
Amount: €179,690
Changes to the Linux kernel over the years have improved and modernized the kernel, but have also made existing AX.25 implementations incompatible and turned preexisting issues into bugs. This can make systems unpredictable or even unusable. Linux kernel development is complex, requiring deep specialized knowledge, and bugs are hard to trace. This may be one of the reasons, why the Linux kernel AX.25 stack is currently in such a bad state.

This ARDC grant funds will allow the Deutscher Amateur Radio Club to hire software developers who can create a stable Linux AX.25 implementation and prevent Linux distributions from dropping pre-compiled AX.25 support. The fixed and functional Kernel-AX.25 stack will improve global amateur radio infrastructure. Professional kernel development can bring Linux AX.25 back to life.

Learn more at https://www.linux-ax25.org/wiki/Main_Page.

This is killing 🙂

Netrom Tutorial (n2nov)

Charles N2NOV has written a fantastic document with a clear explanation about netrom quality`s and parameters.

Setting NetRom Parameters
I was looking at the old NEDA (NorthEast Digital Association) newsletters from twenty years ago (1999) and want to show you some pertinent NetRom parameters that might help with the bloated (some up to 800) nodes lists that we see from time to time. These started as X1J parameters, but you might find them useful to give you an idea how to tweak your BPQ, Xrouter, *NOS, Flex, etc systems. Each program might use a different naming convention, but reading the details of your documentation will align to NEDA labels. As always, adjustments can be made for a non-standard configurations like full duplex data repeaters, etc. Feel free to discuss the technical points here, but gear the explanation for the newer sysops. The parameters are broken down differently by the type of connection you have with another station (mostly RF-based). Adaption to an AXIP link via wired internet should follow the Dedicated Point-to-Point Link (DPPL).

USER PORT (typical 2 meter port):
No node table is broadcast to keep the channel clear. Do this by setting Initial (Default) Obsolescence at 5 and the Minimum Obsolescence to 6. Since the default is lower than the cutoff, it will never broadcast. 

DPPL (only two backbone users on a dedicated frequency) [or AXIP]:
Your partner station should be a locked route with quality of 203.
Accept incoming nodes from your partner with minimum quality of 63. 
Initial (Default) Obsolescence at Minimum Obsolescence to 3
Nodes Broadcast Interval 900 seconds (15 minutes)
The obsolescence count will start at 5 and decrement by 1 every 15 minute cycle and stop when it hits 3 if there is no refresh from your partner station. This keeps things clean and updated within 30 minutes.

Multiway Backbone with 3 Partners (typically 220 Mhz regional channel):
Your partner station should be a locked route with quality of 203.
Accept incoming nodes from your partner with minimum quality of 63.
Initial (Default) Obsolescence at 5
Minimum Obsolescence to 2
Nodes Broadcast Interval 900 seconds (15 minutes)
The obsolescence count will start at 5 and decrement by 1 every 15 minute cycle and stop when it hits 2 if there is no refresh from your partner station. This keeps things clean and updated within 45 minutes. This allows for occasional transmitter collisions between partners.
NOTE: current practice is to set minimum quality values at 150 or 180 is only to mitigate the effect of mislabeled nodes qualities broadcast to partner systems that get propagated. There are several systems that make all of the nodes in their table higher than they should be. When the network is cleaned out and realigned, then the minimum quality can be adjusted downward.
How are node qualities adjusted when the nodes table is passed around the network from partner to partner?

*** ONLY WHAT IS ON YOUR PHYSICAL BOX OR WIRED LAN SHOULD BE HIGHER THAN 203 ***
Initial partner default quality is  203 (out of 256)  or 203/256
First hop between AXIP partners is  203/256 * 203/256 or 161/256
Second hop between AXIP partners is 161/256 * 203/256 or 128/256
Third hop between AXIP partners is  128/256 * 203/256 or 101/256
Fourth hop between AXIP partners is 101/256 * 203/256 or 80/256
Fifth hop between AXIP partners is  80/256  * 203/256 or 63/256

Let's look at how various stations relate to each other on the NetRom nodes list. First, each station sets their partners at a default value of 203 if on AXIP or DPPL. This is only the value between the two stations talking to each other. Here are some of my forwarding partners and some of their other partners.

Second, let's look at how those next-line stations actually calculate to my station. If my partner is 203/256 (or about 80% reliability) and so is their partner, then the second-level station is not going to be 80% reliability to me. BBGATE:AA6HF-4 is 80% to me on a direct connection, but has to be less when going through LAXNET:N6ROE-3.

By doing the calculation of each level's reliability of 203/256 against the next level,
we get 203/256 x 203/256 (same as 0.79296875 x 0.79296875) or 161/256 (0.628799438476).

If we extend this exercise by multiplying against the next level of 203/256 we get:

Going down level by level we get values of 128 (X), 101 (Y), 80 (Z), etc.
By setting MIN QUALITY you can cut off how many levels (hops) you want to see.
MIN QUAL 161 lets me see all stations closer to me above the level that X is on.
MIN QUAL 128 allows me to see down to the level of X.
MIN QUAL 101 allows me to see down to the level of Y.
MIN QUAL 80  allows me to see down to the level of Z.

Direwolf 1.7 Dev branch support IL2P

Yes I know i`m a few steps behind, but great news. Direwolf is also support IL2P.

### New Features: ###

- Improved Layer 2 Protocol [(IL2P)](https://en.wikipedia.org/wiki/FX.25_Forward_Error_Correction).  Use "-I 1" on command line to enable transmit for first channel.  Compatible with Nino TNC for 1200 and 9600 bps.

- Limited support for CM109/CM119 GPIO PTT on Windows.

- Dire Wolf now advertises itself using DNS Service Discovery. This allows suitable APRS / Packet Radio applications to find a network KISS TNC without knowing the IP address or TCP port. Thanks to Hessu for providing this.  Currently available only for Linux and Mac OSX.  [Read all about it here.](https://github.com/hessu/aprs-specs/blob/master/TCP-KISS-DNS-SD.md)

- The transmit calibration tone (-x) command line option now accepts a radio channel number and/or a single letter mode:  a = alternate tones, m = mark tone, s = space tone, p = PTT only no sound.

- The BEACON configuration now recognizes the SOURCE= option.  This replaces the AX.25 source address rather than using the MYCALL value for the channel.  This is useful for sending more than 5 analog telemetry channels.  Use two, or more, source addresses with up to 5 analog channels each.

- For more flexibility, the FX.25 transmit property can now be set individually by channel, rather than having a global setting for all channels.  The -X on the command line applies only to channel 0.  For other channels you need to add a new line to the configuration file.

    > After:   "CHANNEL 1"   (or other channel)
    >
    > Add:     "FX25TX 1" (or 16 or 32 or 64)

https://en.wikipedia.org/wiki/Improved_Layer_2_Protocol

IL2P (Improved Layer 2 Protocol) is a data link layer protocol originally derived from layer 2 of the X.25 protocol suite and designed for use by amateur radio operators. It is used exclusively on amateur packet radio networks.

IL2P occupies the data link layer, the second layer of the OSI model. It is responsible for establishing link-layer connections, transferring data encapsulated in frames between nodes, and detecting errors introduced by the communications channel.

The Improved Layer 2 Protocol (IL2P) was created by Nino Carrillo, KK4HEJ, based on AX.25 and implements Reed Solomon Forward Error Correction for greater accuracy and throughput than either AX.25 or FX.25. Specifically, in order to achieve greater stability on links exceeding speeds of 1200 baud.

IL2P can be used with a variety of modulation methods including AFSK and GFSK. The direwolf software TNC contains the first open source implementation of the protocol.

So now let`s get the “Dev” branch and start playing with IL2P.

git clone https://github.com/wb2osz/direwolf.git
cd direwolf
git branch -r
git checkout dev
mkdir build && cd build
cmake ..
make update-data
make -j4
sudo make install
make install-conf

XRpi axip link with Jnos

Jean VE2PKT has made a great howto, how to get the TUN interface going on XRpi and setup a AXIP link with Jnos.

First setup XRpi TUN interface – XROUTER.CFG

INTERFACE=5 
 ID=Tunnel to Linux 
 TYPE=TUN 
 COM=tun99 
 PROTOCOL=IP 
 IOADDR=192.168.25.98  # Chose and free address from your LAN , this will become the linux address of your TUN
 MTU=1500 
ENDINTERFACE 

#Create a TUN Port:
 
PORT=1 
 ID="Tunnel Linux <> XR" 
 INTERFACENUM=5 
 ipaddress=192.168.25.4   # This is my Xrouter ipaddress
ENDPORT 

Next setup a AXIP link in XRpi – XROUTER.CFG

# AXIP link
PORT=3
 ID=AXIP Link with JNos (VA2OM-5)
 INTERFACENUM=2
 IPLINK=192.168.25.228
 QUALITY=255
 MINQUAL=100
 FRACK=2000
 RESPTIME=200
 RFBAUDS=56000
 MHEARD=5
ENDPORT

Setup XROUTER.SYS

ip route default 1 192.168.25.1 d                  # Default routing
ip route add 192.168.25.0/24 192.168.25.98 1 d     # Xrouter TUN linux side Address
ip route add 192.168.25.228/32 192.168.25.249 1 d  # .228 is is my Jnos IP address
                                                   # .249 is my Linux Ip Address 
ip route add 44.0.0.0/9 44.135.49.65 3 e           # Forward all my AMPR.Org traffic to my  Jnos
ip  route add 44.128.0.0/10 44.135.49.65 3 e

Setup BOOTCMDS.SYS

#!/bin/bash
shell /usr/sbin/arp -i eth0 -Ds 192.168.25.4 eth0 pub

Now it`s time to setup Jnos – AUTOEXEC.NOS

1st: Create a TUN in Jnos
#
#
attach tun tun0 1500 0
#
ifconfig tun0 ipaddress 192.168.25.228
ifconfig tun0 netmask 255.255.255.0
ifconfig tun0 mtu 1500
#
# 192.168.25.249  is my Jnos Linux TUN address
# 192.168.25.228 is my Jnos IP address
# 192.168.25.247 is my Linux IP address
#
shell ifconfig tun0 192.168.25.249 pointopoint 192.168.25.228 mtu 1500 up
pause 3
shell ip route add 192.168.25.228 dev tun0 table 44 src 192.168.25.247
shell /usr/sbin/arp -i eth0 -Ds 192.168.25.228 eth0 pub
#
route add default tun0 192.168.25.247 # raspberry PI


2sd: Make a AXIP Link Jnos <> Xrouter

#
attach axip om-4 256 192.168.25.249  # Use the Linux TUN ip address
ifconfig om-4 description "Link with VA2OM-4 XRPI"

 

Brian Rogers N1URO – Silent Key

Mail of Brian Webster N2KGC – President EastNet Amateur Radio Network

It is with great sadness that I pass along the news that Brian Rogers N1URO
is now a silent key. He passed on Tuesday evening January 4th, 2022.

Brian was the author of the URONode packet radio software and past president
of the Eastnet Amateur Radio Network (https://www.eastnetpacket.org/). He
was an avid packet user and contributor to various software packages, not
just his own. He was also the AmprNet coordinator for the states of MA, NH,
VT, PA, MD, DE, CT, RI and ME.

Professionally his was an IT consultant and ran his company Network
Continuum Connecticut (https://www.nc-ct.net/)

He was a mentor to many who wanted to operate packet nodes or set up an
apmr.org station. He had a broad knowledge of many other node operating
systems, keeping nodes of all types running at his QTH. He was a wealth of
detailed knowledge and will be missed immensely.

Side Note

This is very sad news. I have been in regular contact with him over the
years. He was always willing to help you with packet/amprnet related
things. He always had his own opinion on certain things, and he
couldn’t be changed. I didn’t always appreciate this. He will be
missed, packet land is a bit more empty.

Till next time.

N1URO to PI1LAP ttl 25 cct=01F0 <DISC REQ>
04:55:35T PI1LAP>N1URO Port=7 <RR R F R5>
04:55:35T PI1LAP>N1URO Port=7 <I C P S7 R5> NET/ROM
PI1LAP to N1URO ttl 25 cct=035D <DISC ACK>

73 Niels PD9Q

Udev Rules in Linux

I became very frustrated with the fact that my USB ports kept changing. I have a TNC2S 1k2 for Aprs and an SCS Tracker for Robust Packet connected to my Pi. The Icom 7300 is controlled via HamLib on another Raspberry Pi. But once it was necessary to reboot the PI running Linbpq , the ttyUSB0 or the ttyUSB1 would keep changing places. Conclusion, I had to adjust the bpq32.cfg again before everything worked the way I wanted.

Now it is quite easy to do something about this. Call me Lazy because it took so long.

Udev rules look like this

SUBSYSTEM=="tty", ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303",
SYMLINK+="ttyTNC2S

Now, of course, we first have to find out what the “idVendor” and “idProduct” is.

With the command….

udevadm info -a -n /dev/ttyUSB0

We get a long list of data from usb to serial port ttyUSB0.

With this information we can create an udev rule.

sudo nano etc/udev/rules.d/99-usb-serial.rules
SUBSYSTEM=="tty", ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303",
SYMLINK+="ttyTNC2S
udevadm control --reload
reboot

This has been done for both sides. Both ttyUSB0 and ttyUSB1. And look there are the ttyTNC2S and ttySCS ports. Now you can restart Linux as often as you want and trust that the same USB port is always assigned to the right box.

Now my port config looks like this in bpq32.cfg.

PORT
 PORTNUM=3
 ID=14.1022 RPR ;(RPR)
 TYPE=EXTERNAL 
 COMPORT=/dev/ttySCS
 SPEED=38400
 DRIVER=SCSTracker
 CONFIG
RIGCONTROL
HAMLIB 44.137.31.76:4532
14.1022,USB,F1,H1
****
WL2KREPORT PUBLIC, api.winlink.org, 80, PI8LAP-10, JO11VN, 00-23, 14102200, ROBUST, 25, 35, 3
WL2KREPORT PUBLIC, api.winlink.org, 80, PI8LAP-10, JO11VN, 00-23, 14102200, PKT300, 25, 35, 3
WL2KREPORT PUBLIC, api.winlink.org, 80, PI8LAP-10, JO11VN, 00-23, 144850000, PKT1200, 10, 20, 5, 0
WL2KREPORT PUBLIC, api.winlink.org, 80, PI8LAP-10, JO11VN, 00-23, 430950000, PKT9600, 10, 20, 5, 0
;#
  M UISC
  O 4                   ; MAXFRAME
  F 190                 ; FRACK
  T 8                   ; TX Delay
  FORCE ROBUST
  USEAPPLCALLS          ; Accept connects to all APPLCALLS
  BEACONAFTERSESSION    ; Beacon after session
  %L 1500               ; Centre Freq for Normal Packet (Default is 1500)
  @I 64                 ; Paclen = 60
  %T 1                  ; TX Autotracking 1 = on
  %N 10
  %B 300
ENDPORT

Great…..

XRpi interfacing with LinFBB

Software is available on this link

Wow, found great software. Yes I know, it has been around for a while. I thought it would be nice to keep me busy on a rainy Saturday. So let’s interface it with LinFBB.

It actually works a bit like BPQ32 and LinFBB with WA8DED emulation. But for XRouter and LinFBB we need a virtual comport. We can make these easily with socat.

sudo apt install socat

Now lets create some comports

# Create pty pair
socat -d -d -ly PTY,link=/home/pi/xrpi/ttyq1 PTY,link=/home/pi/xrpi/ptyq1 &
sleep 2

I have chosen to create this as a normal user and put it in the directory /home/pi/xrpi/. Now as a normal user I can access and use them. I am never much of a fan of doing everything as a Root user.

Now lets configure XRouter.

INTERFACE=5
	TYPE=ASYNC
	COM=/home/pi/xrpi/ttyq1
	PROTOCOL=DEDHOST
	APPLNUM=1
	CHANNELS=4
	SPEED=57600
	FLOW=0
	MTU=256
ENDINTERFACE

APPL=1
	APPLNAME=FBB
	APPLCALL=PI8LAP-1
	APPLALIAS=LAPFBB
	APPLQUAL=254
	APPLFLAGS=4
ENDAPPL

Next is LinFBB… port.sys

# FBB7.0.8-beta8
#
#Ports TNCs
 1     1
#
#Com Interface Adress (Hex)       Baud
1  	 9        /home/pi/xrpi/ptyq1    57600
 
#TNC NbCh Com MultCh Pacln Maxfr NbFwd MxBloc M/P-Fwd Mode  Freq
 0   0    0   0      0     0     0     0      00/01   ----  File-fwd.
1   4    1   1      236   4     1     10     00/15 DUWYL XRpi

Now fist create a start file for XRpi

# First kill running process of socat
sudo kill $(ps aux | grep '[s]ocat' | awk '{print $2}')
# Create pty pair
socat -d -d -ly PTY,link=/home/pi/xrpi/ttyq1 PTY,link=/home/pi/xrpi/ptyq1 &
sleep 2
# Start XRpi(1)
sudo setcap cap_net_raw,cap_net_bind_service=pe xrpi
./xrpi

1. As Normal user, it will need CAP_NET_RAW capability in order to use TCP/IP via the LAN, WiFi or localhost. And it will need CAP_NET_BIND_SERVICE if you wish to open any “service ports” on the linux TCP/IP stack whose numbers are below 1024.

First we have to start XRpi because of course the virtual comports have to be created. After this it is LinFBB’s turn. Now is the time to test.

The link with BPQ32 is also online. Also with virtual comports.

And yes, there is the old trusted LinFBB.

The possibilities are endless with this software. So there goes me free Saturday again.

MHSave and Python

Today I am playing with Python and Matplotlib. In BPQ32 you have the option to save the Most Heard list (MH) when you close BPQ32. This contains a lot of data that you can use. Above I made a plot of the received stations and the number of packets I received at 14.1022Mhz + 1000Hz at 300Baud. Now I am not a world programmer, so this could probably be easier or different. Below the script I have written and used.

#!/usr/bin/python3
import re, csv, zlib
import matplotlib.pyplot as plt
import numpy as np

#First get the data form the right port. 14.1022Mhz 300 Baud HF Packet

port4 = []

with open("MHSave.txt") as f:
        found_port4 = False

        for line in f:
                if line.startswith("Port:4"):

                        found_port4 = True

                if found_port4:
                        if line.startswith("Port:5"):
                                break
                        else:
                                mod_string = line.replace('||', '')
                                mod_strings = re.sub("via.*$", "", mod_string)
                                port4.append(mod_strings.rstrip('\n'))

with open('port4.txt', 'w') as fout:
        fout.writelines("\n".join(port4[1:]))

#print("\n".join(port4))

# Convert it to a csv file
with open('port4.txt', 'r') as in_file:
    lines = in_file.read().splitlines()
    stripped = [line.replace(","," ").split() for line in lines]
    grouped = zip(*[stripped]*1)
    with open('port4.csv', 'w') as out_file:
        writer = csv.writer(out_file)
        writer.writerow(('Epoch', 'Pack-rev', 'Call', 'Month', 'Day', 'Time'))
        for group in grouped:
            writer.writerows(group) 

# Matplotlib create a nice Plot of the received calls

filename = 'port4.csv'
with open(filename) as f:
    reader = csv.reader(f)
    header_row = next(reader)

    #Get Packets and Calls received
    packs, calls = [], []
    for row in reader:
        pack = int(row[1])
        call = str(row[2])
        packs.append(pack)
        calls.append(call)

x = np.arange(len(calls))

fig, ax = plt.subplots()

ax.barh(x, packs, align='center')
ax.set_title("Call and Packets received on PI1LAP")
ax.set_xlabel('Received Packets')
ax.set_ylabel('Station Callsigns')
ax.set_xticks(packs, minor=True)
ax.set_yticks(x)
ax.set_yticklabels(calls)
plt.tight_layout()
plt.show()

Upcoming release of Jnos

Read all about it…….

differences between 2.0m.5Gx and 2.0m.5G - April 17, 2021
 ---------------------------------------------------------

 being released this evening (CDT) ...

 ax25 heard has been 'revamped', new 'heard via digipeater' feature,
 so that you can actually see stations not directly heard, I created
 this due to my crazy obsession with Robust Packet lately and seeing
 all the APRS frames coming in on 30 meters, many via K4KPN-10, nice
 to know who else you can qso with (indirectly), really liking this.

 the save/load functionality improved, you can specify save and load
 file now, and times are FINALLY accurate on load, this took a lot of
 effort, but worth it in the end I think. I have NOT included saving
 of the latest digipeater heard list (yet), that will be next time.

 To be honest ? I hated the introduction of the 'show' subcommand, so
 the original 'ax25 h <iface>' is back and will stay that way ...

 command help dialogue now taken from a NEW usage/ax25/heard.txt file
  (create new /jnos/usage/ax25 directory, copy heard.txt over to it)

 note : I have NOT updated j2addendum.txt (yet)