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()

Bpq32 with QtSoundModem and Hamlib

Yesterday I added 2 HF ports to my Bpq32 Node / BBS. I have chosen to use QtSoundModem and Hamlib. QtSoundModem is a Linux port or Soundmodem from UZ7HO. I use Hamlib/rigctld to take control of the Tranceiver. QtSoundmodem and Hamlib run on a different Raspberry than the BBS and Node.

After some testing I found out that I need Hamlib version 3.3 to control the icom 7300. The versions 4.0 and 4.1 do not work for me. Apparently the icom 7300 is not being initialized. Can’t actually find out why this is. With the command “rigctld -l” you get a list of which tranceivers are supported.

So I need number 373 for the Icom 7300.

/usr/local/bin/rigctld -m 373 -r /dev/ttyUSB0 -s 19200 -T 44.137.31.76 -t 4532 &

In the QtSoundModem.ini I have in the [Init] section.

HamLibHost=44.137.31.76
HamLibPort=4532
PTT=HAMLIB
PTTBAUD=19200
PTTMode=17

Now the bpq32.cfg

PORT
 PORTNUM=4
 ID=14.1022 +1100Hz
 DRIVER=UZ7HO
 CHANNEL=A
 PACLEN=80
 CONFIG
  ADDR 44.137.31.76 8101 ; AGW port of QtSoundModem
  BEACONAFTERSESSION
  MAXSESSIONS=5
ENDPORT

PORT
 PORTNUM=5
 ID=14.1022 +2000Hz
 DRIVER=UZ7HO
 CHANNEL=B
 PACLEN=80
 CONFIG
  ADDR 44.137.31.76 8101 ; AGW port of QtSoundModem
  BEACONAFTERSESSION
  MAXSESSIONS=5
ENDPORT

With Hamlib it is also possible to control the TRX from Bpq32. I immediately added a Robust 300 packet port to Bpq32 with rig control. Here is an example.

PORT
 PORTNUM=3
 ID=Robust 300 ;(RPR Packet)
 TYPE=EXTERNAL 
 COMPORT=/dev/ttyUSB0
 SPEED=38400
 DRIVER=SCSTracker
 INTERLOCK=3
 CONFIG
 RIGCONTROL
HAMLIB 44.137.31.76:4532
15,14.1022,USB,F1,R1,H1
15,7.04510,USB,F1,R1,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

/var/log/syslog

Apr  4 16:34:41 pi1lap : Initialising Port 01     TCPKISS IP 127.0.0.1 Port 8001 Chan A
Apr  4 16:34:41 pi1lap : Initialising Port 02     TCPKISS IP 127.0.0.1 Port 8001 Chan B
Apr  4 16:34:41 pi1lap : Initialising Port 03     SCSTRK /dev/ttyUSB0
Apr  4 16:34:41 pi1lap : Initialising Port 04     UZ7HO Host 44.137.31.76 Port 8101 Chan A
Apr  4 16:34:41 pi1lap : Initialising Port 05     UZ7HO Host 44.137.31.76 Port 8101 Chan B
Apr  4 16:34:41 pi1lap : Initialising Port 06     ASYNC /dev/ttyUSB1 Chan A

 

Aprs Weather Beacon

Today I’ve been messing around with an APRS weather beacon. Now Direwolf and Linbpq and Jnos can send an aprs weather beacon. It turns out that this is quite precise, with the format of the beacon.

#!/bin/bash
# The weather beacon have to look like this....
# @220424z5057.81N/00729.37E_094/002g005t043r000p006P006h89b09783
# !5133.52N/00348.15E_073/013g...t048h85b10040wWXD
#
# Jun 01 2003 08:07
# 272/000g006t069r010p030P020h61b10150
# ***********************************************************
# 272 - wind direction - 272 degrees
# 010 - wind speed - 10 mph
# g015 - wind gust - 15 mph
# t069 - temperature - 69 degrees F
# r010 - rain in last hour in hundredths of an inch - 0.1 inches
# p030 - rain in last 24 hours in hundredths of an inch - 0.3 inches
# P020 - rain since midnight in hundredths of an inch - 0.2 inches
# h61 - humidity 61% (00 = 100%)
# b10153 - barometric pressure in tenths of a MILLIBAR - 1015.3 MILLIBARS

My weather station uploads its data to wunderground.com. Now wunderground has the option to read this again with an api key.

https://api.weather.com/v2/pws/observations/current?stationId=IKORTG9&format=json&units=m&apiKey=yourApiKey

You can read here how and what.

After a lot of messing around with a bash script, I am able to create the correct format.

TEMP=-4.9°C Temperature degrees Celsius
WPK=29.4km/h Wind speed in Kilometers per hour
WGK=39km/h Wind guts in Kilometers per hour
GRD=58° Wind direction in degrees
RAIN=0mm Rain in the last hour in mm
RAIN24=0.42065mm Rain in the last 24 hour in mm
RAIN12=0.214mm Rain in the last 12 hour in mm
HUM=74% Humidity in procent
Bar=1004mb Barometric pressure in millibars
FAH=023F Temperature degrees Fahrenheit
WPM=018mph Wind speed in miles per hour
WGM=024mph Wind guts in miles per hour
RNI=000inch Rain in the last hour in inches
RNI=001inch Rain in the last 24 hour in inches
RNI=000inch Rain in the last 12 hour in inches

The file I need to broadcast an APRS Weahter Beacon looks like this.

pd9q@pancake:~/linbpq/wx-project $ cat ~/linbpq/current.txt
Feb 09 2021 13:00
086/004g008t028r000p000P000h75b10007

The config file for Linbpq looks like this, this is in the aprs section of bpq32.cfg

WXCall=PD9Q-7
WXFileName=/home/pd9q/linbpq/current.txt
WXComment=/Weather Station JO11VN
WXPortList=1,5,IS        ; comma separated list 
WXInterval=10            ; mins

For Jnos in the autoexec.nos in the aprs section

aprs wx call PD9Q-7
aprs wx stat "Weather Station JO11VN"
aprs wx pos "5133.52N/00348.15E_METEO
aprs wx data "/home/pd9q/jnos/wx/current.txt"
aprs bc rftimer 10

For direwolf in the file direwolf.conf

PBEACON LAT=51^33.52N LONG=03^48.15E SYMBOL=”weather station” COMMENTCMD=”tail -1 /home/pd9q/linbpq/current.txt”

Direwolf Aprs packet look like this.

PD9Q-7>APDW15:!5133.52N/00348.15E_069/005g006t028r000p000P000h75b10007

BPQ32 Aprs packet look like this.

PD9Q-7>APBPQ1,WIDE1-1:@091338z5133.52N/00348.15E_069/005g006t028r000p000P00
0h75b10007/Weather Station JO11VN

Learned a lot.

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.

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

 

SCS Tracker Driver for BPQ32 switch

SCSTracker.dll

This driver allows BPQ32 applications to make and receive Robust Packet or HF Packet calls using the SCS Tracker TNC. This driver is intended for using the Tracker on HF for forwarding, and only allows one connect at a time. For normal VHF operation or user access on HF, there is a separate driver, SCSTrackerMulti, that supports multiple connections (but not scanning).

Although the Tracker is an ax.25 controller, the driver only allows it to be used by one session at a time, so you must use the ATTACH command to allocate the port before making a call. So if your Tracker port is BPQ32 port 3, enter

ATTACH 3

Possible responses are:

#BPQ11:GM8BPQ-2} Ok

#BPQ11:GM8BPQ-2} Error – Invalid Port   // Port is not a Tracker port.

#BPQ11:GM8BPQ-2} Error – Port in use   // Port is in use.

Once attached to a port, you can issue commands to the TNC. These are the same as you would use to control the Tracker from a terminal, except that you don’t type an ESC before each command.

You can also select which mode a connect will be made in be entering HFPACKET or RPACKET. So to make a Robust call, enter

ATT 3
RPACKET
C CALLSIGN

For a normal (300 Baud HF Packet) call enter:

ATT 3
HFPACKET
C CALLSIGN

Configuration.

The driver configuration is specified in the bpq32.cfg file

The driver is defined to BPQ32 as an External port, and needs some driver-specific configuration

The first line of the config defines what BPQ Application incoming calls should connect to. If omitted, calls go to the command handler.

If you are using the Rig Control feature for scanning, add the RIGCONTROL command next.

If you want to listen for both normal and Robust packet connects, use the SWITCHMODES n command. This specifes how long to spend in each mode. Note Rigcontrol will override this.

If you want users to be able to connect to any of your applications, use the USEAPPLCALLS command.

If you want the controller to start in Robust mode, and return to that mode after a connect, use DEFAULT ROBUST

All commands that are essential to run with BPQ32 are sent automatically. You only need to include any special setup you need.

The commands that are preset are in two groups. One set is sent before the commands you specify, so can be changed. The others are sent after your commands, as they are essential for correct operation with BPQ32.

Sent before your config

M UISC           ; Monitoring Enabled (needed for APPLCALL support)
%F 1500          ; Use the same centre frequency for normal and Robust packet.

Sent after your config

Z 0              ; No Flow Control
Y 1              ; One Channel
E 1              ; Echo - Restart process needs echo
%B R600 or %B 300 ; Depending if DEFAULT ROBUST is set

MYCALL is set to the PORT config PORTCALL if specified, otherwise to NODECALL. Any MYCALL in the config file is ignored.

Other possible configuraton parameters are:

FORCE ROBUST
Only use Robust Packet. Disable any switch to Normal Packet

WL2KREPORT
send Frequency info to the WINLINK database. See here for details.

UPDATEMAP
The modem logs connects to the Nodemap if you have specified a LOCATOR in your BPQ32.cfg. If you specify UPDATEMAP, stations heard will also be sent to the map.

BEACONAFTERSESSION
Send Beacon after each session

Sample SCS Trcker Configuration

PORT
 ID=Tracker
 COMPORT=1;             COM Port Address
 SPEED=38400;           COM Port Speed
 DRIVER=SCSTracker
 INTERLOCK=n;           ; Optional - set if you have two ports sharing the same radio.
                        ; Set the same Interlock value on both ports.
 
 CONFIG                 ; Driver-Specific Configuration
 
 APPL RMS               ; Autoconnect to BPQ32 RMS Application
 
 RIGCONTROL
 COM2 19200 ICOM IC700 70
 15,14.103,USB,F1,R2
 15,14.103,USB,F1,H1
 ****
 
 SWITCHMODES 15            ; Change between Robust and normal packet every 15 seconds.
                           ; Note this will be ignored if you are using RIGCONTROL
						   
 USEAPPLCALLS              ; Listen for calls to any of your APPLnCALLS
 DEFAULT ROBUST            ; Return to Robust mode after connections
 BEACONAFTERSESSION        ; Send Beacon after each session 

ENDPORT

© John Wiseman GM8BPQ/G8BPQ

SCS Tracker Multiconnect Driver for BPQ32 switch

TrkMulti.dll

This driver allows the SCS Tracker TNC to be used in Host Mode for user access to BPQ32 applications. The Tracker can be used in KISS mode for this purpose, but the Tracker’s dynamic parameter tuning works only in Host Mode. There is a separate driver, SCSTracker that supports scanning, but only a single connect at a time, primarily for use for BBS forwarding.

Configuration.

The driver configuration is specified in the bpq32.cfg file

The driver is defined to BPQ32 as an External port, and needs some driver-specific configuration

All commands that are essential to run with BPQ32 are sent automatically. You only need to include any special setup you need. Any Tracker Commands can be entered. The PACKETCHANNELS command is used to set the number of connects accepted (Default is 10)

The commands that are preset are in two groups. One set is sent before the commands you specify, so can be changed. The others are sent after your commands, as they are essential for correct operation with BPQ32

Sent before your config

M UISC           ; Monitoring Enabled
%F 1500          ; Use the same centre frequency for normal and Robust packet.
F 200            ; Sets SABM retry time to about 5 secs

Sent after your config

Y n              ; n is PACKETCHANNELS, Number of Streams
Z 0              ; No Flow Control
E 1              ; Echo - Restart process needs echo

MYCALL is set to NODECALL. Any MYCALL in the config file is ignored.

Sample SCS Tracker Multi Configuration.

PORT
 ID=Tracker Access Porr
 COMPORT=1;             COM Port Address
 SPEED=38400;           COM Port Speed
 DRIVER=TRKMULTI
 
 CONFIG                 ; Driver-Specific Configuration
 PACKETCHANNELS 5       ; Limit to 5 simultaneous connections 
 %F 2000                ; Set Normal Packet Centre to 2000 (Gives 500 Hz split beteeen Robust and Normal Packet)
 ENDPORT

© John Wiseman GM8BPQ/G8BPQ

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

😉