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"

 

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.