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