Packet Web Portal, Games & More

This is a demonstration of several cool features I have added to a regular packet radio switch, one of which enables access to crucial information that would otherwise have be unobtainable for a vulnerable and isolated radio amateur without Internet (they exist!)

Packet Web Portal: COVID-19

The idea was initially sparked by Sholto, K7TMG who had expressed the desire to fiddle with websites over packet during a casual discussion in the round table packet chat.

At first, I wasn’t too keen on the idea namely because of restrictions on the type of information permitted over amateur radio links, however after some thought it occured to me that it would be possible to implement a portal with some precautionary measures in place, but the idea was then shelved for a few weeks.

While it may have been fun to play with, on its own merit- it was likely to be a total waste of time!

A couple of weeks passed and a series of packet mails arrived from a elderly fellow OM who was in total lockdown due to heightened measures surrounding COVID-19 in the UK. He had no Internet and his only contact with outside was via a volunteer who came by his home once a week to bring groceries.

This bothered me perhaps more than it should, but in these mail exchanges over packet radio he was asking me to look things up on the Internet for him. Uh… eureka much?

My reaction

Software

LinBPQ – (BPQ32) by John Wiseman, G8BPQ

BPQ switch is the system that connects all of the bits and pieces together: Radio, Computer, Internet, Services and applications.

For simplicity, a simple telnet terminal is sufficient
to interface with BPQ32, and BPQ32 also provides a web-browser based terminal.

Hey, I designed this icon!

UZ7HO’s modem has been ported to multi-platform by G8BPQ. The sound-modem is used for interfacing radio with the BPQ switch, in turn providing access to users via RF. Released currently under alpha and beta test as QtSoundModem Software-Terminal Node Controller.

QtSoundModem (Alpha Test)

A terminal program. The DOS program Paket 6.2 running in DOSBOX is for demonstrative purposes only, it is not necessary to run this when more modern alternatives exist…

However for this test case, Paket 6.2 is actually the terminal used by the fellow ham mentioned in the introduction. It has been used in this scenario to optimise the appearance of the web portal for the end user.

Paket 6.2 for DOS

I mentioned earlier the restrictions on certain types of data over amateur radio links, this is where OpenDNS FamilyShield came into play, and a HTTP proxy server that serves as the filter for requests going to the internet. This is accomplished by setting the proxy to use OpenDNS’s DNS-servers, therefore inheriting their DNS-based safety features.

Another risk reduction measure is the Express Menu- this makes getting information directly pertaining to COVID-19 easier and a simple matter of entering two or three digits. One of the choices available enables one to enter any web address if desired, and those requests are logged, and if necessary- filtered (denied).

Screenshot of the WEB Portal via QtTermTCP Client

Source Code

All of the tools demonstrated in the video such as Packet Web Portal, Games, Graphs – are all available from my GitHub:

https://github.com/pe1rrr/packet-scriptlets

Do you have a Raspberry Pi* and fancy having a go?


A ready-to-go build of (pi)LinBPQ combined with QtSoundModem and QtTermTCP is available via GitHub, and an introduction posted right here.

* The minimum-fuss specification for running all of the software is a Raspberry Pi 4.

Unfortunately, the RPi3 has some issues with the ALSA libraries and PTT timing on GPIO and serial ports, meaning any PTT-timing sensitive application may not work as intended out of the box.

This bug affects not only QtSoundModem but Direwolf TNC as well.

The OSS-ALSA sound bridge workaround for RPi3 is included in the GitHub repository. However, if you are looking to purchase a Pi specifically for this purpose, definitely go for the RPi4.

Words of Encouragement

You may find this additional info useful, in response to a comment posted on the original unedited video:

“Is this TCPIP over AX25?”

No, technically the big difference is that we are using AX25 encapsulated over IP rather than the other way around to link nodes together over the internet where RF either isn’t available or practical.

The software TNC with the waterfall visible in the background is linked into the switch over KISS-over-TCP. This means we can run dedicated little boxes like Raspberry Pi4s and radios bunched together in one place with the switch physically located else where.

QtSoundModem is then linked into the switch (the node) running on a separate Raspberry Pi elsewhere in the house.

Setting this up is not easy, as there is no one-size-fits all. It can be just as complex as setting up a enterprise-level Cisco router- where there may be technical manuals out there but basically your network design is unique to you and mine is to me, depending on your needs.

This means there is very help on offer that would not have some huge bias towards a certain intended purpose.

The documentation for linbpq is thorough, but requires full assimilation before even picking up and starting to write a config file as boy is it modular as heck!

This also applies to other network stacks like JNOS, the manual for that is thick, so it is not a problem with the software itself- but mostly a mild case of PEBCAK.

Not to be too discouraged, I have put together a bundle to get some basic functionality up and running but it will still require some due diligence and has a dependency on basic Linux operational competence (LinBPQ RTG).

Hopefully the README.md included with linbpq_rtg is sufficient to get most started. You can leave a comment if you have questions below 👇 or better- join the BPQ32 Groups.io Support Group.

QtSoundModem Auto-Starting from Systemd

I don’t run the QtSoundModem on the same machine as the node so I use a systemd service script to automatically start up QtSoundModem and put it on a virtual-VNC session that is independent from the physical desktop.

The following systemd scripts call a pair of bash scripts located within the home directory, so that modifications can be done to them without having to reinitialize the systemd service.

Packages Required

sudo apt install realvnc-vnc-server
sudo apt install screen

Note: realvnc is free on the Raspberry Pi, alternatives that may work for other platforms: tightvnc or tigervnc

Systemd Scripts

/lib/systemd/system/qtsm.service


[Unit]
Description=QtSoundModem Start Script
After=vvnc.service
Wants=vvnc.service


[Service]
Type=forking
WorkingDirectory=/home/pi/bin
Restart=always
RestartSec=20
StartLimitInterval=60
StartLimitBurst=3
User=pi
Group=pi
ExecStart=/usr/bin/screen -S QTSM-Console -d -m /home/pi/bin/startqtsm
SyslogIdentifier=QTSM-Debug


[Install]
WantedBy=multi-user.target

/lib/systemd/system/vvnc.service

[Unit]
Description=Shack Desktop Start Script by PE1RRR
After=network.target


[Service]
Type=forking
WorkingDirectory=/home/pi/bin
Restart=always
RestartSec=20
StartLimitInterval=60
StartLimitBurst=3
User=pi
Group=pi
ExecStart=/home/pi/bin/vvnc
SyslogIdentifier=Shack-VNC


[Install]
WantedBy=multi-user.target

Virtual Virtual VNC?

vvnc for virtual-VNC, yep its a virtual virtual desktop, one that runs independently from the default usually found running as a clone of the desktop monitor display.


This script starts a virtual VNC screen that can be attached from any device such as a smart phone, iPad or other desktop Pi.

/home/pi/bin/vvnc

#!/bin/bash
vncserver -kill :1
vncserver :1 -geometry 2732x2048

Set permissions to execute:

chmod 755 /home/pi/bin/vvnc

QtSoundModem Start Script

/home/pi/bin/startqtsm

cd /home/pi/bin

# Launch invisibly
# /home/pi/bin/SM nogui

# Launch with GUI

# Set the display number here. If HDMI connected monitor, this is usually :0

# For VNC sessions, this is determined in the desktop- check it with “echo $DISPLAY” in a shell within the VNC.

DISPLAY=:1
export DISPLAY
/home/pi/bin/QtSoundModem # path to your QtSoundModem binary

Set permissions to execute:

chmod 755 /home/pi/bin/startqtsm

There are a couple of ways of launching QtSoundModem, I prefer to have the GUI to keep and eye on the waterfall and monitor packets etc.. there is an option to start it invisibly in which case- you can opt to use the nogui mode, and remove all references to vvnc.service in the previous scripts as they won’t be needed.

Initialise systemd

Need only doing once:

sudo systemctl enable qtsm.service
sudo systemctl enable vvnc.service

To Stop/Start manually:

sudo service qtsm start

If the vvnc service is not yet running qtsm’’s service will auto-start it for you. This is due to the “Wants=“ directive in qtsm.service.

Restarting the vvnc service will kill any vnc server running on the display defined in the /home/pi/bin/vvnc file before starting up again.

Displaying the VNC Session

If all has gone well, then QtSoundModem should be displayed on your Virtual VNC screen. That is, assuming you’ve connected a VNC client to it to display it!

The common way to connect to the VNC server is using the address and the display number. 0 (zero) nearly always refers to the hardware-wired display, and the first virtual server after that is :1

e.g IP-address:1

vncviewer 192.168.0.44:1

Monitoring the Consoles

As these systemd scripts launch with the screen command, this provides a way to keep an eye on the console output without it thrashing the SD Card with continuous writes. To attach to the running screen console, try the following:

screen -r

If you only have one screen session running then it will re-attach automatically, if not then it will show you a list from which you must provide a string after the -r that can be wildcard-matched either with the process number or the console’s name.