
TFWIN is a DLL running under WIndows95 to interface a 32bits application 
with KISS or 6PACK tnc via a serial line.

The TFWIN32.DLL file must be reached via the system PATH. A good option 
is to put it in the WINDOWS directory.

Many parts of the code are from the TF23 for TNC2 of NORD><LINK


TFWIN is configured using a file named TFWIN.INI. This file MUST be in 
the WINDOWS directory.

This is an example of the file :

----

;
; File TFWIN.INI
;
; This file MUST be in the WINDOWS directory
;
; Configuration of TFWIN :
;
; Options (sum of) :
;           1   = KISS CheckSum
;           2   = KISS ACK (Checksum must be validated)
;           4   = KISS Polled (NOT YET IMPLEMENTED)
;           128 = Status beacon on the port every minute
;
; TFWIN needs DRSI like commands to configure the ports
;
; Type may be either KISS or 6PACK
; Address is the number of the TNC (KISS or 6PACK)
;            on KAM VHF is 0, HF is 1
;

[Port 0]
Type=KISS
Options=0
Baud=9600
Com=1
Enable=1
Address=0
Init=^M^[@K1^M

[Port 1]
Type=KISS
Options=0
Baud=9600
Com=1
Enable=1
Address=1

[Port 2]
Type=KISS
Options=0
Baud=9600
Com=3
Enable=0

[Port 3]
Type=KISS
Enable=0

----

Each line starting with a ";" is a comment file and will not be interpreted.

The file is divided in sections. Each section defines a different port. 
There can be up to 10 ports numbered from 0 to 9.

Each section header is in the form "[Port n]" where "n" is the number of 
the port to be defined from 0 to 9

Then in the section some "keyword=value" couples will define the options.

List of available keywords :

The following keywords are mandatory :

Enable=n
	Enables or not the port.
	n = 0 port is disabled
	n = 1 port is enabled

Type=xxxx 
	xxxx is the type of the interface and may be :
	KISS : The serial COM will interface a KISS TNC.
	6PACK : The serial COM will interface a 6PACK TNC.

The following keywords are not mandatory :

Option=n (default 0)
	n is the sum of different options :
	0    = Basic KISS
	1    = KISS CheckSum
	2    = KISS ACK (Works together with KISS Checksum)
	128 = Status beacon sent on the port every minute

Baud=nnnn  (default 9600)
	nnnn is the baudrate of the serial COM to the KISS TNC
	at least 9600 Bds is recommended.
	may be one of the values :
	1200, 2400, 4800, 9600, 19200, 38400, 56000, 115200

Com=n  (default 1)
	n is the number of the serial COM according with WINDOWS.
	may be a value between 1 and 10 (the COM port MUST exist in windows configuration).

Address=n  (default 0)
	Used for MULTIKISS.
	n = the address of the MULTIKISS TNC.

Dama=n  (default 0)
	Enables or not DAMA on the port.
	n = 0 DAMA is disabled
	n = 1 DAMA is enabled

Init=string (default empty)
	Send a string to the COM to initialize the TNC.
	Ex : ^M^[@K1^M
	Send <RETURN><ESC>@K1<RETURN> and then switches a TF23 eprom to KISS mode

----

TFWIN uses WA8DED protocol (including hostmode) for command.
The port configuration and selection is made using DRSI mode.

----

BOOLEAN FAR PASCAL _export TfClose(void)

ROLE : Close the TFWIN
PARAMETERS :
	None
RETURN VALUE :
	TRUE if TFWIN has been closed

----

BOOLEAN FAR PASCAL _export TfOpen(HWND hWnd)

ROLE : Open the TFWIN. 
PARAMETERS :
	- HWINDOW processing the messages.
RETURN VALUE :
	TRUE if TFWIN has been opened

----


int FAR PASCAL _export TfPut(char ch)

ROLE : Send one character to the TFWIN. 
PARAMETERS :
	- The character value.
RETURN VALUE :
	TRUE if the character has been queued

----

int FAR PASCAL _export TfGet(void)
PARAMETERS :
	- None.
RETURN VALUE :
	The character read if avalaible(0..255)
	-1 if no character is avalable

----

BOOLEAN FAR PASCAL _export TfChck(void)
PARAMETERS :
	- None.
RETURN VALUE :
	TRUE if a character is avalaible

----

73s,    Jean-Paul ROUBELAT F6FBB     http://www.f6fbb.org
