                   Pocket Packet for the Psion Series 3a
                   =====================================

PocPac is a split-screen packet TNC driver for the Psion Series 3a computer.
It was originally written as an exercise in using OPL on the RS232 port, but
has proved very useful as part of a portable packet outfit.  While the built
in COMMS application works well with TNCs, PocPac provides the split-screen
facility which is usual in PC packet programs.

PocPac is written entirely in OPL.  This means it does not run quite as fast
as it could, but is perfectly adequate for most packet radio applications.
I have not tried it with 9600 baud packet, but I run the RS232 side of my
KPC3 at 9600 all the time, any have not seen any data loss.

PocPac is a free program, and can be circulated by any means.  Please keep
all the files together in the original archive if you pass them on.


Memory Requirements

The program size is about 11k.
The memory required to run PocPac depends on the size of scrollback buffer
used, the approximate figures are:
                      12 pages      39 kbytes
                       6 pages      30 kbytes
                       0 pages      22 kbytes
When the buffer is being displayed, a further 10 kbytes is required.


Installation.

The following files should be unzipped from the archive:

PP.OPA        The main program file
PP.DBF        The configuration file
CAPTURE.ALS   A text editor alias for captured data
UPLOAD.ALS    As above, but for editing .TXT files for transmission
PP.PIC        An icon for incorporation in a .GRP file
PP.TXT        This file
PP_CFG.OPO    Configuration file creator/editor
       
Copy PP.OPA into the \APP\ directory on drive A, B or M.  Copy PP.DBF into
the \DAT\ on the internal drive.


You can customise PP.DBF using the Psion DATA application, or with the
program PP_CFG.OPO which is included in the PocPac archive:

Using DATA:
Highlight PP under the DATA icon on the system screen, and press return.
Some default values will already be filled in.  Press Psion-U and change
them to the values you require.  Then press TAB to save the new 
configuration, and Psion-K to compress the file.  Now press Psion-X to 
save the file.  

Using the configuration file editor, PP_CFG.OPO:
This can be placed in any \OPO\ directory, and it will appear under the
RunOpl icon.  Highlight it and run it.  It is self explanatory, so needs
no instructions (I hope!!).

(Note: if you remove PP.DBF, a new one will be generated when you next run
PocPac, however there will be no field labels)

The file structure is as below:

BaudRate     9600
Handshake    Rts/Cts
WordLength   8
Parity       None
CapturePath  LOC::M:\PP\
SendPath     LOC::M:\PP\
QuickConnect GB7WIR
Connect 1    G0HZK
etc., to
Connect 8    No Call
ScrollPages  7
FooterName   LOC::M:\PP\FOOTER.FUT
WordWrap     68
Font         Small
PW Prompt    GB7QRZ-0>
PW Table     abcdefghijk...........
Sound        Yes

The baudrate can be chosen from 1200, 1800, 2000, 2400, 3600, 4800, 7200
9600 and 19200.  I recommend 9600 with a normal 1200 baud TNC. The slower
you go, the longer it takes for your typing to appear when the channel is
busy, and you are just monitoring the traffic.  (My TNC won't go at 19200,
so I haven't tried that speed).

Handshake can be either Rts/Cts or Xon/Xoff.

WordLength can be either 7 or 8.

Parity can be None, Even, or Odd.  If 8 bit data is used, set parity to
None.  For 7 bit data, all three choices are available.

NOTE:  Rts/Cts, 8, and None are the best settings to use, especially if
7plus files are to be handled.

CapturePath is the directory you wish to capture data to.  The full path
should be entered as in the example, ending with a backslash "\".  This
path should preferably be on a RAM SSD or the internal drive.

SendPath is the directory PocPac first looks in when you wish to send a file.
This can be on any drive.  It can be the same as CapturePath if required.

Quickconnect is the callsign of the BBS you normally use.  When Psion-B
is pressed, PocPac issues a connect request to this call.  Up to 25 letters
are allowed, e.g. GB7QRT v GB7QRV-1

Connect 1 to Connect 8 are the callsigns of 8 stations which you can connect
to using PocPac Psion-C command.  If you do not use all 8, you can leave the
others blank.

Scrollpages is the number of pages of scrollback buffer you wish to allow.
0 (zero) disables scrollback if memory is low.  You can allocate up to 12
pages of 17 lines - depending on memory available.  12 pages allows you to
buffer 200 lines of text - normally enough!

FooterName is the full name and path to a footer file you may wish to append
to files you send.

WordWrap is the minimum number of charcters on a type-ahead line before 
PocPac will consider word-wrapping.  68 is OK for English users, those who
send text in languages with longer words may need to reduce this!

Font determines the font used for the receive window.  Set this to SMALL
for 14 lines, or TINY for 18 lines.

PW Prompt is the prompt sent by a F6FBB BBS when entering remote sysop
mode.  This looks like  GB7QRZ-0>   followed by five numbers.  Enter the
GB7QRZ-0> prompt here, up to 12 characters.

PW Table is the string used to convert the numbers received above, to
the letters to be sent to the BBS in reply.  The max string length is
128 letters here.  If you use the F6FBB  "SYS" command, you should
understand how it works!  I believe that some BBSs use the same system
for normal user access.

Sound signifies whether a connect 'alarm' is sounded.  It can be Yes or No.


You cannot change the configuration while running this version of PocPac.
When you are satisfied with the configuration set using DATA, you can
rename M:\DAT\PP.DBF  to  M:\DAT\PP.CFG
This will remove it from DATAs file list, but PocPac will still read it.
You can edit it again by pressing TAB when DATA files are highlighted, and
using the file selector to find PP.CFG.  You can also edit it with PP_CFG.

Note:  It is a good idea to compress PP.DBF or PP.CFG before leaving DATA.
       Use Psion-K.
       

Using PocPac

PocPac is installed to the system screen in the usual way, Psion-I.
You can also copy the ALS files to an \APP directory - the captured and
send files will appear under the icons.  You can use PocPac, the .ALS files
and, say 7plus (by Rovoreed) in a GROUP (see Psions User Guide).

Ensure that the configuration file is present and correct.  PocPac does not
check whether the directory M:\DAT\ is present, but if you have ever used
Psions DATA application, it should be there!  If the configuration file is
absent, PocPac will write one, then exit.  You should edit this in DATA,
or run PP_CFG.OPO before proceeding.

Highlight PocPac and press Enter.  If the 3-Link Serial lead is not plugged
in, you will be told so!  Plug it in first!
The 3-Link lead is normally connected to your TNC with a "null modem" type
lead.  This reverses the TxD and RxD lines, also the Rts and Cts lines.
Switch on your TNC and you should see the sign on message.  With some TNCs
you may need to press Enter a few times.
Set the TNC to "ECHO ON" if you wish to see your text echoed.

PocPac does not send any line feeds to the TNC, which does not require them.
Also it does not add them to incoming text.  Set "LFADD OFF" and "AUTOLF ON".
Check that the TNC filters out incoming line feeds, you may need to set
"LFSUP ON" to remove them.


Type-ahead.

PocPac uses a type-ahead buffer - text you type will appear in the lower
window and will not be sent to the TNC unless you either press ENTER, or
PocPac wordwraps.  Word wrap will occur when you press the space bar after
68 letters have been typed.  This threshold can be altered if desired.
If wordwrap occurs, a CR will be appended to the text sent to the TNC.  Some
BBSs cannot handle long lines of text.
If you press Control-C (for TNC Command Mode) this command bypasses the
type-ahead and goes straight to the TNC.

The last 5 lines sent (using ENTER) are saved, and can be recalled by 
pressing Up or DownArrow.  They can be edited and sent again if required.

Psion-Y deletes all you have typed on the current line.

You can edit the current line using the arrow and delete keys - you can alter
text anywhere in the current line.  HOME and END have their usual WP meaning.


Scrollback.

Press Pg Up to activate the scrollback windows.  You can then move between
the pages using UpArrow and DownArrow (or Pg Up and Pg Dn).  Press ESC to 
exit scrollback.
While you are viewing scrollback, you can still type into the type-ahead.
All letter keys and editing keys still work, as does ENTER.  Thus you can
view a list from a BBS and type the message numbers you wish to read.  When
you press ENTER, the line is sent, but scrollback is still active.  Press
ESC to return to the main window.
If you leave scrollback active for 2 minutes without doing anything, it will
cancel automatically.

Note scrollback eats memory.  While the data structure is allocated when you
run PocPac, opening the scrollback window uses more memory.  PocPac does NOT
check if there is enough, and may crash if there isn't!  Sorry!  If you set
the config file for more pages than memory can provide, scrollback will be
disabled, and you will be told.  To check if you have enough, press UpArrow
then the System button.  Press Psion-M at the system screen to see what is
left.


Sound, and Connect Status.

If the 'Sound' field in the configuration file contains YES,  the 'Fanfare'
alarm is sounded once when a connect is achieved.  The "OnLine" status
message will also appear when connected (If you are using a low RS232
baud rate, this may not always happen).  You may also get a beep if your
TNC is set to send a BELL character (Ctrl-G, or ASCII 7).  My KPC3 V5.1
doesn't do this even if RING is ON and FILTER is OFF, so I can't check
this!  On a disconnect, status becomes "OffLine".
You can substitute your own connect alarm for Psions fanfare.  Put the
sound file, named PP.WVE, into any \WVE directory.


Multitasking

PocPac should continue to capture data while running in the background.
The display will continue to update, even though you cannot see it.
Except when sending a file or when a dialog is displayed, all system,
keyboard, and serial IO handling is asynchronous.  Thus the program
effectively becomes quiescent when nothing is happening.

The Keys.

The following functions are provided:

Psion-T      Sets TNC time to Psion time (TNC must be in command mode)

Psion-L      Captures incoming text to a file.  This is saved to the 
             directory defined in CapturePath (see above).  If the directory
             is missing, PocPac will try to make it.  The file name, the
             current date (e.g. FEB29.CAP) is shown on the status line.
             If the file is already present, it will be appended to.
             This is a toggle.  A second press of Psion-L will stop text
             being captured.

Psion-S      Send a file with a .TXT extension.  The dialog which appears
             allows selection of a file from the SendPath directory.  You
             can press TAB to get the Psion file selector to send from a
             different directory - Note only .TXT files will be shown.
             
Psion-A      As above, but file mask *.* is used to allow any file to be
             selected.  The filename sent is shown on the status line during
             sending.  Note that there is an option here and with Psion-S
             to enable a Control-Z to be send at the end of the file, and
             for a footer file to be sent.  The footer path and name is 
             defined in the config file.
             
Psion-B      Issue a connect command to the QuickConnect Callsign.

Psion-C      Connect to one of eight stations configured.

Psion-E      View or edit the captured file.  If file capture is active, it
             will be closed first.
             
Psion-K      Kill editor.  If the editor was open, and you return to PocPac
             without closing it (e.g. via Psion-System) the status line may
             tell you the editor is still active.  If you re-open the 
             capture file (Psion-L above) the editor will be closed first
             automatically.

Psion-P      Decodes the 5 numbers received from a BBS into a password,
             and places them on the type-ahead line.  Press Enter to send
             the password.

Psion-X      Closes down PocPac.

Psion-Y      Deletes current type-ahead line.

Psion-Z      Toggles between Small and Tiny font.  Alas it clears the screen
             as well, but the scrollback buffer remains intact.
             
Help         Shows help screen.

Pg Up        Activates scrollback window.

UpArrow &
DownArrow    Recall last 5 lines sent to TNC.


Status Line

The status line gives some information about PocPac.  The first part of
the line is used to display the capture file name, or the current file
being sent.  The next box shows either "OnLine" or "OffLine", the former
if you have connected to a station.  The next part shows the RS232 baud
rate.  Then comes the RS232 settings: like 8N1R which means 8 bit word,
No parity, 1 stop bit and Rts/Cts handshaking.  The number following W 
in the next box is the column after which the word wrap can occur.  The
number following P in the next box is the number of scrollback pages.
Next is the Capture drive letter, e.g. A, followed by the bytes remaining
on that drive.  Finally the current time, as set by the Psion clock.

Registration

There is no charge for using PocPac, but I would be grateful if users send
me a message by packet, internet, or post, telling me that they are using
the program.  Let me know the date on the HELP screen, so I can send updates
via packet (7plus) or internet mail (UUCode).  Your details will not be 
passed on to any commercial interest.

Registrations, bug reports, wishlists, etc. to:-

Roger Muggleton, G0HZK @ GB7WIR
       Internet: hzk@cix.compulink.co.uk
       Post - I am Qthr.


UPDATES
=======

22nd February, 1995

Improved type-ahead recall function.


4th March, 1995

Extra error trapping when config file read failed.


25th March, 1995.  V3.06

Sysop password facility added.
PP_CFG.OPO included to simplify config file setting.
Paths for Send and Capture checked - If the former is absent, PP defaults
to M:\ instead of crashing (thanks HB9BOT).


31st March, 1995.  V3.07

Options for 7 bit data, with Odd, Even or No parity added.
Status line changed to show above.
PP.DBF changed to accomodate above.


7th May, 1995.  V3.09

Connect 'alarm' added.
"OnLine" status added.
Spelling mistake corrected.
Extra field 'Sound' added to PP.DBF


4th June, 1995

Scrollback bug hopefully fixed!
Should no longer miss the odd line at start of buffer.
