Jnos and QtSoundModem

Today I was playing with Jnos, on my main system I have BPQ32 running with Direwolf and QtSoundModem. BPQ32 uses the Kiss port on Direwolf and the AGW port on QtSoundModem. Now I know that Jnos can easily handle the AGW interface/driver, so I linked Jnos with the AGW poort of Direwolf.

attach agwpe agw 44.137.31.70 8000
ifconfig agw description "AGW - 1200 baud port"
ax25 hport agw on
trace agw 0111

Direwolf is running on 144.850Mhz 1k2 and 430.950Mhz 9k6

Now I thought it would be nice to hook Jnos to QtSoundModem as well. But BPQ32 already uses the AGW port of QtSoundModem. Now I had read that Maiko VE4KLM had written a Kiss over tcp/ip for Winrpr. Who doesn’t dare don’t win. Here we go.

QtSoundmodem is running on 14.102Mhz 300Baud with 1100Hz on the left channel and 2000Hz on the right channel.

Autoexec.nos

attach winrpr qt0 44.137.31.76 8105
attach kiss qt0 1 qt1
#
ifconfig qt0 description "Kiss tcp/ip port 14.102Mhz 1100Hz"
ifconfig qt1 description "Kiss tcp/ip port 14.102Mhz 2200Hz"
trace qt0 0x211 qt0.log 1000
trace qt1 0x211 qt1.log 1000
#
ax25 hport qt0 on
ax25 hport qt1 on

The winrpr is the kiss over tcp/ip driver of Jnos. It`s written to use with Winrpr.

jnos> ifconfig  
qt1      IP addr 44.137.31.67 MTU 256 Link encap AX25
         Link addr PD9Q-1   BBS PD9Q   Paclen 256   Irtt 5000
         BCText: PD9Q Jnos Packet BBS/Gateway
         flags 0xcb0 trace 0x211 netmask 0x00000000 broadcast 0.0.0.0
         sent: ip 0 tot 0 idle 0:00:01:51
         recv: ip 0 tot 0 idle 0:00:01:51
         descr: Kiss tcp/ip port 14.102Mhz 2200Hz
qt0      IP addr 44.137.31.67 MTU 256 Link encap AX25
         Link addr PD9Q-1   BBS PD9Q   Paclen 256   Irtt 5000
         BCText: PD9Q Jnos Packet BBS/Gateway
         flags 0x400 trace 0x211 netmask 0x00000000 broadcast 0.0.0.0
         sent: ip 0 tot 0 idle 0:00:01:51
         recv: ip 0 tot 0 idle 0:00:01:51
         descr: Kiss tcp/ip port 14.102Mhz 1100Hz

Some trace of the tun0 interface, there is traffic back and forward from Jnos to the remote QtSoundModem.

Mon Feb 21 15:34:09 2022 - tun0 sent:
IP: len 40 44.137.31.67->44.137.31.76 ihl 20 ttl 254 prot TCP
TCP: 1025->8105 Seq x1040001 Ack x3bf15fb1 ACK Wnd 5840

Mon Feb 21 15:34:13 2022 - tun0 recv:
IP: len 159 44.137.31.76->44.137.31.67 ihl 20 ttl 64 DF prot TCP
TCP: 8105->1025 Seq x3bf15fb1 Ack x1040001 ACK PSH Wnd 64240 Data 119
0000  ....n......b...a..033  .IR2UFV-15  00:00:06:12  14.1033  .IW7DVM
0040       00:00:08:37  14.1033  .SM7PET+    00:00:12:36  14.

Mon Feb 21 15:34:13 2022 - tun0 recv:
IP: len 159 44.137.31.76->44.137.31.67 ihl 20 ttl 64 DF prot TCP
TCP: 8105->1025 Seq x3bf15fb1 Ack x1040001 ACK PSH Wnd 64240 Data 119
0000  ....n......b...a..033  .IR2UFV-15  00:00:06:12  14.1033  .IW7DVM
0040       00:00:08:37  14.1033  .SM7PET+    00:00:12:36  14.

Mon Feb 21 15:34:13 2022 - tun0 sent:
IP: len 40 44.137.31.67->44.137.31.76 ihl 20 ttl 254 prot TCP
TCP: 1025->8105 Seq x1040001 Ack x3bf16028 ACK Wnd 5840

Here is a trace of the log file (trace qt0 0x211 qt0.log 1000)

Mon Feb 21 15:25:03 2022 - qt0 recv:
KISS: Port 0 Data
AX25: UT1HZM->SM7PET I(P) NR=2 NS=3 pid=Text
0000  00 a6 9a 6e a0 8a a8 e0 aa a8 62 90 b4 9a 61 56  .&.n .(`*(b.4.aV
0010  f0 4d 69 6e 65 2c 20 4c 3e 20 43 61 6c 6c 2c 20  pMine, L> Call, 
0020  4c 3c 20 43 61 6c 6c 2c 20 4c 40 20 3d 20 4c 69  L< Call, L@ = Li
0030  73 74 20 74 6f 2c 20 66 72 6f 6d 20 6f 72 20 61  st to, from or a
0040  74 0d 20 20 20 4c 4c 20 6e 75 6d 20 3d 20 4c 69  t.   LL num = Li
0050  73 74 20 6d 73 67 20 6e 75 6d 2c 20 4c 20 6e 75  st msg num, L nu
0060  6d 2d 6e 75 6d 20 3d 20 4c 69 73 74 20 52 61 6e  m-num = List Ran
0070  67 65 0d 20 20                                   ge.

Mon Feb 21 15:25:17 2022 - qt0 recv: 
KISS: Port 0 Data 
AX25: IW7DVM->APRS v WIDE3-3 UI pid=Text
0000  00 82 a0 a4 a6 40 40 e0 92 ae 6e 88 ac 9a 60 ae  .. $&@@`..n.,.`.
0010  92 88 8a 66 40 67 03 f0 21 34 30 32 33 2e 32 38  ...f@g.p!4023.28
0020  4e 5c 30 31 37 31 37 2e 31 31 45 2d 48 46 20 42  N\01717.11E-HF B
0030  65 61 63 6f 6e 20 31 34 2e 31 30 35 20 4c 53 42  eacon 14.105 LSB
0040  20 33 30 30 62 64 20 2d 20 54 61 72 61 6e 74 6f   300bd - Taranto

Connect from my Jnos system to UT1HZM on port qt0 (qtsoundmodem 300Baud 1100Hz port)

Mon Feb 21 15:08:33 2022 - qt0 recv:
KISS: Port 0 Data
AX25: UT1HZM->PD9Q-15 I(P) NR=0 NS=0 pid=Text
0000  00 a0 88 72 a2 40 40 fe aa a8 62 90 b4 9a 61 10  . .r"@@~*(b.4.a.
0010  f0 55 54 31 48 5a 4d 7d 20 57 61 69 74 2e 2e 2e  pUT1HZM} Wait...
0020  0d                                               .

Mon Feb 21 15:08:33 2022 - qt0 sent:
KISS: Port 0 Data
AX25: PD9Q-15->UT1HZM RR(F) NR=1
0000  00 aa a8 62 90 b4 9a 60 a0 88 72 a2 40 40 ff 31  .*(b.4.` .r"@@.1

Mon Feb 21 15:08:38 2022 - qt0 recv:
KISS: Port 0 Data
AX25: UT1HZM->PD9Q-15 I NR=0 NS=1 pid=Text
0000  00 a0 88 72 a2 40 40 fe aa a8 62 90 b4 9a 61 02  . .r"@@~*(b.4.a.
0010  f0 4b 52 53 3a 55 54 31 48 5a 4d 2d 35 7d 20 43  pKRS:UT1HZM-5} C
0020  6f 6e 6e 65 63 74 65 64 20 74 6f 20 42 42 53 0d  onnected to BBS.

Mon Feb 21 15:08:39 2022 - qt0 sent:
KISS: Port 0 Data
AX25: PD9Q-15->UT1HZM RR NR=2
0000  00 aa a8 62 90 b4 9a 60 a0 88 72 a2 40 40 ff 41  .*(b.4.` .r"@@.A

Now the trace of port qt1 (tail -f qt1.log)

Mon Feb 21 15:22:31 2022 - qt1 sent:
KISS: Port 1 Data
AX25: PD9Q-15->TEST SABM(P)
0000  10 a8 8a a6 a8 40 40 e0 a0 88 72 a2 40 40 7f 3f  .(.&(@@` .r"@@.?

Mon Feb 21 15:22:31 2022 - qt1 sent:
KISS: Port 1 Data
AX25: PD9Q-15->TEST SABM(P)
0000  10 a8 8a a6 a8 40 40 e0 a0 88 72 a2 40 40 7f 3f  .(.&(@@` .r"@@.?

Boooommm Crashed……dammmm

It went so well. But now Jnos crashed. The winrpr driver is probably not written for two ports. Receiving is fine, but a packet that leaves the system on port qt1, Jnos can’t handle that.

So I removed this line (attach kiss qt0 1 qt1) from autoexec.nos and Jnos is running just fine. It is a pity that it only runs on 1 port, and that is the same as the AGW port. Maybe Maiko VE4KLM will look at it 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()

Kantronics KPC4

Today I have been working on a Kantronics KPC4 which I bought from PD4R. I am very happy that I can add it to the collection.

Kantronics KAM_KPC-1-2-4-2400_Installation Manual
Kantronics KAM_KPC-1-2-4-2400_Operations Manual

Kantronics KPC4 Firmware

The nice thing is that such modems can also be accessed from BPQ32. Here is a small example.

PORT
 ID=Serial TNC KPC4
 COMPORT=/dev/ttyUSB1
 SPEED=9600
 DRIVER=SERIAL
 QUALITY=0
 PORTCALL=PI1LAP
ENDPORT

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 Yapp file transfer

BPQ32 and QTermTCP support the Yapp Protocol. Let’s take a look at how that works.

First we have to great a Directory  ” Files”  in the root dir of Linbpq. The user Pi must be the owner of the Directory.

cd /home/pi/linbpq
mkdir Files
ls -l
drwxr-xr-x 2 pi pi    4096 nov  1 12:10 Files
* If the user Pi does not own the directory "Files", you can change that with.
sudo chown pi:pi Files

Now we can set QTermTCP to use the directory “Files” for uploads and downloads. In the top menu choose ” Yapp” , ” Set Receive Directory” and choose the correct directory (Files).

First we need to connect to a local BBS that supports the YAPP protocol. Now I have set up a BBS here for this test. As modems I use two Ninotnc`s connected with a null modem cable.
Now we are ready to send a file. Again choose in the top menu “Yapp” and “Send File” Now you can choose which file you want to send.

Here we go…..

Monitor screen from Linbpq BBS.

File compleet.

The same file but compressed.

NinoTnc progress

Boy, I can hit my head against the wall. I made a very rookie mistake. I had  soldered a number of Leds the wrong way round.  Tsss before I finally invented that. Very stupid.
But when I finally found out (it’s even in the description on the tarpn website) it now works the way it should.

Let’s test how the reception is. (aprs on 144.800Mhz @ 1200 Baud)

I feel like he is a little deaf. Looks like he’s missing some frames. Maybe it’s the setup I’m using. I am using a Yaesu ft7800 with the NinoTnc directly on the Mini Din of the radio. I have to figure this out, I will read the Tarpn website one more time.

First let’s update the flash.

Mmmmm, let’s give it a go.

Nice…

A Linbpq configuration example

bpq32.cfg

PORT
PORTNUM=3                                
ID=NinoTNC     
TYPE=ASYNC                                
PROTOCOL=KISS                         
FULLDUP=0                      
COMPORT=/dev/ttyACM0
SPEED=57600                    
CHANNEL=A                      
PERSIST=225                    
SLOTTIME=20                   
TXTAIL=1                       
QUALITY=1                      
MINQUAL=81                     
MAXFRAME=1                     
FRACK=6000              
RESPTIME=40                    
RETRIES=20                     
PACLEN=236                      
UNPROTO=ID                     
L3ONLY=0                       
DIGIFLAG=0                     
DIGIPORT=0                     
USERS=1                        
IGNOREUNLOCKEDROUTES=1  
ENDPORT

I am very happy to be able to add this (Nino)TNC to the collection.

Linux Port of UZ7HO’s Soundmodem

Very good news, John G8BPQ has ported Soundmodem from UZ7HO to Linux.

Mail from John G8BPQ.

Andy UZ7HO has allowed me to port his Soundmodem to C so that it can be run run Linux systems. See

https://www.cantab.net/users/john.wiseman/Documents/QtSoundModem.html

This is pre-Beta software. It has been tested by several people but is likely to still have bugs.

73,
John G8BPQ

Guide…BPQ User and Sysop Commands

Bill PY2BIL has wrote a great guide with Sysop and User commands.

PY2BIL wrote,

Since I started with my BPQ BBS I was looking for an easier way to access the documentation and find what I needed at the moment, so as many do, I wrote down what I used the most along the way. Recently I decided to take the plunge and write the ‘Official BPQ Cheat Sheet’ (hihi) based on the official documentation that would make my life easier. Some of the commands I found in the documentation are flagged as obsolete or no other reference was found and I suspect that many changes that John did are still not formally documented and may be laying around in this forum.

The official website,

https://cheatography.com/gcremerius/cheat-sheets/bpq-user-and-sysop-commands/

Or download it from this link.

https://ham.packet-radio.net/packet/bpq32/bpq32-guide/bpq-user-and-sysop-commands.pdf

Thanks Bill great document.