
	TST7P - A 7PLUS SERVER FOR USE WITH TSTHOST
        ============================================

 	TST7P Version 1.0h (c) 1994 John Agnew, Gi6IRL

Introduction
============

TST7P is a very simple 7plus server for use with the TSTHOST program from
Mario IK1GKJ. It was created to work with TSTHOST version 1.37, though it may 
work with earlier versions. As well as a copy of TSTHOST, TST7P requires a
copy of 7plus which supports the -J, -K, -X, and  -TB options. I have tested
TST7P will 7PLUS versions 2.10 and 2.15, previous versions may work. 
 
The 7plus program must be on your DOS PATH, otherwise the server will 
not work as expected !

Pleae note that this software is free for all to use in connection with 
Amateur Radio. Commercial use is expressly forbidden without permission 
from the author.

Please feel free to pass on copies of this software to other radio amateurs.

Installation
============

The program TST7P.EXE must be located in the PG (server) directory: 

e.g

	If TSTHOST is installed in C:\TSTHOST, then there must be a
	directory called C:\TSTHOST\PG, this is where TST7P must
	be located.

	C:\TSTHOST			- main TSTHOST directory
	C:\TSTHOST\PG			- server directory, TST7P.EXE, 
					  TST7P.HLP and TST7P.CFG go here.
	C:\TSTHOST\USERS		- PMS user access directory

If you want to make the server available to users who will mail requests
to your PMS, then you should also place a copy of TST7P.EXE in your main
TSTHOST directory. This will allow people to send a mail request as
follows:-

SP TST7P @ Gi6IRL	- TST7P specifies the server, Gi6IRL is the PMS
MYPROG.EXE @GB7XXX      - MYPROG.EXE is the program to encode, GB7XXX is where
                          the encoded program will be sent.
       		
When this mail arrives at the PMS, TSTHOST will detect that it is for a server
and will handle it appropriatly. 

In order for TSTSHOST to recognise the callsign TST7P as a server you should
add the following lines to your TSTHOST.CFG file:-

SERVER +TST7P

ULIST INTERFACE PMS

This will tell TSTHOST to treat any mail for TST7P as a server command, and
TSTHOST will deal with the mail appropriately. By setting the ULIST INTERFACE
to PMS mail from your HOMEBBS will be attached to your PMS thus any messages
for TST7P will enter the PMS and be handled correctly. This is only required if
you expect to receive mail requests from distant users i.e. not conected to 
the PMS.

Even though TST7P.EXE is located in the main TSTHOST directory the 
configuration file TSTHOST.CFG and TST7P.HLP must still be located in the 
PG directory below the main TSTHOST directory.

Note that you may need to arrange with your BBS SYSOP to allow mail that
is addressed to TST7P@Gi6IRL to be forwarded to your PMS if you want remote 
users to be able to mail requests to your PMS from a remote BBS.

Handling .ERR messages
======================

TST7P can automatically create a 7PLUS .COR file in response to a mail
message addressed to the server that contains a 7PLUS .ERR report.

The format of the error report messge  sent to the TST7P server must be:-

SP 7PSERV @ Gi6IRL                
7perror @ GB7XXx
 go_text. AMIBIOS.ERR
7PLUS error report: AMIBIOS.ZIP 00B 655
01
002 FFF
[1D50849B]
00
CRC C747
 stop_text.

Note that there must be no blank lines between the subject of the message
and the start of the 7PLUS error report. The error report must have a subject
line with the following format:-

	7perror [@ BBS]

The [@ BBS] instructs the server to forward the 7PLUS .COR file to the
specified BBS.

If the [@ BBS] is omitted, the 7PLUS .COR file created will remain in the PMS
and will not be forwarded via the HOMEBBS.

If the 7PLUS .COR file cannot be created for some reason, a message to that
effect will be sent to the user.

Help can be obtained by including the word "HELP" in the subject line as
follows:-

SP TST7P @ GI6IRL
HELP @ GB7XXX
Message body ignored.
/ex

This will send the contents of the file TST7P.HLP to the remote user at the
specified BBS. Since the TST7P.HLP is a plain ASCII text file, it can be
tailored to suit a particular individuals tastes.

Usage
=====

When a user logs onto your PMS they will be able to access the TST7P
7plus server like all of the other PMS commands. All they have to
do is type in the command "tst7p"  followed by the correct
options as follows:-

	TST7P file @BBS

e.g.

	TST7P myprog.exe @GB7XXX

This will look for a program called "myprog.exe" in the C:\TSTHOST\USERS
directory, encode the file with 7plus and address it to the user at
the BBS GB7XXX. The @BBS need not be specified, however if it is not 
specified the encoded mail will be left on the TSTHOST PMS, and will not
be forwarded.

If the file myprog.exe exists, it will be encoded and written into the
TSTHOST.IN file. This file is read by TSTHOST and imported into the
TSTHOST PMS. The messages written to the PMS can then be read by the
user or they can be left to be forwarded to the specified BBS when the
PMS next connects to forward mail. 

The user can get a list of files available for encoding and downloading
via 7PLUS if they use the PMS "W" command to see what is in the
c:\TSTHOST\USERS directory.

To let users know that you have this facility available you might
want to put a message into the TSTHOST.PGS file with a small
description of the server and what it does.

TSTHOST actually calls the program TST7P with the following parameters:

	TST7P CALLSIGN LEVEL FILE BBS

The CALLSIGN is the callsign of the user using the PMS, and the LEVEL
is a sequential number issued to PMS users by TSTHOST from 0 for the first
up to 255.

So if GI6IRL requests the file MYPROG.EXE to be delivered to @GB7XXX
TSTHOST will call TST7P as:

	TST7P GI6IRL 0 MYPROG.EXE  @GB7XXX

All the user needs to supply is the MYPROG.EXE and @GB7XXX i.e. via the
PMS interface they call the server as "TST7P MYPROG.EXE @GB7XXX". TSTHOST
automatically adds in the callsign and level.

The configuration file TST7P.CFG
=================================

The configurable options of TST7P are set in the file TST7P.CFG. This is a
plain ASCII text file and it can be edited with the DOS EDIT editor.
Currently the configurable options are:-

	MAXSIZE   - specifies the maximum size of a 7PLUS part the
		     default size is 4000 bytes.

	DEBUG      - turns on debugging which is off by default.

	USERDIR	   - this specifies the directory where the user
		     acessable files are kept. If it is not set it
		     will default to a directory caled "USERS" below the
		     main TSTHOST directory.

	MSG       - specifies a short message (less than 80 characters) that
                    will be appended to the end of each 7plus part.

MAXSIZE msut be set in the range between 1000 and 32000, otherwise the
7plus part size is set to the default size of 4000 bytes.  A 7plus
part size of around 4000 bytes is recommended in order to keep the message
size down.

USERDIR should be set to the same directory as USERDIR in the TSTHOST.CFG
file, otherwise the user will not be able to request files.

MSG should be a short message along the lines of "Send .ERR files to
Gi6IRL@GB7TED". Lines longer than 80 characters will cause unpredictable 
results !

Comments can be entered into the configuraiton file by putting a '#' in 
the first column of a line. Any line starting with a '#' is ignored.

Running TST7P locally
======================

TST7P can be run locally  from the C:\TSTHOST directory. This is useful for
testing and is called as follows:-

	.\pg\TST7P CALL LEVEL FILE @BBS

e.g.
	
	.\pg\TST7P Gi6IRL 0 MYPROG.EXE @GB7XXX

This can be used at the DOS prompt to ensure that all is working before you
allow this command to be used from your PMS. If all works, the file
MYPROG.EXE will be encoded by 7plus and placed in the TSTHOST.IN file. When
TSTHOST is started the contents of TSTHOST.IN will be read into the PMS.

Memory requirements
===================

Since TST7P must call 7PLUS.EXE in order to encode the file, you
should ensure that you have sufficient free memory to run 7PLUS if
you intend to use this server with the TSTHOST PMS. If you have expanded
memory then I recommend that you enable TSTHOST to use that (if you
have not done so already) as this will make more base memory available
for the server to use. Testing on my machine indicates that without using
Expanded memory, the server wil not be able to run 7PLUS and so encoding
will fail.

Bugs
====

As with all software there are bound to be problems that I have not
anticipated. Please send all problem reports/enhancement suggestions
to me at :-

Packet: Gi6IRL@GB7TED.#63.GBR.EU
or
Internet: johna@bfs.unibol.com [much faster :-)]
 

Version history
===============

1.0 Test release.

1.0a Include configuration file and a number of minor bug fixes.

1.0b Added USERDIR variable to configuration file. Added some informational
     messages to inform the user of what is happeninig.

1.0c TST7P can now read data from a file passed to it on the command line.
     This allows it to work as a server in the TSTHOST directory, so that
     mail addressed to TST7P @ Gi6IRL will be handled correctly.

1.0d Changes to some of the text in the log file and some minor code changes.
     If the file requested does not exist, a message to that effect is sent
     to the callsign that sent the request.

1.0e Added MSG option to configuration file to allow a short message to be
     included at the end of each 7PLUS part. Changed name of program to
     TST7P.EXE, to avoid clash with an exisiting program. Minor changes to
     the logging information. TST7P can now automatically create .COR files
     in response to a .ERR file addressed to the server.

1.0f Added the help option. Minor changes to logging information format.

1.0g Fixed bugs in sending help code. TST7P.HLP file now located in PG 
     subdirectory. Other minor bugs fixed.

1.0h Fixed problem with using C:\..... to reference the desired file.

Acknowledgements
================

Thanks to Alex, Gi4SFV for his assitance and patience in testing TST7P.
