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

Forwarding Mail to PE1RRR BBS

To configure PE1RRR BBS in your forwarding.

First Add a new User in the Users part

Location: Mail Mgmt (HTTP interface)->Users 

Create the new user by filling out the “NEW” field with PE1RRR and clicking ADD.

Then click on the list of callsigns on the left hand side, PE1RRR should be there. Click it and you will be shown an empty New User edit form.

Using the checkboxes, set the newly created user as:

  • BBS
  • Expert
  • Allow Sending Bulls

Fill out the H-ROUTE field for PE1RRR with the correct route as follows:

PE1RRR.#NBW.NLD.EURO

Next up is Forwarding

Location: Mail Mgmt->Forwarding

Select PE1RRR from the list, it will show all fields empty.

Fill out the BBS-HA field for PE1RRR with the correct route as follows:

PE1RRR.#NBW.NLD.EURO

Under the Hierarchical Routes (Flood Bulls):

NLD
EURO
WW

Note: Many, if not all of the above entries are gathered from the Global Aliases list below, the aliases won’t readdress the messages but they will help the system direct the flood-bulls to the correct delivery queues. You may add other bull “areas” that bulls are sent @<wherever> in your local system to this list above. I prefer to use the Global Aliases to keep this section relatively easy to read, having assigned most @XXX topics to a regional suffix.

Basic – Under HR (Personals and Directed Bulls):

#NBW.NLD.EURO
WW

Important: Be super careful not to add any blank white-spaces (invisible gaps) after these lines, make sure to backspace at the end of each line if you have copied and pasted from this page to be certain.

If your bulletins aren’t forwarding, this is probably one of the things to look out for.

Additional Advanced Routing

These are the routes currently available via PE1RRR.

Under HR (Personals and Directed Bulls), updated: 2021/07/11 append:


GBR.EURO
USA.NOAM
CAN.NOAM
DGL.IRL.EURO
NLD.EURO
ITA.EURO
PRT.EURO
KOU.FIN.EURO
#NE.NSW.AUS.AUNZ
#SYD.NSW.AUS.AUNZ
BA.ARG.SOAM
SAL.URY.SOAM
PAN.NOAM
SP.BRA.SOAM

Forwarding Options:

  • Enable Forwarding Interval (Secs): 3600
  • Request Reverse Interval (Secs) : 3600
  • Send new messages without waiting for poll timer [ON]
  • FBB Blocked [ON] Max Block: 10000
  • Allow Binary  [ON]
  • Use B1 Protocol [ON]
  • Use B2 Protocol [OFF]
  • Send ctrl/Z instead of /ex in text mode forwarding [OFF]

Connection Script

Inter-node routing

Preferable if you already have an AXUDP link with RIJEN.

The call-sign RIJEN:PE1RRR-7 or MATRIX:PE1RRR-3 MUST be in your node table for this to work.

C <axudp port> PE1RRR-7
C PE1RRR-3
ELSE
C RIJEN
C MATRIX
ELSE
C PE1RRR-7
BBS

Telnet/FBB Telnet

Contact pe1rrr[][]a[][]t[][]amsat.org for a login and password.

ATTACH <TELNET PORT= number from bpq32.cfg>
C <hostname will be provided> <port> .<username> <password>

Important: The “.” period before <username> is intentional and instructs the port to behave as a transparent connection after authentication. This allows binary to flow without breaking the “normal” telnet protocol.

Advanced: It is possible to combine both strategies to form a redundant backup route for mail forwarding using the ELSE statement to extend the Inter-Node routing script above to include telnet. Should the first two attempts across the nodes fail, it will try telnet.

C <port> PE1RRR-7
C PE1RRR-3
ELSE
C RIJEN
C MATRIX
ELSE
ATTACH <TELNET PORT= number from bpq32.cfg>
C <hostname will be provided> <port> .<username> <password>

Extras

Global Aliases

AMSAT:WW
ALLUS:NOAM
ALLCANADA:CAN
ALLMI:NOAM
ALLUSA:NOAM
ARL:WW
ARRL:WW
BRANET:SOAM
CALIF:NOAM
CANADA:CAN
DL:DEU
EU:EURO
GBR:WW
ITA:ITA
JAPAN:JPN
LATNET:SOAM
LUNET:SOAM
NLDNET:NLD
NLNET:NLD
SYSOP:WW
USBBS:NOAM
USA:NOAM
VKNET:AUNZ

BPQ32 Notes

Please note that this page is still under construction.

Commands

Throughout this document, the command PASSWORD is not a prompt to enter an actual password, it is a command that must be typed in order to gain sysop (administrator) access.

The < and > characters define an action, such as pressing enter, or substitution with a user input, depending what is between them.


RIGCONTROL no longer confined to PORT definitions – New RADIO definition.

As of 6.0.21.40* (*not quite exactly sure which)

The code is backward compatible, so you don’t need to change existing configuration. The new method allows you to define a rigcontol instance that isn’t associated with a port that allows rigcontrol – eg a KISS port that needs PTT via Serial or Hamlib.

Format is the same as with the old config, with RIGCONTROL replaced by RADIO n, where n is the interlock group, eg

RADIO 5 COM2 19200 PTTONLY HAMLIB=4534
RADIO 4
COM40 19200 ICOM IC7100 88
5,14.102,USB,VN
5,10.1473,USB,VN
****

Per-port CTEXT (Connect Text)

As of 6.0.21.21:

CTEXT is read from files, with names of format PortnCTEXT.txt, where n is the port number. So for port 4 the filename is Port4CTEXT.txt. These are read from the same directory as bpq32.cfg. They are read when BPQ starts but can be re-read using the Node command GETPORTCTEXT so you can change the text without starting the node. Remember that on Linux names are case sensitive.

The file is sent to the user as input without any format change. Some clients, such as Winlink Express, don’t treat the normal Linux line terminator of LF as a new line, so if you are running on Linux you are best off creating the files with an editor that can write the normal Windows line terminator CR LF.


Reloading AXIP Table

As of 6.0.20.1

Reload the AXIP/AXUDP configuration while the node is running, especially useful on linbpq where this is not an obvious option available.

PASSWORD <hit enter>
EXTRESTART <port number> 1

Reloading Telnet Port Users

As of 6.0.20.1

USERS: useful when adding new users to the telnet login system/BBS telnet mail forwarding.

ALL: Useful to reload the entire telnet port configuration without stopping the node.

PASSWORD <hit enter>
TELRECONFIG <telnet port number> USERS
Or
TELRECONFIG <telnet port number> ALL

Reloading APRS configuration

As of 6.0.20.1

PASSWORD <hit enter>
APRS RECONFIG

Delete All Nodes

Sometimes it’s necessary to kill an entire node table especially while experimenting and fine tuning links.

PASSWORD <hit enter>
NODE DEL ALL

If you wish to remove only one node, the command can take the callsign and SSID as a parameter

PASSWORD <hit enter>
NODE DEL <callsign-ssid>

Configuration

BPQ Telnet Mail Forward

Using the BPQ BBS Connect Script (accessed via the HTTP interface)

Location: Mail Mgmt->Forwarding

To FBB (note the period (.) before the username is intentional):

ATTACH <axip port number>
C <dns hostname or IP> <FBB port> .<username> <password>

To Other:

ATTACH <axip port number>
C <dns hostname or IP> <telnet port> <username> <password>

Connecting to a URONODE

URONODE apparently requires two different UDP ports- just remember to port forward whichever one becomes your incoming port on your ISP connected home router/gateway.

MAP <callsign(-ssid)> <hostname/IP> udp <outgoing port> SOURCEPORT <incoming port> B 

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:

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.

G8BPQ / John