Watchdog

I use watchdog to monitor my RPI. Do services go offline or the RPI is not responding, watchdog kicks in and restart the system. Now I also want watchdog to watch my Linbpq. This is possible with watchdog, watchdog looks at a PID file. As far as I know, no PID file is created when starting Linbpq.

Now there is a possibility that when starting Linbpq with systemd a command can be given so that a PID file is created.

This is my linbpq.service file from systemd

pd9q@packet:~ $ sudo cat /etc/systemd/system/linbpq.service
[Unit]
Description=Linbpq Daemon
After=network.target
After=direwolf.target
StartLimitInterval=0

[Service]
Type=simple
Restart=always
RestartSec=5
ExecStartPost=/bin/sh -c "echo $MAINPID > /home/pd9q/linbpq/run/linbpq.pid"
ExecStart=/bin/bash /home/pd9q/linbpq/linbpq.start
WorkingDirectory=/home/pd9q/linbpq

[Install]
WantedBy=multi-user.target
Alias=linbpq.service

This command creates a linbpq.pid file, now it is possible that watchdog monitors linbpq.

ExecStartPost=/bin/sh -c "echo $MAINPID > /home/pd9q/linbpq/run/linbpq.pid"
pd9q@packet:~ $ sudo ls -l /home/pd9q/linbpq/run
-rw-r--r-- 1 root root 4 Oct 14 18:36 linbpq.pid
pd9q@packet:~ $

At the end of my watchdog configuration file (/etc/watchdog.conf) I have added the following line.

# Check if Linbpq is running
pidfile         = /home/pd9q/linbpq/run/linbpq.pid

Take a look at what happens when you stop Linbpq.

sudo systemctl stop linbpq.service

Yes the system is ReBoOtInG (I hoop)

Xfbb interface with Linbpq

In bpq32.cfg add

TNCPORT
COMPORT=/home/pi/fbbded
TYPE=DED
STREAMS=1
APPLMASK=4
ENDPORT

This creates a DED Host mode TNC on device /home/pi/fbbded, accessible from the LinBPQ Node as Application 3. Change APPLMASK and APPLICATION line if you already use APPL 3

APPLICATION 3,FBB,,PI1LAP,LINBBS,255

This allows uses to connect to FBB. You can add the usual Call, Alias and Quality if you want to be able to access FBB directly instead of via the Node.

Change APPLMASK and APPLICATION line if you already use APPL 3

In /usr/local/etc/ax25/fbb/port.sys#

# FBB7.0.8-beta8
#
#Ports TNCs
1 1
#
#Com Interface Adress (Hex) Baud
1 9 /home/pi/fbbded 9600
#
#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 6 1 1 250 2 1 10 00/15 DUWYL 145
#
# End of file.
#

This tells fbb to use /home/pi/fbbded as a DED Mode TNC.

Bpq32 Log options

John G8BPQ has made it possible to move the log dir of linbpq and pilinbpq. Nice

I’ve uploaded versions of linbpq and pilinbpq to my beta download site
that allow you to move the log directory. Start with a command line
parameter of logdir=directory, eg

../pilinbpq logdir=/dev/shm

 

You can download the new version here.

http://www.cantab.net/users/john.wiseman/Documents/Downloads.html

LinBPQ Applications Interface.

LinBPQ has a facility to make a tcp connection from the node to an application running on the same machine. This was originally intended to connect to a shell to enable basic configuration editing, but has been generalised to allow connects to other tcp ports, thus allowing you to write your own applications to be used with LinBPQ.

Edit
Henk, pointed out that there was something missing in this story. Nowadays we mainly work with Systemd in the newer version of Linux. So the inetd (internet super server) is no longer part of this. But you can still install it. “sudo apt-get install inetutils-inetd” or the successor to inetd the Xinetd “sudo apt-get install xinetd”
Thank you Henk…

Ok, that sounds nice. Let give it a try.

Fist setup Linbpq, add de “cmdport” to the telnet port section.

PORT
 PORTNUM=4                      ; Optional but sets port number if stated
 ID=Telnet
 DRIVER=Telnet

CONFIG
 CMS=1
 CMSCALL=PI1LAP
 CMSPASS=**********
 LOGGING=1
 DisconnectOnClose=1
 CMDPORT 63000
 TCPPORT=6309
 FBBPORT=6306
 HTTPPORT=****
 LOGINPROMPT=User:
 PASSWORDPROMPT=Password:
 MAXSESSIONS=10
 CTEXT=Welcome to PI1LAP`s Telnet Server.\nPress ? For list of commands \n\n
 USER=pd9q,pass,PD9Q,,SYSOP
ENDPORT

I have add “CMDPORT 63000” but it can by any number.

Now add a Application at the end of de bpq32.cfg

APPLICATION 7,APP,C 4 HOST 0 S

Now we have to add some stuff to /etc/services and /etc/inetd.conf

/etc/services

# Local services
bpqdemo        63000/tcp   # BPQ Demo App

/etc/inetd.conf

bpqdemo    stream    tcp    nowait    pd9q  /usr/local/linbpq/testapp.pl

Now restart inetd. sudo killall -1 inetd

I have found a small script on the internet and make some adjustments.
This script is using some perl modules that has to be installed.

cpanm Linux::SysInfo
cpanm Sys::Info
cpanm Sys::Load
cpanm Sys::MemInfo
cpanm Sys::CpuLoad

The testapp.pl script. /usr/local/linbpq/testapp.pl

#!/usr/bin/perl -w -T

# Simple information script 10/2018. PD9Q/PI1LAP

use strict;
use Sys::Info;
use Sys::Info::Constants qw( :device_cpu );
use Sys::Load qw/getload uptime/;
use Sys::MemInfo qw(totalmem freemem totalswap);
use Sys::CpuLoad;

   my $info = Sys::Info->new;
   my $cpu = $info->device('CPU');
   my $os  = $info->os;

   my $old_fh = select(STDOUT);
$| = 1;
select($old_fh);

my $line = <STDIN>;

   print "Hello " . $line . "Welcome to the LinBPQ System Info App of PI1LAP.\n";
   printf "\nWe have %s ", scalar $cpu->count;
   printf "%s-bit CPU", scalar $cpu->bitness;
   printf " %s\n", scalar $cpu->identify;
   printf "The CPU speed is: %s\n\n", scalar $cpu->speed;
   print "Operating System is\n", $os->name( long => 1 );

   print "\n\nSystem load: ", (getload())[0], "\n";
   print "System uptime: ", int uptime(), "\n\n";

   print 'load average: ',
       join(',', Sys::CpuLoad::load()), "\n\n";

   print "Total memory: ".(&totalmem / 1024)."\n";
   print "Free memory:  ".(&freemem / 1024)."\n";

   print "Total swap: ".(&totalswap / 1024)."\n";
   print "Free swap:  ".(Sys::MemInfo::get("freeswap") / 1024)."\n\n";
   print "Type exit to close\n";

while( my $line = <STDIN> )
{
    $line =~ s/\r?\n$//;
    if ($line =~ /exit/)
    {
                die "shutting down, bye,bye\n";
        }

        # do your processing here!

        print "  $line\n";
}

Now we can run the script from linbpq. Let give it a try.

root@gw:/usr/local/linbpq# telnet localhost 6309
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
User:pd9q
Password:

Welcome to PI1LAP`s Telnet Server.
Press ? For list of commands

app
Connected to APP
Hello PD9Q
Welcome to the LinBPQ System Info App of PI1LAP.

We have 1 32-bit CPU Intel(R) Pentium(R) 4 CPU 3.00GHz
The CPU speed is: 2992.432

Operating System is
Debian Linux 8.10 (kernel: 3.16.0-4-686-pae)

System load: 0.07
System uptime: 1211163

load average: 0.07,0.04,0.00

Total memory: 2062392
Free memory:  440452
Total swap: 2783228
Free swap:  2745472

Type exit to close
exit
shutting down, bye,bye
Returned to Node LAPBPQ:PI1LAP-9

http://www.cantab.net/users/john.wiseman/Documents/LinBPQ%20Applications%20Interface.html

LinBPQ with Winmor port.

With the help of the config file of Jerry, N9LYA and some help from John, G8BPQ I have setup a Winmor port on my Linbpq.I use a Microham USB II as soundcard device connected to my Windows PC and a direct Cat kabel from my Linux PC to control the TRX.

Here is the section for the Winmor port. (BPQ32.CFG)

PORT
 PORTNUM=2
 ID=HF WINMOR
 TYPE=EXTERNAL
 PROTOCOL=WINMOR
 DLLNAME=WINMOR.DLL
; INTERLOCK=6
 QUALITY=0

CONFIG

ADDR 192.168.1.145 18500 PTT CAT PATH REMOTE:C:\WINMOR\WINMOR TNC.EXE
RIGCONTROL
/dev/ttyUSB0 4800 Yaesu FT100
7,7.050,USB,W2
7,14.110,USB,W2
****
WL2KREPORT PUBLIC, api.winlink.org, 80, PI1LAP-10, JO11VN, 00-23, 7051500, WINMOR1600, 25, 50, 0, 360
WL2KREPORT PUBLIC, api.winlink.org, 80, PI1LAP-10, JO11VN, 00-23, 14111500, WINMOR1600, 25, 50, 0,360
WL2KREPORT PUBLIC, api.winlink.org, 80, PI1LAP-10, JO11VN, 00-23, 430950000, PKT9600, 10, 60, 9, 0
WL2KREPORT PUBLIC, api.winlink.org, 80, PI1lAP-10, JO11VN, 00-23, 144850000, PKT1200, 10, 60, 9, 0
CWID TRUE
DEBUGLOG True
BW 1600
DRIVELEVEL 100
MODE AUTO
ROBUST False
SHOW True
BUSYLOCK False
BUSYHOLD 5
BUSYWAIT 12

ENDPORT

WINMOR TNC.ini

[WINMOR TNC Form]
ResponseDelay=300
LeaderExtension=0
Disable=False
Waterfall=True
Spectrum=False
Top=22
Left=22
MyCallsign=PI1LAP-10
Registration=
TCP Control Port=8500
MyGridsquare=JO11VN
StartMinimized=False
DebugLog=True
CommandTrace=False
CaptureDevice=Lijningang (High Definition Audio-apparaat)-61
PlaybackDevice=Luidsprekers (High Definition Audio-apparaat)-e9
TCP Address=192.168.1.145

Winmor Status screen from Linbpq

Winmor

Tnx for the help Jerry and John.

DireWolf/Linpq with Systemd.

I have a bad time behind me, I have had a lot of arguments with Systemd to start DireWolf and Linpq when booting 🙂
If you like Systemd, you can read some about it here https://en.wikipedia.org/wiki/Systemd

I want Linbpq to run under /dev/tty2 and DireWolf under /dev/tty3. This is because if I login remotely I can view the monitor from DireWolf with “conspy”. “conspy 3” Hit esc a few times to leave conspy.

Systemd does not want to accept the start line with >/dev/tty3 &

ExecStart=/usr/local/bin/direwolf -c /home/pd9q/direwolf.conf -l /home/pd9q/direwolf.log >/dev/tty3

This upper start line does not work.

So I had to come up with something else for that. So i wrote a start file. “direwolf.start”

cd /usr/local/bin
./direwolf -c /home/pd9q/direwolf.conf -l /home/pd9q/direwolf.log >/dev/tty3

Now i wrote a unit file to start DireWolf on boot.
/etc/systemd/system/direwolf.service

[Unit]
Description=DireWolf Deamon
After=network.target
After=sound.target
After=syslog.target

[Service]
Type=simple
ExecStart=/bin/bash /home/pd9q/linbpq/direwolf.start

[Install]
WantedBy=multi-user.target
Alias=direwolf.service

Now DireWolf is starting very nice on /dev/tty3

pd9q@packet:~ $ systemctl status direwolf.service
● direwolf.service - DireWolf Deamon
   Loaded: loaded (/lib/systemd/system/direwolf.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2018-09-12 10:58:51 UTC; 1h 18min ago
 Main PID: 463 (bash)
   CGroup: /system.slice/direwolf.service
           ├─463 /bin/bash /home/pd9q/linbpq/direwolf.start
           └─474 ./direwolf -c /home/pd9q/direwolf.conf -l /home/pd9q/direwolf.log

Sep 12 10:58:51 packet systemd[1]: Started DireWolf Deamon.
pd9q@packet:~ $

I had the same problem with Linbpq, which I solved in the same way.

Linbpq start file “runbpq”

cd /home/pd9q/linbpq
sudo ./linbpq  >/dev/tty2

The unit file “linbpq.service”

[Unit]
Description=Linbpq Daemon
After=network.target
After=direwolf.target
StartLimitInterval=0

[Service]
Type=simple
Restart=always
RestartSec=5
ExecStart=/bin/bash /home/pd9q/linbpq/runbpq
WorkingDirectory=/home/pd9q/linbpq

[Install]
WantedBy=multi-user.target
Alias=linbpq.service

Ok, let’s see if it is running

pd9q@packet:~ $ systemctl status linbpq.service
● linbpq.service - Linbpq Daemon
   Loaded: loaded (/lib/systemd/system/linbpq.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2018-09-12 10:58:51 UTC; 1h 23min ago
 Main PID: 464 (bash)
   CGroup: /system.slice/linbpq.service
           ├─464 /bin/bash /home/pd9q/linbpq/runbpq
           ├─473 sudo ./linbpq
           └─501 ./linbpq

Sep 12 12:13:36 packet LINBPQ[501]: BPQ32 Heartbeat Buffers 102
Sep 12 12:14:31 packet LINBPQ[501]: BPQ32 Heartbeat Buffers 99
Sep 12 12:15:27 packet LINBPQ[501]: BPQ32 Heartbeat Buffers 102
Sep 12 12:16:22 packet LINBPQ[501]: BPQ32 Heartbeat Buffers 102
Sep 12 12:17:17 packet LINBPQ[501]: BPQ32 Heartbeat Buffers 102
Sep 12 12:18:12 packet LINBPQ[501]: BPQ32 Heartbeat Buffers 100
Sep 12 12:19:07 packet LINBPQ[501]: BPQ32 Heartbeat Buffers 102
Sep 12 12:20:03 packet LINBPQ[501]: BPQ32 Heartbeat Buffers 102
Sep 12 12:20:58 packet LINBPQ[501]: BPQ32 Heartbeat Buffers 102
Sep 12 12:21:53 packet LINBPQ[501]: BPQ32 Heartbeat Buffers 102
pd9q@packet:~ $

Now have a look at /dev/tty2 “conspy 2”

G8BPQ AX25 Packet Switch System Version 6.0.16.30 July 2018
Copyright ▒ 2001-2018 John Wiseman G8BPQ
Current Directory is /home/pd9q/linbpq

Configuration file Preprocessor.
Using Configuration file /home/pd9q/linbpq/bpq32.cfg
Conversion (probably) successful

PORTS 1d9784 LINKS 1dce14 DESTS 1dfc58 ROUTES 1f9c58 L4 1fd058 BUFFERS 22f170

Initialising Port 01     TCPKISS IP 127.0.0.1 Port 8001 Chan A
Initialising Port 02     AXIP
Initialising Port 03     Telnet Server
Initialising Port 04     Loopback

 

SCS Tracker TNC and new BPQ32 Node

Sample config file based on a system off John, kx4o.

-------------------------------
LOCATOR=FM18
NODECALL=W4VPN
NODEALIAS=VAPN

IDMSG:    ; UI broadcast text from NODECALL to fixed dest ID
This is the IDMSG text.
***        ; Denotes end of IDMSG text

BTEXT:    ; UI broadcast text from BCALL to destination UNPROTO=
This is the BTEXT text.
***        ; Denotes end of BTEXT text

INFOMSG:    ; The INFO command text follows:
This is the INFOMSG text.
***        ; Denotes end of INFOMSG text

CTEXT:    ; The CTEXT text follows:
Minimal VAPN BPQ32 installation successful.
VAPN:W4VPN} CONNECT BYE INFO NODES ROUTES PORTS USERS MHEARD
***        ; Denotes end of CTEXT text

FULL_CTEXT=0    ; 0=send CTEXT to L2 connects to NODEALIAS only
                    ; 1=send CTEXT to all connectees

; Network System Parameters:
OBSINIT=6        ; Initial obsolescence set when a node is included
                    ; in a received nodes broadcast. This value is then
                    ; decremented by 1 every NODESINTERVAL.
OBSMIN=4            ; When the obsolescence of a node falls below this
                    ; value that node`s information is not included in
                    ; a subsequent nodes broadcast.
NODESINTERVAL=60    ; Nodes broadcast interval in minutes
IDINTERVAL=0        ; 'IDMSG' UI broadcast interval in minutes, 0=OFF
BTINTERVAL=0        ; The BTEXT broadcast interval in minutes, 0=OFF
L3TIMETOLIVE=25    ; Max L3 hops
L4RETRIES=3            ; Level 4 retry count
L4TIMEOUT=60        ; Level 4 timeout in seconds s/b > FRACK x RETRIES
L4DELAY=10            ; Level 4 delayed ack timer in seconds
L4WINDOW=4            ; Level 4 window size
MAXLINKS=63            ; Max level 2 links
MAXNODES=512        ; Max nodes in nodes table
MAXROUTES=64        ; Max adjacent nodes
MAXCIRCUITS=128    ; Max L4 circuits
MINQUAL=168            ; Minimum quality to add to nodes table
; INP3 Routing is experimental.  The two parms which follow will be ignored
; unless activated in the ROUTES: section.
MAXHOPS=4            ; INP3 hop limit to add to tables
MAXRTT=90            ; INP3 max RTT in seconds
;BUFFERS=255        ; This parameter is no longer used in the Win32 version.
                    ; BPQ32 allocates an adequate number automatically.
                    ; I have the line commented out just to remind me it`s gone!!
                    
; TNC default parameters:
PACLEN=127        ; Max packet size (236 max for net/rom)
                    ; 236 is suitable for reliable and fast connections, such
                    ; as AX/IP/UDP or a dedicated 9600 RF Link
                    ; 120 is suitable for a typical shared VHF packet radio connection
                    ; PACLEN is defined for each port individually in the ports sections
TRANSDELAY=1    ; Transparent node send delay in seconds

; Level 2 Parameters:
; T1 (FRACK), T2 (RESPTIME) and N2 (RETRIES) are now in the PORTS section
T3=120            ; Link validation timer in seconds
IDLETIME=720    ; Idle link shutdown timer in seconds

; Configuration Options:
AUTOSAVE=1        ; Saves BPQNODES.dat upon program exit
BBS=1                ; 1 = BBS support included, 0 = No BBS support
NODE=1           ; Include switch support
HIDENODES=1        ; If set to 1, nodes beginning with a #
                    ; require a 'N *' command to be displayed.
/*
The *** LINKED command is intended for use by gateway software, and concern
has been expressed that it could be misused. It is recommended that it be
disabled (=N) if unneeded.
*/
ENABLE_LINKED=N    ; Controls processing of *** LINKED command
                    ; Y = allows unrestricted use
                    ; A = allows use by application program
                    ; N = disabled
/*
AX25 port definitions:
The LOOPBACK port simulates a connection by looping input to output. To test,
start BPQTerminal and enter: 'C 1 MYNODE via MYCALL'
In this example '1' is the LOOPBACK port number. The LOOPBACK port is provided
for testing purposes and would rarely be included in an established system.
*/
; LOOPPACK Port Specification
#PORT
# PORTNUM=1            ; Optonal but sets port number if stated
# ID=LOOPBACK        ; Defines the Loopback port name
# TYPE=INTERNAL        ; Loopback is an internal type
#ENDPORT

; SCS Tracker Port Specification
PORT
    PORTNUM=1
    ID=HF 30m Port
    COMPORT=/dev/tnc-30m;        COM Port Address
    SPEED=38400;       COM Port Speed
    DRIVER=TRKMULTI

    QUALITY=0          ;Setting to 0 stops node broadcasts on this port
    MINQUAL=168

    MHEARD=N
    ;MAXFRAME=2         ;Max outstanding frames (1 thru 7)
    ;RESPTIME=1000      ;Level 2 delayed ack timer in milliseconds
    ;RETRIES=2          ;Level 2 maximum retry value
    PACLEN=200          ;Max = 236 if using NETROM links
    ;TXDELAY=500        ;Pretty quick TX/RX radio
    ;TXTAIL=300         ;

    CONFIG             ; Driver-Specific Configuration
    ;DEBUGLOG 1
    PACKETCHANNELS 5   ; Limit to 5 simultaneous connections
    R 0                ; Digipeating OFF
    F 600              ; T1 - FRACK: in 10mS steps.
    @T2 0              ; T2 - RESPDELAYTIME: in 10mS steps.
    @T3 30000          ; T3 - Sign of life timer in 10mS steps
    N 10               ; RETRY: Setting to 10
    O 7                ; MAXFRAME
    T 25               ; TXDELAY: Setting to 1/4 second (25 * 10ms)
    P 32               ; PERSISTENCE (p) (default 32 of 255)
    W 10               ; Slottime in milliconds (default 10)
    %N 0               ; TXTAIL - in 10ms increments.
    ; Comment out the desired speed.
    %B R300            ; 1200 is the poweron default, so setting to R300
    ;
    ;%F 1700            ; For HFPacket only and should only be used if not using 1700 default.
    %L 1500             ; For RPR only. Lately required since this doesn`t always default to 1500.
    ;%XA 880            ; Set 300/1200 output amplitude to 3 kHz Peak deviation per measurement.
    ;%XF 1600           ; Set 9600/19k2 output amplitude to 400 mV PP per ID-880H manual.
    %XR 900           ; Set RPR output amplitude in mV for TS-480 Menu #40 = 1.
    ;%XR 200           ; Set RPR output amplitude in mV for TS-480 Menu #40 = 4.
ENDPORT

; SCS Tracker Port Specification
PORT
    PORTNUM=2
    ID=VHF 2m Port
    COMPORT=/dev/tnc-02m;        COM Port Address
    SPEED=38400;       COM Port Speed
    DRIVER=TRKMULTI

    QUALITY=0          ;Setting to 0 stops node broadcasts on this port
    MINQUAL=168

    MHEARD=N
    ;MAXFRAME=2         ;Max outstanding frames (1 thru 7)
    ;RESPTIME=1000      ;Level 2 delayed ack timer in milliseconds
    ;RETRIES=2          ;Level 2 maximum retry value
    PACLEN=128         ;Max = 236 if using NETROM links
    ;TXDELAY=500        ;Pretty quick TX/RX radio
    ;TXTAIL=300         ;

    CONFIG             ; Driver-Specific Configuration
    ;DEBUGLOG 1
    PACKETCHANNELS 5   ; Limit to 5 simultaneous connections
    R 0                ; Digipeating OFF
    F 500              ; T1 - FRACK: in 10mS steps.
    @T2 0              ; T2 - RESPDELAYTIME: in 10mS steps.
    @T3 18000          ; T3 - Sign of life timer in 10mS steps
    N 10               ; RETRY: Setting to 10
    O 7                ; MAXFRAME: Setting to 7
    T 50               ; TXDELAY: Setting to 1/2 second (50 * 10ms)
    P 32               ; Persistence (p) (default 32)
    W 10               ; Slottime in milliconds (default 10)
    %N 0               ; TXTAIL - in 10ms increments.
    ; Comment out the desired speed.
    %B 1200            ; 1200 is the poweron default, but setting it anyway.
    ;%B 9600            ; 9600 
    ;
    %F 2000            ; I assume this has no effect on 1200 mode, but setting anyway..
    %XA 880            ; Set 300/1200 output amplitude to 3 kHz Peak deviation per measurement.
    %XF 1600           ; Set 9600/19k2 output amplitude to 400 mV PP per ID-880H manual.
    %E 2               ; Set lower tone in 1200 mode (fw 1.5s) to 1/2 voltage 6 dB down from high.
ENDPORT

;; Test of KISS
;PORT
; PORTNUM=2            ; Optional but sets port number if stated
; ID=BPQ 145.030 MHz    ; Displayed by PORTS command
; TYPE=ASYNC            ; Port is RS232
`; PROTOCOL=KISS        ; TNC is used in KISS or JKISS mode
;; The KISSOPTIONS statement should not be included for KISS or JKISS tnc`s.
;; See ..\RelatedFiles\KissRoms\KissRoms.zip for details.
;; KISSOPTIONS=CHECKSUM,ACKMODE    ; Using BPQKISS eprom w/o polling
; FULLDUP=0            ; Only meaningful for KISS devices
; ;IOADDR=1            ; 1 = SERIAL PORT COM1 ETC.
; COMPORT=/dev/ttyUSB0;        COM Port Address
; SPEED=38400;       COM Port Speed
; CHANNEL=A            ; A for single channel TNC, A or B for multichannel
; PERSIST=64            ; PERSIST=256/(# of transmitters-1)
; SLOTTIME=100        ; CMSA interval timer in milliseconds
; TXDELAY=300        ; Transmit keyup delay in milliseconds
; TXTAIL=30            ; TX key down, in milliseconds, at packet end
; QUALITY=192        ; Quality factor applied to node broadcasts heard on
;                    ; this port, unless overridden by a locked route
;                    ; entry. Setting to 0 stops node broadcasts
; MINQUAL=168        ; Entries in the nodes table with qualities greater or
;                    ; equal to MINQUAL will be sent on this port. A value
;                    ; of 0 sends everything.
; FRACK=8000            ; Level 2 timout in milliseconds
; RESPTIME=1500        ; Level 2 delayed ack timer in milliseconds
; RETRIES=10            ; Level 2 maximum retry value
; MAXFRAME=2            ; Max outstanding frames (1 thru 7)
; PACLEN=120            ; Default max packet length for this port.
;                    ; PACLEN is ignored for APRS packets
; UNPROTO=APBQ1        ; BTEXT broadcast addrs format: DEST[,digi1[,digi2]]
; ;BCALL=A1ABC-14        ; BTEXT call. Unstated defaults to NODECALL
; L3ONLY=0            ; 1=No user downlink connects on this port
; DIGIFLAG=0            ; Digipeat: 0=OFF, 1=ALL, 255=UI Only
; DIGIPORT=0            ; Port on which to send digi`d frames (0 = same port)
; USERS=0            ; Maximum number of L2 sessions, 0 = no limit
;ENDPORT


PORT
    PORTNUM=3
    ID=Telnet Server
    DRIVER=Telnet
    CONFIG
    LOGGING=1
    DisconnectOnClose=1
    TCPPORT=8010
    FBBPORT=8015
    HTTPPORT=8080
    LOGINPROMPT=user:
    PASSWORDPROMPT=password:
    MAXSESSIONS=10

    CMS=1
    CMSCALL=CMSCALL   ; CMS Access Callsign (with SSID if used)
    CMSPASS=CMSPASSWD ; Secure CMS Password
   
    CTEXT=Welcome to W4VPN's Telnet Server\nEnter ? for list of commands\n\n
    USER=John,somepass1,KX4O,"",SYSOP
    USER=Mark,somepass2,KD6AKC,"",SYSOP
    USER=Logan,somepass3,KJ4FAJ
    USER=JohnBBS,somepass4,kx4o,BBS
    USER=ANON,somepass5
ENDPORT

LINMAIL
LINCHAT

APPLICATION 1,BBS,,W4VPN-2,VPNBBS,255
APPLICATION 2,CHAT,,W4VPN-3,VPNCHT,255
APPLICATION 3,CMS,C 3 CMS,CMSCALL,BPQCMS,255
-------------------------------

Jeff have made some comments about it.

On HF I`d recommend starting with a maxframe other than 7.
With the Tracker`s intelligence I found it best to start 
connections on HF with a conservative value of maxframe = 1 then 
let the modem ramp things up if band/link conditions support it. 
Also suggest keeping a few hundred ms of @T2 in there to help slower radios.

Obviously VHF/UIHF is a different story, but suggest load testing 
different values and being careful if you`re going to have users with the 
Tasco (D72, D74, D700, D710 or KISS mode TNCs with no/minimal buffering connecting in. 
Be sure to test with transfers both ways and large enough 
(at least 7-8kb on the link) to bring buffering issues to light or nasty surprises may lurk.


73
Jeff
WA4ZKO

 

Direwolf to LinBPQ config

John WQ6N has found a solution for direwolf and Linbpq that works very well for HF.

Direwolf.conf

/etc/direwolf/direwolf.conf
ADEVICE plughw:1,0
ACHANNELS 1
CHANNEL 0
MODEM 300 2130:2230 D
SERIALKISS /dev/ptyp0 19200
KISSPORT 0
DWAIT 0
SLOTTIME 12
PERSIST 63
TXDELAY 40
TXTAIL 10
FIX_BITS 1 AX25
LOGDIR /var/log/direwolf

bpq32.cfg

/linbpq/bpq32.cfg (HFGW Port)
PORT
PORTNUM=XX                       ; Optional but sets port number if stated
ID=BPQ HFGW                     ; Displayed by PORTS command
TYPE=ASYNC                       ; Port is RS232 Com
PROTOCOL=KISS           ; TNC is used in KISS, JKISS or BPQKISS mode
FULLDUP=0                        ; Only meaningful for KISS, JKISS or BPQKISS devices
COMPORT=/dev/ttyp0
SPEED=19200                      ; RS232 COM PORT SPEED
CHANNEL=A                        ; A for single channel TNC, A or B for multichannel
NOKEEPALIVES=1
PERSIST=63                       ; PERSIST=256/(# of transmitters-1)
SLOTTIME=120            ; CMSA interval timer in milliseconds
TXDELAY=300             ; Transmit keyup delay in milliseconds
TXTAIL=100                       ; TX key down, in milliseconds, at packet end
QUALITY=0               ; Quality factor applied to node broadcasts heard on
MINQUAL=0               ; Entries in the nodes table with qualities greater or
MAXFRAME=1                       ; Max outstanding frames (1 thru 7)
FRACK=5000                       ; Level 2 timout in milliseconds
RESPTIME=1000           ; Level 2 delayed ack timer in milliseconds
RETRIES=15                       ; Level 2 maximum retry value
PACLEN=60                        ; Default max packet length for this port
UNPROTO=<URNODE>             ; BTEXT broadcast addrs format: DEST[,digi1[,digi2]]
BCALL=<URCALL-SSID>            ; BTEXT call. unstated defaults to APPL1CALL
L3ONLY=0                         ; 1=No user downlink connects on this port
DIGIFLAG=0                       ; Digipeat: 0=OFF, 1=ALL, 255=UI Only
DIGIPORT=0                       ; Port on which to send digi'd frames (0 = same port)
USERS=0                 ; Maximum number of L2 sessions, 0 = no limit
ENDPORT
journalctl -o cat -af -u direwolf
Opened /dev/ptyp0 for serial port KISS.
KISS protocol set TXDELAY = 30 (*10mS units = 300 mS), port 0
KISS protocol set Persistence = 63, port 0
KISS protocol set SlotTime = 12 (*10mS units = 120 mS), port 0
KISS protocol set TXtail = 10 (*10mS units = 100 mS), port 0
KISS protocol set FullDuplex = 0, port 0

 

Bind bpq to ax25 interface

I’m using uronode as front end node, but i’m also like to connect to different packet software.
This time it’s linbpq. Lets go…..

First of all bpq32.cfg
Change the comport to COMPORT=/dev

PORT
 PORTNUM=1
 ID=Link Local
 TYPE=ASYNC
 PROTOCOL=KISS
 FULLDUP=0
 COMPORT=/dev
 SPEED=19200
 CHANNEL=A
 NOKEEPALIVES=0
 PERSIST=160
 SLOTTIME=180
 TXDELAY=180
 TXTAIL=23
 QUALITY=192
 MINQUAL=100
 MAXFRAME=4
 FRACK=5000
 RESPTIME=1000
 RETRIES=25
 PACLEN=128
 UNPROTO=APBPQ1,PI1LAP-5
 BCALL=PI1LAP-9
 L3ONLY=0
 DIGIFLAG=1
 DIGIPORT=0
 USERS=0
ENDPORT

Axports

root@gw:/usr/local/linbpq# cat /etc/ax25/axports
ax1     PI1LAP-9        19200   256     2       Linbpq pi1lap-9

Now the linbpq start file

setcap "CAP_NET_ADMIN=ep CAP_NET_RAW=ep CAP_NET_BIND_SERVICE=ep" linbpq

# Link local pi1lap-9
        echo "Starting ax1 "
        if grep ax1 /etc/ax25/axports ; then
        tmpfile="/tmp/$.startax5.pts"
        kissnetd -p 2 > "$tmpfile" &
        sleep 2
        attachthem () {
                read PTS1 PTS2
                kissattach -l $PTS1 ax1 44.137.31.73 || return=$rc_failed
                ifconfig ax1 44.137.31.73 netmask 255.255.255.224 up
                sleep 1
                sed -i "s,COMPORT=/dev/.*$,COMPORT=$PTS2," /usr/local/linbpq/bpq32.cfg
        }

        tail -n 1 $tmpfile | attachthem
        rm $tmpfile
        sleep 3
        else
               echo  "Error ax1 not found in the file axports"
                return="Failed"
        fi
        echo "$1 $return"

cd /usr/local/linbpq
sudo ./linbpq  >/dev/tty4

Ok let’s look it ok now

ps ax | grep kissattach

root@gw:/usr/local/linbpq# ps ax | grep kissattach
 5910 ?        S      0:00 kissattach -l /dev/pts/16 ax1 44.137.31.73
 6504 pts/19   S+     0:00 grep kissattach

Now have a look in bpq32.cfg

root@gw:/usr/local/linbpq# grep COMPORT=/dev bpq32.cfg
 COMPORT=/dev/pts/17

Here you see there is a PTS couple /dev/pts/16 and /dev/pts/17

So we are good to go.

pd2lt@uro.pd2lt.ampr.org-IPv6: r
Routes:
Link Intface Callsign  Qual Nodes Lock  QSO
---- ------- --------- ---- ----- ----  ---
>    ax1     PI1LAP-9   203     2         0

The route to pi1lap-9 is there in uronode. Let’s try a connect.

pd2lt@uro.pd2lt.ampr.org-IPv6: c pi1lap-9
Trying LAPBPQ:PI1LAP-9... <Enter> aborts.
Virtual circuit established to LAPBPQ:PI1LAP-9
Connected to PI1LAP-9.
Packet/Switch Node, Kortgene JO11VN

LAPBPQ:PI1LAP-9} BBS,URO,FPAC,APP,RMS,DX,JNOS,CHAT,C,B,I,N,R,P,U,V,S,MH
l
LAPBPQ:PI1LAP-9} Links
PI1LAP-5 PI1LAP-9 S=5 P=1 T=3 V=2

😉

Examples forward JNOS/BPQ/LinFBB

Here below some examples how the configuration of the forward in different systems works.

Thanks in particular to Bob (VE3TOK) and Gus (I0OJJ) for example configs !

Copyright ©  http://www.langelaar.net/jnos2/

Example Configuration for JNOS 2.0k side
   ----------------------------------------

      a) autoexec.nos

         # regular listener (no IAC) for remote JNOS and BPQ systems
         start telnet

         # another listener (IAC) on different port for LINFBB and OBCM systems
         start telnet 6300 iac

         # for winlink secure login, you have to configure your callsign
         mbox winlinkcall ve4klm

      b) spool/forward.bbs

         -------
         ve3tok
         # Here we are talking to a remote LINFBB system
         telnet 44.x.y.z 6300 iac
         +Callsign :
         .ve4klm
         +Password :
         .BLAHBLAHBLAH
         ve3tok
         -------
         va3tok
         # Here we are talking to a remote BPQ system
         telnet 44.x.y.z 8011 cronly
         .ve4klm
         .BLAHBLAHBLAH
         +BPQ
         .BPQBBS
         va3tok
         -------
         wl2k
         # Here we are talking to Winlink CMS server
         telnet winlink.org 8772 cronly
         +Callsign :
         ..VE4KLM
         +Password :
         .BLAHBLAH
         wl2k
         -------
         i0ojj 0023 P
         # Here we are talking to obcm v1.07b12
         # NOTE : OBCM supports FC proposal, so it will use B2F, but wonder if
         # I should force a B1F response so RLINE and Headers work properly ?
         telnet 44.x.y.z 4719 iac
         @10
         +login:
         .ve4klm
         @10
         +password:
         .BLAHBLAH
         @10
         <areas to forward>
         -------
         ir0aab 0023 P
         # Here we are talking to linfbb v7.0.8-beta2
         telnet 44.x.y.z 6300 iac
         @
         +Callsign :
         .ve4klm
         +Password :
         .BLAHBLAH
         @
         <areas to forward>
         -------

      c) setting up MY winlink authentication

         cd /jnos

         mkdir users		* you only need to do this one time

         ./jnospwmgr -a <callsign> -w

         it will ask you to enter the phrase that you would have received
         from your winlink notice (the challenge/response phrase).         

       * for now please read release notes (search December 8) for more info.

   Remote LINFBB host
   ------------------

     For forwarding to VE4KLM I added the following line to 'bbs.sys' :

       < FWD\VE4KLM

     A forward file for that particular bbs is placed in FBB's 'fwd' directory,
     so an example of forward file, 've4klm' (contents might be different for
     other FBB owners.)

       A VE4KLM

         P A
         C C ve4klm ve4klm.ampr.org 6300
         V login$Wpassword$W

       #  Forward file -- To VE4KLM BBS (JNOS)
       #
       #  Personal mail
       #
       B VE4KLM
       F VE4KLM
       #
       # Reverse fowarding to take place
       R
       # Forward rest of North-America to VE4KLM
       H  VE4KLM.#WPG.MB.CAN.NOAM
       H *.NOAM
       #

   Remote BPQ host
   ---------------

     This is needed as telnet connect script for bpq in forwarding with jnos.
     It is entered in the "connect script" box of the forwarding config web
     page of the bpq mail server.

       TIMES 0000-2359
       Idletime 60
       attach 3
       c ve4klm.ampr.org 23 NEEDLF .login pass

     General:

       attach p - p is a port number cfg'd as telnet port in your bpq32.cfg

       c Hostname TCPport [NEEDLF] User Password [Command]

     Here :

       attached 3 - I configured port 3 as telnet port
       NEEDLF     - Causes a Line Feed to be sent after user and password.
       .login     - The period before the login user name will tell jnos to use
                    a transparent TCP session instead of ordinary telnet.

     See: http://www.cantab.net/users/john.wiseman/Documents/TelnetServer.htm

     This example line below is needed in bpq32.cfg so that jnos can login into
     bpq and initiate forwarding as bbs.
 
       USER=ve4klm,password,login,BBS

   Remote OBCM host
   ----------------

     ; From obcm v1.07b12
     ;
     ; INIT IR0RM file (JNOS-2.0k+)
     ;          0                  1                  2
     ;          012345678901234567890123
     IR0RM PPPPPPPPPPPPPPPPPPPPPPPP TELNET:44.x.y.z:6300
      -d -k -l -o -u
     ;

   Remote LINFBB host
   ------------------

     # From linfbb v7.0.8-beta2
     #
     IF H 00-23
      S connected failure busy
      C C IR0RM-1 44.x.y.z 6300
      V i0ojj$Wpassword$W
     ENDIF
     #