Xrouter Config

After running BPQ32 for years, I needed something to get the fire going again. I chose Xrouter. Below are some configuration examples of Xrouter. These are small steps.

This line (!ddmm.mmN/dddmm.mmE) but then with “” was killing my wordpress website 🙂 There is always something.

# XROUTER.CFG - Main Configuration file for XRPi / XRLin
#===================================================================
#
#       Primary Identity for AX25  NetRom.
#
NODECALL=PI1LAP-7
NODEALIAS=NDRLND
PMSALIAS=LAPBBS
PMSCALL=PI8LAP
PMSQUAL=255
PMSTYPE=4
PMSHADDR=.#ZLD.NLD.EURO
#
#
#       QTH specifies where the node is located.
#
QTH=Kortgene, JO11VN
#
#
#       Callsign for console operations.  You can set this independently
#       of NODECALL or you may set them the same.  You may at any time
#       override this callsign using the "linked as" command.
#
CONSOLECALL=PD9Q
#
#
#       Chat server callsign. This may be the same as the nodecall, but
#       must use a different SSID, preferably -8.
#
CHATCALL=PI1LAP-4
CHATALIAS=LAPCHT
CHATLINKS=+PE1NNZ-4,+PI1ZTM-2
CHATQUAL=255
CHATLOG=128
CHATPORT=3600

LOCATOR=JO11VN

IPADDRESS=44.137.31.68
DOMAIN=ampr.org
HOSTNAME=linux.pd9q.ampr.org
DNS=44.137.0.1
HTTPPORT=1080 1080
HTTPROOT=/home/pd9q/HTTP
RLOGINPORT=1013 0
POP3PORT=110 110
TELNETPORT=6023
MQTTPORT=1883
LOG=32555
CONTACT=pd9q(@)packet-radio.net
MAPCOMMENT=XRLin (XRouter for 64bit Linux) test node
#
CTFLAGS=2
SORTBYCALL=1
AGWPORT=8001

# Hamlib
RADIO=1
NAME=ICOM 7300
TYPE=6
COM=44.137.31.75:4532
ENDRADIO

CTEXT
PI1LAP-7 AX25/IP Router
Type ? for list of commands.
***
#
#
# This text is the response to the 'I' command
#
INFOTEXT
XRLin Packet Router, Kortgene, NL, JO11VN
***
#
#       This ID message is sent every IDINTERVAL.
#       Only the first line is sent.
#       If your APRS-format static position code is included, starting
#       within the first 40 characters, you will be visible on APRS maps
#       and the MHeard function will record distances to heard stations.
#       The format is (!ddmm.mmN/dddmm.mmE) where dd represents degrees
#       of latitude/longitude and mm.mm represents minutes to two decimal
#       places. "N" and "E" may be replaced by "S" and "W"
#       as appropriate.
#
#5133.52N/00348.15E
IDTEXT
!5133.52N/00348.15E PI1LAP-7 / PI8LAP
***
#
#
#
# =======================================================================
# Interface definitions - These MUST precede any port definitions
# =======================================================================
#
# Loopback interface
# Please note: This loopback is internal to XRouter only. It does NOT
# interface with Linux! It is purely for testing, and you should remove
# it once you are up and running, otherwise it WILL confuse you.
#
INTERFACE=1
        TYPE=LOOPBACK
        MTU=256
        PROTOCOL=KISS
ENDINTERFACE
#
INTERFACE=2
        ID=enp1s0
        TYPE=EXTERNAL
        PROTOCOL=ETHER
        MTU=1064
ENDINTERFACE

INTERFACE=3
         TYPE=TCP
         ID=KISSTCP Direwolf
         IOADDR=44.137.31.76
         INTNUM=8001
         PROTOCOL=KISS
         KISSOPTIONS=NONE
         MTU=1500
ENDINTERFACE

INTERFACE=4
         TYPE=TCP
         ID=KISSTCP QTSM
         IOADDR=44.137.31.75
         INTNUM=8100
         PROTOCOL=KISS
         KISSOPTIONS=NONE
         MTU=1500
ENDINTERFACE

INTERFACE=5
   ID=VARA Tests
   TYPE=VARA
   MTU=1500
   RADIONUM=1
   IOADDR=44.137.31.75
   INTNUM=8300
   CONFIG=MYCALL PI1LAP-7 PI8LAP PI1LAP-4 PI8LAP-10
   CONFIG=BW500
   CONFIG=LISTEN ON
   CONFIG=P2P SESSION

ENDINTERFACE

INTERFACE=10
        TYPE=AXUDP
        MTU=256
ENDINTERFACE
#
# =====================================================================
# Port definitions. Each one begins with PORT and ends with ENDPORT
# =====================================================================
#
# Port "attached" to interface 1
PORT=1
        ID=Loopback port
        INTERFACENUM=1
ENDPORT
#
PORT=2
        ID=Ethernet
        INTERFACENUM=2
        IPADDRESS=44.137.31.68
        NETMASK=255.255.255.224
ENDPORT

PORT=3
        ID=144.850Mhz 1k2
        INTERFACENUM=3
        CHANNEL=A
        QUALITY=203
        MINQUAL=201
        MHEARD=25
        BCAST=MAIL
        BCFROM=PI8LAP
        FREQUENCY=144850000       ; 144.925 MHz
ENDPORT

PORT=4
        ID=AFSK 850Hz IL2P+CRC
        INTERFACENUM=4
        CHANNEL=A
        MHEARD=25
        NODESINTERVAL=0
        QUALITY=0
        PACLEN=80
        RETRIES=10
        RFBAUDS=300
        BCAST=MAIL
        BCFROM=PI8LAP
        FREQUENCY=7049450
        SESSLIMIT=2
        USERS=2
        IDTEXT=!5133.52N/00348.15E PI1LAP-7 / PI8LAP
ENDPORT

PORT=5
        ID=AFSK 1000Hz
        INTERFACENUM=4
        CHANNEL=B
        MHEARD=25
        NODESINTERVAL=0
        QUALITY=0
        PACLEN=80
        RETRIES=10
        RFBAUDS=300
        BCAST=MAIL
        BCFROM=PI8LAP
        FREQUENCY=7049450
        SESSLIMIT=2
        USERS=2
        IDTEXT=!5133.52N/00348.15E PI1LAP-7 / PI8LAP
ENDPORT

PORT=6
        ID=BFSK 2150Hz IL2P+CRC
        INTERFACENUM=4
        CHANNEL=C
        MHEARD=25
        NODESINTERVAL=0
        QUALITY=0
        PACLEN=80
        RETRIES=10
        RFBAUDS=300
        BCAST=MAIL
        BCFROM=PI8LAP
        FREQUENCY=7049450
        SESSLIMIT=2
        USERS=2
        IDTEXT=!5133.52N/00348.15E PI1LAP-7 / PI8LAP
ENDPORT

PORT=7
   ID=VARA HF
   INTERFACENUM=5
   MHEARD=25
ENDPORT

PORT=8
        ID=AXUDP LINK DK0WUE-7
        INTERFACENUM=10
        IPLINK=44.149.102.81
        UDPLOCAL=10093
        UDPREMOTE=10093
        FRACK=2000
        QUALITY=203
        MINQUAL=201
        MHEARD=25
        BCAST=MAIL
        BCFROM=PI8LAP
        RESPTIME=200
        RFBAUDS=56000
ENDPORT

PORT=10
        ID=AXUDP LINK PA8F
        INTERFACENUM=10
        IPLINK=44.137.1.82
        UDPLOCAL=10093
        UDPREMOTE=10093
        FRACK=2000
        QUALITY=203
        MINQUAL=201
        MHEARD=25
        BCAST=MAIL
        BCFROM=PI8LAP
        RESPTIME=200
        RFBAUDS=56000
ENDPORT

PORT=11
        ID=AXUDP LINK GB7BED
        INTERFACENUM=10
        IPLINK=gb7bed.packetnode.net
        UDPLOCAL=10093
        UDPREMOTE=10093
        FRACK=2000
        QUALITY=203
        MINQUAL=201
        MHEARD=25
        BCAST=MAIL
        BCFROM=PI8LAP
        RESPTIME=200
        RFBAUDS=56000
ENDPORT

PORT=12
        ID=AXUDP LINK PI1ZTM
        INTERFACENUM=10
        IPLINK=44.137.2.174
        UDPLOCAL=10093
        UDPREMOTE=10093
        FRACK=2000
        QUALITY=203
        MINQUAL=201
        MHEARD=25
        BCAST=MAIL
        BCFROM=PI8LAP
        RESPTIME=200
        RFBAUDS=56000
ENDPORT

PORT=13
        ID=AXUDP LINK PE1NNZ
        INTERFACENUM=10
        IPLINK=44.137.24.150
        UDPLOCAL=10093
        UDPREMOTE=10193
        FRACK=2000
        QUALITY=203
        MINQUAL=201
        MHEARD=25
        BCAST=MAIL
        BCFROM=PI8LAP
        RESPTIME=200
        RFBAUDS=56000
ENDPORT

PORT=15
        ID=AXUDP LINK F8COD-2
        INTERFACENUM=10
        IPLINK=80.119.24.209
        UDPLOCAL=10093
        UDPREMOTE=10093
        FRACK=2000
        QUALITY=203
        MINQUAL=201
        MHEARD=25
        BCAST=MAIL
        BCFROM=PI8LAP
        RESPTIME=200
        RFBAUDS=56000
ENDPORT

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.