Only for WinFBB32.
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. The TFWIN.INI must be edited to match the comport configuration ie port speed etc. TFWIN.INI can also define things like txdelay for hf or highspeed ports. It is possible to program most of the PORT specific parameters in a INITTNCn.SYS (first TFWIN port) with "DRSI-like" P line (look at the FBB doc for DRSI). 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 This is my port.sys for TfWin DLL... Think that Multch (as usual) must match with the port number of TFWIN.INI The TFWIN.INI is using COM1 as "port 0 (MultCh 0)" As it is a Windows application, the com1 MUST be known (and available) from Windows ! # FBB7.00 # File for programming of channels and TNCs. # # Ports : How many ports (COM1, COM2, Etc...) # TNCs : How many TNCs and modems in use. With multiplexer # there can be up to 4 TNCs per port. # #Ports TNCs 1 1 # #In WinFBB ONLY THESE interfaces are available: # Interface : 2 = BPQ-node (BPQ in AA4RE-mode) # 4 = DRSI # 5 = TFPCR/TFPCX interface. Interrupt MUST be 0xFD or the same # as stated in INIT.SRV, if any.. # 6 = Windows-driver, replaces both ESS, ESSKAM and FBBIOS. # 7 = TCP/IP. Needs WINSOCK.DLL. Put port-address as 17. # TNC-emulation is T (see below) # 8 = TFWin.dll # BEWARE: The old interface 1 and 3 will NOT be used in WinFBB. Interface 6 # replaces both. (FBBCOMM.DRV). Neither ESS nor FBBIOS can be # used with WinFBB ! # #In LinFBB ONLY this interface is available: # Interface 9 = Linux. Can work via serial port (D),via AX25 domain # socket (X) or via Telnet port (T). # #In DosFBB ONLY THESE interfaces are available: # Interface : 1 = Use external COMBIOS-driver (MBBIOS, ESS etc) # 2 = BPQ-node v 4.05 and up (BPQ in AA4RE-mode) # 3 = Telephone-modem with FBBIOS # 4 = DRSI card with driver # 5 = TFPCR/TFPCX interface. Interrupt MUST be 0xFD or the same # as stated in INIT.SRV, if any.. # # Address : Address of port in hexadecimal (Needed for multiplexer). # In LinFBB: # Address is the device name (/dev/cua0). # Be sure you have the rights to access to the device (rw-rw-rw-). # When using kernel AF_AX25 socket, address is not used. # When using Telnet, address is the Telnet port in Hex (Hex 17 = Telnet port 23) # Baud : Ports baud rate. Ignored by BPQ, kernel AF_AX25 socket and Telnet. # # Use same number of lines as number of ports. # #Com Interface Address (device) Baud 1 8 3f8 9600 # # TNC : Number on TNC in use. Use 0 for file-forward ! # NbCh : Number of channels I want to use in the TNC. # Maximum available channels depend on firmware. # Com : Number of the COM-port. Com1, Com2 etc. # MultCh : Number of channel if port-multiplexer is used, otherwise 1. # In DRSI use values from 0 to 7, by KAM use 1/VHF and 2/HF. # When using kernel AF_AX25 socket in Linux, MultCh is the # interface name (eg: ax0) # Paclen : PACLEN on this TNC. # Maxframe: The maximum nb of frames the TNC will send at a time. # NbFwd : Number of channels for OUTGOING forward at same time. # MxBloc : Size of forward-block in kb. # M/P-Fwd : Minute of the hour for start of forward, and period # (how many minutes between each forward-start). # Port mode, one of these: # B : BBS-mode. # G : "Guest"-mode. # U : Normal-mode. # Type host-mode, one of these: # D : WA8DED # K : KAM hostmode. Must use ESSKAM driver. # P : PK-232 # Q : BPQ v 4.x # T : Ethernet/TCP-IP # X : AX25 domain socket (for Linux) # Addition: One or more of these letters can be used too: # L : Send unproto beacon after each arriving mail. # M : Telephone-modem. # Y : Yapp allowed on this QRG. # W : Gateway allowed TO this QRG. # R : Modem port allowed in Read-only mode. # Freq. : Text to describe this port (max 9 characters, no space) # # Same number of lines as TNCs: # #TNC NbCh Com MultCh Pacln Maxfr NbFwd MxBloc M/P-Fwd Mode Freq 0 0 0 0 0 0 0 0 00/01 ---- File-fwd. 1 7 1 0 230 4 1 10 30/60 DUWY 433.650 # # Special callsigns and modes for some channels. # #TNC Nbs Callsign-SSID Mode #1 1 LA1B-1 B # # End of file. # ---- 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