BPQ Packet Radio Node conversd Interlink

Usually, use of a plain telnet session is sufficient to connect to remote services in BPQ however when the remote service requires a login to occur, sending a prompt to the user and trusting them to input the correct information is unsatisfactory as in some circumstances this can lead to spoofing.

Automating with Expect

The expect tool is used in here to replace the interactive process of logging in with a preset behaviour.

The wrapper script connects to the remote service, in this case- conversd, and sends the command sequence including the callsign of the user to initialize the connection and log the person in with their current callsign connected through the BPQ node.

The callsign itself is provided to the wrapper script by BPQ32 automatically upon connect. The problem with conversd is that it requires a command prefix before the callsign to actually log in.

Install expect

You will need to ensure that the expect tool is installed on your system, and that the path to ‘expect’ matches in the script provided down below, by default this is /usr/bin/expect.

sudo apt install expect

The wrapper script

#!/usr/bin/expect 
gets stdin callsign
spawn -noecho nc IPADDRESS 3600
send "/n $callsign\n"
interact
exit

In the above example, substitute the IPADDRESS with the DNS host name or static IP address of the conversd server you wish to connect to.

You may need to substitute the port number for the one provided to you by the conversd owner. The default is usually port 3600, but it can sometimes differ system to system.

Place this script in a familiar directory, for the sake of example this document will use a sub directory “scripts” within the linbpq home directory.

/home/bpq/scripts/convwrap

Set the correct permissions:

chmod 755 /home/bpq/scripts/convwrap

Calling the wrapper script

The wrapper script by itself doesn’t do all of the work. Incoming connections from BPQ have to pass through to a TCP port that is connected to the wrapper script, this is easily achieved with the openbsd-inetd package.

Install ‘openbsd-inetd’ on your system, if using a Raspbian or Debian based install this is accomplished with:

sudo apt install openbsd-inetd

The openbsd-inetd utilizes two configuration files, these are:

/etc/inetd.conf
/etc/services

Edit the /etc/inetd.conf, insert the following line with the file path adjusted accordingly to suit your own installation, be sure to ensure the spaces or tabs are preserved:

convwrap    stream    tcp    nowait    bpq    /home/bpq/scripts/convwrap

Edit the /etc/services file and insert a fresh port number for this service, e.g port 63000:

convwrap  63000/tcp

Restart inetd so that it loads the above configuration.

sudo service inetd restart

Configuring BPQ32

Insert an APPLICATION line below your existing application definitions, ensure that you select an unused unique application number (the digit after APPLICATION). BPQ has a maximum of 32 application definitions.

APPLICATION 9,WWC,ATTACH 10 127.0.0.1 63000 S,NOCALL-2,ALIAS,255

In the above example:

  • 9’ refers to application number 9, it is important that you choose an application number between 1-32 that is not already in use.
  • WWC is the command alias, a user connected to the BPQ node issues this command to initiate the connection to the wrapper.
  • ATTACH is the internal node command that requires a telnet PORTNUM.
  • 10’ is the telnet PORTNUM associated in bpq32.cfg, it will differ system to system, if your system does not have a telnet port defined, now is the time to do that
  • 127.0.0.1 63000 is the host and TCP port number where the wrapper script is provided (see /etc/services from earlier). 127.0.0.1 always refers to ‘localhost’ or ‘self’ in human terms
  • S’ is the internal node flag that instructs the node to keep the user connected to the node after disconnecting from the wrapper. This is known as ‘Stay’.
  • NOCALL-2 is the optional callsign and SSID you want the wrapper to be reachable via ax25 and NETROM.
  • ALIAS is the optional 1-6 character maximum unique ax25 and NETROM alias of the wrapper. Do NOT use the default- make sure you pick one that does not collide with anyone else on the NETROM network.
  • ‘255’ is the optional NETROM quality to add the prior optional call sign/alias to the NETROM broadcast, as it is a local and hard-wired service, this can be maximum, 255.

Testing

Test the wrapper using the simple telnet program. Connect to the wrapper port, it should show the following:

bpq@pe1rrr:~/scripts $ telnet localhost 63000
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.

In order to emulate what BPQ will do, type in your callsign and hit enter.

pe1rrr
/n pe1rrr
*
* Access to channel 0 has been removed from this server.
*

FYI: No password found.
Try /help mkpass.

conversd @ Rijen_NL Ping-Pong conversd saupp-1.62a
* Type /HELP for help.
* Welcome to RRRWWC Worldwide Converse Server
* Use /help for commands.
* ========================================================
*
*** There are 18 users on 9 channels online.
*** Will try local default channel 3333.
*** You created a new channel 3333.
*** Personal data set from file: Red, Rijen, JO21LO
*** Nickname set from file: Red

🙂

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.

Starting LinBPQ from Systemd

Ideal for Raspbian Buster.

Optional but recommended:

Note in the above example there is a line referencing an application /usr/bin/screen. If you do not have the screen package installed, it is highly recommended to do so- screen will create a virtual console for linbpq, ideal for checking, diagnostics, debug/errors etc.

sudo apt install screen

When the node is running, while logged in as the user defined in the linbpq.service:

To attach:
screen -r linbpq
To detatch, press key combination sequence:
Ctrl-a d

Create the runbpq Script

I recommend running a script rather than the binary directly so that if you need to add TNC drivers or bind additional devices such as bluetooth TNCs, this would be the ideal place to put them In sequence.

#!/bin/bash
#
# Edit to reflect the directory location of linBPQ installation
cd /home/bpq/node
#
# Attempt to upgrade (if linbpq.new exists) on next restart
mv linbpq.new linbpq
./linbpq

Set execute and the correct USERID and GROUP permissions on the runbpq script AND linbpq binary. This will make it run with the correct user ID if at any point it is launched manually.

sudo chmod +x runbpq
chown <userid>:<groupid> runbpq linbpq
sudo chmod u+s runbpq linbpq

Upgrade preparation

IMPORTANT: If you drop an upgraded linbpq into the directory, you should name it linbpq.new and run the following commands on it to prepare it for when the linbpq service is next restarted (useful if running a node with a specific scheduled maintenance window).

sudo chmod +x linbpq.new
sudo chown <userid>:<groupid> linbpq.new
sudo chmod u+s linbpq.new

Starting linbpq from systemd

Create the file linbpq.service with the following contents:

[Unit]
Description=LinBPQ
After=network.target
[Service]
Type=forking
WorkingDirectory=/home/bpq/node
Restart=always
User=bpq
Group=bpq
ExecStart=/usr/bin/screen -S linbpq -d -m /home/bpq/node/runbpq
#ExecStart=/bin/bash /home/bpq/node/runbpq
SyslogIdentifier=LinBPQ
[Install]
WantedBy=multi-user.target

Edit the ExecStart path to reflect the location of runbpq on your system.

Move linbpq.service into the /etc/systemd/system/ directory

sudo mv ./linbpq.service /etc/systemd/system/
cd /etc/systemd/system/

Then run

sudo systemctl daemon-reload
sudo systemctl enable linbpq.service

Which does this:

Created symlink /etc/systemd/system/multi-user.target.wants/linbpq.service → /etc/systemd/system/linbpq.service.

And that should be it. LinBPQ will now start from boot, and you have prepared a system to assist with future upgrades of the node binary.

Further tips

You can check your systemd startup sequence status issuing:

sudo systemctl status

LinBPQ “Ready to Go”

Got a Raspberry Pi and want to get back into Packet Radio?

The LinBPQ-RTG has been moved to a GitHub repository, meaning keep it up-to-date is much easier. To download, install ‘git’ on your system and use the following command to copy the repository to your system:

git clone https://github.com/pe1rrr/linbpq_rtg

This is a complete packet radio setup for amateur radio use. The repository has binaries included for the Raspberry Pi providing the full node network stack, QtSoundModem and QtTermTCP.

The repository contains documentation and configuration pretty much ready to go, only a few things need to be edited to set your callsign, file paths and a couple of parameters such as grid square locator, GPS coordinates and APRS-IS password.

Please note this software is in Beta, it is recommended that you run all three update scripts before starting, and most importantly, read the README.md – also viewable on https://github.com/pe1rrr/linbpq_rtg

Recommended system requirements: Raspberry Pi4 if running the provided QtSoundModem soundmodem. If not using the soundmodem, serial port based TNCs can be used on a Pi Model B / Pi Zero as the performance overhead is much lower. Raspberry Pi Model 3’s have issues with ALSA driver (see: https://bugs.launchpad.net/raspbian/+bug/1819560) although a workaround has been included in the repository, see qtsm_rpi3 file.

If you wish to compile the source code yourself, download the latest archive from G8BPQ’s website/repository here. If using a 64bit OS, you must first install x86 32bit compatibility libraries before building. A binary compiled without these may execute but it will send corrupted frames, so be careful.

Good luck!

73

Red – PE1RRR

Appendix

The update scripts provided can be easily modified to download the binaries for x86 32bit Linux.

Open them in a text editor and adjust the filename= parameter.

The filename downloaded by the scripts should be changed from ‘pilinbpq’ to ‘linbpq’. The same procedure should be employed for qtsm and qtterm update scripts- just remove the ‘pi’.

Linux x86

If running a 64bit OS you will need to install the 32bit compatibility libraries. For Ubuntu and Debian, this is accomplished with:

apt-get install ia32-libs
QtTerm configured in MDI mode
QtSoundModem

Windows

For Windows users, the configuration files are compatible with the Win32 build of BPQ32 available from G8BPQ’s website here.

Be aware the configuration here is for the latest Beta so after installing the Win32 package, also download the latest beta DLL. As this package is aimed at Raspbian Linux for the Raspberry Pi it is a little out of scope to provide details for the Windows platform.

See BPQ32 Documentation

JNOS<>BPQ – Forwarding Mail over Telnet

UPDATE – Foreword: The easiest way to exchange mail between BPQ and JNOS would be to simply create a AXUDP link between BPQ and JNOS and then use NETROM connectivity to do regular AX25 connections over the link. The document below was composed before this realisation.

This foreword is here as a heads up that using Telnet method is really the longest route around the problem, and is really not recommended.

Internally Forwarding Mail to BPQ

Create a new user with BBS flags for your JNOS instance within the BPQ User Management Area.

For this account, do not use the callsign of the JNOS instance, instead use a descriptive alias. This avoids a problem with callsign collision which will usually cause JNOS to refuse to work. In my example, I will refer to this USER as RRRNOS on the BPQ side.

The HROUTE of RRRNOS is RRRNOS.PE1RRR.NLD.EURO, as configured in the mailbox settings for JNOS.

All mail for RRRNOS arrives first at PE1RRR.NLD.EURO and is queued for forwarding to RRRNOS.

In turn, we also will refer to the BPQMail instance in the JNOS configuration as MATRIX, rather than the callsign.

Configuring forward.bbs

IMPORTANT: The passwords for BPQ telnet sessions are NOT defined in the BPQMail User account, but instead in the bpq32.cfg node configuration file under the TELNET port declaration. See BPQ Telnet Server Documentation.

matrix 0023 P
telnet <bpq node address> <bpq fbbport> cronly
.<bpq port defined telnet userid>
.<password>
* 0
.BBS
* 0
<list of areas to forward>

IMPORTANT: The FBBPORT is often misunderstood as a direct connection to the BBS- when it is not. The port opens a connection to only the node which is why we must issue an extra command: .BBS

FBB sysops frequently get this wrong and wonder why their telnet forwarding to a BPQMail instance doesn't work.

JNOS ftpusers Configuration

It is necessary to provide BPQMail with an account on JNOS with which to log in and access BBS functions. This is possible by adding an account with the necessary privileges set.

JNOS won’t allow the use of an invalid callsign for a login user ID by default, to do so would require recompiling the JNOS source with one of the config.h “defines” changed (it is easy to do, but not recommended).

A workaround, if forwarding downstream to yourself– is to just use your own callsign for the login, as it would be coming from your own upstream BPQMail BBS anyway.

Permissions needed (if not using your own sysop login): Expert, BBS.

From the FTPUSERS PERMISSIONS reference sheet, sum up the permission level as such:

  • BBS: 8192
  • Expert: 16384
  • Summed together: 24576
FTPUSERS PERMISSIONS
The following is a list of the user permission values allowed in FTPUSERS file.
  Name          value    hex value    comments
FTP_READ         1        0x1       /* Read files */
FTP_CREATE       2        0x2       /* Create new files */
FTP_WRITE        4        0x4       /* Overwrite or delete existing files */
AX25_CMD         8        0x8       /* AX.25 gateway operation allowed */
TELNET_CMD       16       0x10      /* Telnet gateway operation allowed */
NETROM_CMD       32       0x20      /* NET/ROM gateway operation allowed */
SYSOP_CMD        64       0x40      /* Remote sysop access allowed */
EXCLUDED_CMD     128      0x80      /* This user is banned from the BBS */
PPP_ACCESS_PRIV  256      0x100     /* bit for PPP connection */
PPP_PWD_LOOKUP   512      0x200     /* Priv bit for peerID/pass lookup */
NO_SENDCMD       1024     0x400     /* Disallow send command */
NO_READCMD       2048     0x800     /* Disallow read command */
NO_3PARTY        4096     0x1000    /* Disallow third-party mail */
IS_BBS           8192     0x2000    /* This user is a bbs */
IS_EXPERT        16384    0x4000    /* This user is an expert */
NO_CONVERS       32768    0x8000    /* Disallow convers command */
NO_ESCAPE        65536    0x10000   /* Default is no escape char */
NO_LISTS         131072   0x20000   /* No lists displayed from mailbox */
NO_LINKEDTO      262144   0x40000   /* Disable '*** linked to'  */
NO_LASTREAD      524288   0X80000   /* Ignore lastread in <area>.usr
                                       (shared accts)*/
NO-FBBCMP        1048576  0x100000  /* Avoid FBB compression */
XG_ALLOWED       2097152  0X200000  /* Allow XG (dynip route) cmd */

Edit the ftpusers file and append:

<callsign> <password> /jnos/public 24576

Note: If this BBS is also a regular user, give them AX and netrom permissions too (add 8 + 32 to the final sum).

Configuring BPQ Forwarding

The BPQ User created with the BBS flag (RRRNOS in this example) should be visible in the Forwarding Management Area of BPQ as one of the callsigns in the list.

Click on RRRNOS user and then set the fields with the following information, if not explicitly mentioned, the fields are to be left empty.

Connect Script

ATTACH 10
C <jnos host/ip> <jnos port> TELNET <jnos userid> <jnos password>

BBS HA

RRRNOS.PE1RRR.NLD.EURO

Hierarchical Routes (Flood Bulls)

AF
AS
OC
EURO
NOAM
SOAM
CEAM
WW

HR (Personals and Directed Bulls)

WW

Enabled Checkbox/Flags (all not explicitly mentioned should be disabled)

  • Enable Forwarding [ON] Interval [600]
  • FBB Blocked [ON] Max Block [10000]
  • Send new messages without waiting for poll timer [ON]
  • Allow Binary [ON]
  • Use B2 Protocol [ON]

Click Update to finish.

Check and Test

Open a new terminal an go to your BPQ directory, open the log file using the tail command, this will open the log file and checks the file for new data is written to it every 0.1 seconds.

tail -f -s 0.1 logLatest_BBS.txt

From the BPQ Forwarding Area, select the BBS account and click Forward

Alternatively use: fwd <callsign> now from the BPQ mail prompt.

Watch the log file for errors.

If all goes well this is what you should see:

200213 16:31:41 |RRRNOS    Incoming Connect from RRRNOS
200213 16:31:41 >RRRNOS    [BPQ-6.0.19.30-B2FWIHJM$]
200213 16:31:41 >RRRNOS    0 messages to fwd to RRRNOS
200213 16:31:41 >RRRNOS    PE1RRR BBS>
200213 16:31:41 <RRRNOS    [JNOS-2.0m-B2FHIM$]
200213 16:31:42 <RRRNOS    FF
200213 16:31:42 >RRRNOS    FQ
200213 16:31:42 |RRRNOS    RRRNOS Disconnected

To test from the other direction, log into JNOS sysop console and issue:

Note: In the examples below. ‘MATRIX’ is the arbitrary name I have given to the BPQ mailbox in JNOS, it just so happens to also be the BPQ mailbox’s NETROM alias but that is not important at all as this is a telnet session, it is just for practicality.

mbox kick <bpq bbs name defined in forward.bbs>
e.g.
mbox kick MATRIX

Note: when calling mbox kick, use upper case for the callsign if there is no local mail to actually forward. This initiates a reverse forward. If you don’t use this method, and you have no mail to forward, it won’t try and connect, and as such you won’t see diddly squat happening in the log file.

Packet Radio: BPQMail Notes

Whitepages Notes

The BBS has been configured to reject WP bulletins, but yet, WP bulletins are still arriving with status BK (bulletin killed), but why? I asked John G8BPQ and was given a helpful insight into how the forwarding protocol of choice can affect the message filters. After inspecting my BBS log file, he explained:

The WP messages that aren’t being rejected are all arriving via B2 protocol (FC proposal). The standard FC message doesn’t include FROM, TO or VIA so the filters have to kill filtered messages instead of rejecting them.

Between BPQ BBS systems the FC proposal is extended. Many of those messages are rejected, but not all of them.

Configuring a PK232 TNC for BPQ32

Preparing the PK232

Firstly, make sure you can talk to the PK232- getting the cmd: prompt is essential before we can begin.

If you aren’t getting a prompt, then the PK232 is likely stuck in either the wrong baud/speed, in AEA Hostmode, is already in KISS mode, or is in a combination. The best thing to do is reset the PK232 and let it’s autobaud routine kick in.

If your model of PK232 has the battery soldered onto the PCB, remove the jumper situated underneath the unit. If the PK232 has a removable battery then remove it, this will require opening up the PK232 by unscrewing the chassis screws.

Power up/down then reconnect the battery/replace the jumper.

Have a terminal program ready and set to 9600 (with 8 bits, No Parity, 1 Stop bit).

The PK232 should start to do auto-baud negotiation. Wait at the terminal until legible text is seen. Follow the instruction given on the screen.

Preparing the PK232 for Packet Operation

As soon as you have a cmd: prompt, its ready for setting into KISS mode. Be warned that once you do this and your PK232 has a battery, it will be persistent.

cmd:
KISS ON

Good to Know: Exiting KISS mode

After issuing KISS ON, the TNC will stop responding to command input. The TNC is now in KISS mode and only a special combination of control characters can force it back out into the command mode, or a hard reset (as documented above).

Excerpt from the PK232 Technical Manual:

HOST OFF: CTL = $FF
The HOST OFF command returns the PK-232 to the human or verbose mode. HOST OFF has no arguments.

$C0 $FF $C0 FEND CTL FEND

Sending the above special characters to the TNC can be difficult due to the way host operating systems interpret keyboard input. From memory, I believe the ALT-numeric keyboard codes for this are:

ALT-192
ALT-255
ALT-192

BPQ Port Configuration

PORT
        PORTNUM=1      ; Optional but sets port number if stated
        ID=PK232       ; Displayed by PORTS command
        TYPE=ASYNC     ; Port is RS232
        PROTOCOL=KISS  ; TNC is used in KISS or JKISS mode
        FULLDUP=0      ; Only meaningful for KISS or JKISS devices
                       ; Defining COM ports can be done 2 ways:
        ;IOADDR=B      ; IOADDR is a legacy method where ports are
                       ; addressed in hexadecimal. 
                       ; Win32: 1 = COM1, COM9=9, COM10=A, COM11=B
                       ; A friendlier way to define the port is using
                       ; COMPORT, it supports both Linux and Win32
                       ; notation. Examples: Win32: COM11
                       ; Linux: /dev/ttyUSB0
        COMPORT=/dev/ttyUSB0 ; Linux or Windows, see above.
        SPEED=9600     ; RS232 COM PORT SPEED set in the TNC
        CHANNEL=A      ; Only meaningful for multichan TNCs
        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=0      ; Quality factor applied to node broadcasts 
                       ; heard on this port, unless overridden by a 
                       ; locked route
                       ; entry. Setting to 0 stops node broadcasts
        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
        BCALL=PE1RRR-13  ; BTEXT call. unstated defaults to APP1 CALL
        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
        UIONLY=0       ; 0/1: 1 will stop any connects on this port 
                       ; ie it can only be used for UNPROTO traffic,
                       ; such as APRS.
ENDPORT

COM again?

Always check the log file of BPQ for errors concerning serial port permissions (linux especially).

The windows systems use COM# format and USB devices tend to be COM9 or something like that (check device manager), these can be represented in the legacy IOADDR field as hexadecimal- COM11 would be “B”, however for the sake of readability, COMPORT=COM# (or /path/to/device for Linux) is the preferred way to define COM ports.


PACTOR

If you want to use your PK232 TNC for Pactor with BPQ there is a guide for setting that up provided on the BPQ website. However, here is an example config with a breakdown of how the driver works.

Note: This driver requires the TNC to be at the cmd: prompt (not KISS mode).

PORT
    PORTNUM=9
    ID=Pactor Link
    TYPE=EXTERNAL
    COMPORT=/home/pi/dev/ttyV1
    ;IOADDR=
    SPEED=9600 ; COM Port Speed
    DRIVER=AEAPactor
    PORTCALL=PE1RRR   
    CONFIG                 ; Driver-Specific Configuration
           APPL BBS
ENDPORT

How it works

The driver is defined to BPQ32 as an External port, and needs some driver-specific configuration, this configuration is defined after the CONFIG statement for the port. The configuration is separate from the spool of preset commands that are sent to the PK232 to prepare it for PACTOR operation.

When the port is initialised, there are two groups of preset hardwired commands invisibly sent to the TNC. The first group (See Group 1 Presets) is sent. Then user-configuration is processed, then the second group is sent. This is necessary to get the driver to talk to the TNC properly.

For documentation purposes, these are the preset hardwired commands automatically sent to the TNC before user configuration is applied:

Group 1 Presets

RESTART
EXPERT ON
PTHUFF 0
PT200 ON
WIDESHFT OFF;
CONMODE TRANS
ARQT 30

Group 2 Presets

XMITOK ON
XFLOW OFF
RXREV OFF
FLOW OFF
AWLEN 8
AUTOBAUD OFF
8BITCONV ON
ALFPAC OFF
ALFDISP OFF
ACRRTTY 0
HPOLL ON
EAS ON
MYCALL 

To reiterate, you do not need to put these commands in your configuration.

”Config”

The port definition has two sections, the first part which sets up the port for BPQ, and the second part which enables you to do a few things such as telling the driver what APPL(ICATION) to connect the PACTOR link to.

The optional RIGCONTROL directive is then processed, and finally additional TNC commands to configure the PK232 (e.g. adjusting the retry count).

Example

PORT                       ; Defining the port for BPQ
    PORTNUM=9              ; Choose a number which isnt already in use
    ID=Pactor Link         ; Describe your port
    TYPE=EXTERNAL          ; Driver Type to be used
    ;COMPORT=/dev/ttyV1     ; Linux Comport (switch with below)
    IOADDR=1               ; Windows COM (1/2/3/4/5/6/7/8/9/A/B/C)
    SPEED=9600             ; COM Port Speed
    DRIVER=AEAPactor       ; Driver Definition
    PORTCALL=PE1RRR        ; Respond to this callsign
    CONFIG                 ; Driver-Specific Configuration
           APPL BBS        ; Make incoming connects go to the BBS
                           ; Can be whatever you have defined as an
                           ; APPLICATION. E.g. RMS, CHAT etc.
           ; Below is the optional RIGCONTROL directive.
           ; <comport> <speed> <rig brand> <model> <IO address> <frequency parameters>.
           ; This is better documented on the BPQ RIGCONTROL website.
           RIGCONTROL COM2 19200 ICOM IC700 70 4 14.103/U1W 14.112/U1 18.1/U1N 10.12/L1
           
           ; Any TNC commands you want to send are put here.
ENDPORT                    ; End of port definition.

Here is the documentation for the the Rig Control feature.

Here is a downloadable copy of the PK232 Technical Reference Manual

Packet Radio: BPQChat Notes

Custom Channels

It is possible to add a shortcut command to your node to directly put users into a specific predefined chat topic channel on the chat servers.

So instead of having to join General first and type /topic, it is possible to just type ‘mychat’ from your node

All it requires is a line added to the config and a reboot.

How To:

Find the APPLICATION definitions in bpq32.cfg

Take a new number (less than 32) that isnt already used by previous APPLICATION declerations

APPLICATION 6,MYCHAT,CHAT mychat

MYCHAT can be anything you specifically want.

That is all there is to it.

Additionally:

To make the application a node entry in the table for users to connect to, add a callsign, alias and netrom quality:

APPLICATION 6,MYCHAT,CHAT mychat,MYCALL,ALIAS,255