Home

Overview

Installation

TbredComm: Remote Host Connections

WorkStation Mgr

Desktop Application Menus

Graphical Mode

Graphical Screens

Graphical Screen Designer

International Applications

TS ReportServer

Graphical Screen Converter

FAQ

TbredComm: Remote Host Connections

| TCP/IP Connections | TCP/IP Autologon | Serial Connections | TbredComm Command Arguments | TbredComm Timeouts | TbredComm Autologon Scripts | Character Translations |

VIP no longer relies on DynaComm for communication and Terminal Emulation. TbredComm (Tbredcom.exe) replaces both of these operations. It uses a Color ANSI terminal emulation. The 8.41 Environment installed a new Basic terminal table into TCONFIGW, TBREDCON. You must use this terminal table when using TbredComm.

TbredComm supports connecting to any TCP/IP host by specifying a host name defined in your windows Hosts file, an IP address, or using the Autologons defined and maintained by the WorkStation Manager. TbredComm also supports serial connections. This can be achieved either through a direct connection or through a modem connection.

Connect - TCP/IP Host

Start Tbredcom.exe by selecting VIP from your Windows Start button and then selecting TbredComm. From the TbredComm Communication Server Window select the Connect option from the menu bar, then select Connect - TCP/IP Host. The host selection dialog will prompt you to enter either the Host IP address or the Host name. Click on the list box button to select from a list of prior TCP/IP connections. Note: If you enter the Host name, that name must be configured in your windows host file.

Connect - Autologon

Start Tbredcom.exe by selecting VIP from your Windows Start button and then selecting TbredComm. From the TbredComm Communication Server Window select the Connect option from the menu bar, then select Connect - Autologon. The host connect dialog will prompt you to select from a list of Autologons.

Autologons and login scripts can be defined in the WorkStation Manager, eliminating the host selection dialog. These are the Autologons also used by the WorkStation Manager when selecting a application menu item from the workstation; the Windows Start Menu, Desktop or from the WorkStation Manager.

Serial Connections

Start Tbredcom.exe by selecting VIP from your Windows Start button and then selecting TbredComm. From the TbredComm Communication Server Window select the Connect option from the menu bar, then select Connect - Direct Line or Modem. The Serial Port Configurations dialog will be displayed. From this dialog you have the ability to define multiple configurations controlling both the COM Settings and the Modem Settings.

To Add a new configuration click on the Add New button. A default configuration called New Connection will be displayed. Type over the Selection name to enter an appropriate configuration name and make all other appropriate changes, then click on the Apply Changes button to save the configuration. If you enable Modem connection, the Modem Settings will be enabled and any necessary changes can be made in that section of the dialog.

To make a connection, highlight the desired Selection and then click on the Connect button.

The Serial Port Configuration dialog contains the following:

COM Settings:

Selection, (configuration name), Port, Baud Rate, Data Bits, Parity, Stop Bits, Flow (RTS/CTS, DTR/DSR, XON/XOFF), Connect (Direct or Modem).

Modem Setting:

Phone number, Modem Setup String, Modem Hang Up String

Command Arguments

The following is from an internal document describing the TbredComm command arguments.

There are several TbredComm command line arguments available. Most of them should never be supplied on the command line in a shortcut as they are used to communicate startup specifications when TbredComm is started by the WorkStation Manager. The list of command line arguments and their use follow:

-T Terminal emulation window

-TF Same as -T except terminal emulation text goes to terminal window even if GUI has focus. Only valid with the -D option.

-D Show the communication window and it's traffic. Also implies TbredComm is to run in debug mode. In debug mode the parent window is maximized and the terminal emulation window and the communication window are child windows. Also, if an Autologon fails while TbredComm is in debug mode it will automatically show the Autologon trace. See below for some additional information regarding the -D argument.

-H Handle to the workstation manager. Used with the –K option below.

-L Number of seconds to wait for an Autologon to complete. The default is set to 30 seconds.

-I Seconds between idle loop checks. Default is 10 seconds

-A Key to Autologon section in TBRED.INI. May be used with Autologon when -T specified.

-K Hotkey (also known as the host menu selection) to start host with. Implies started by the workstation manager. If the hotkey is prefixed ‘c’ the host will start the application in character mode. If the hotkey is preceded with ‘v’, the host will start the application in GUI mode.

-C Specifies offset position to create the TbredComm window. The workstation manager will set this option as "-C n" where ‘n’ is the number of TbredComm’s started. TbredComm uses the ‘n’ number to offset the main TbredComm window such that one TbredComm window doesn’t obscure another TbredComm window. That is, the TbredComm windows cascade.

-O Origin of invocation. "-O ACC" if the application is started off the desktop.

The following is an excerpt from an internal document describing additional functionality added to the -D argument.

A file named TbredcomTrace.txt is created in <installpath>/Temp that captures characters sent and received to the host. This file is only created after the script completes and therefore should not compromise the user name or password. HOWEVER, if Tbredcom is started without the –A argument, this trace file will capture the user name and password sent to the host.

If the "-A" argument is supplied, a special logon trace file is also created. This trace file is created in <installpath>/Temp and named "LGN…". If the script fails to complete because of a timeout, Tbredcom will invoke Notepad to display the contents of a trace file. The trace file is only created in debug mode, and is automatically deleted when Tbredcom exits. The trace only shows characters received from the host in order not to compromise the user name or password.

When the autologon sequence begins (and only if an autologon sequence is being played) TbredComm will record the characters sent to the host and the characters received from the host. The characters are saved in file named using the current date and time. The format of the file name is: "LogYYYYMMDDHHMMSS.txt"

This should not cause a conflict as long as two Tbredcoms don't start within the same second. The file is written to <installpath>/Temp and is ALWAYS deleted when TbredComm exits.

If the username and password are bad or the logon fails for some other reason or if the host fails to send the AppPrompt, TbredComm will remain active long enough for a developer to open the trace and look at it. When TbredComm exits, the trace file will remain because it will be busy. On the other hand, if no developer is around, the trace is removed when TbredComm exits. If TbredComm is started with the "-D" option, and the autologon fails, TbredComm will automatically start Notepad and show the user the contents of the trace file. There is probably a better way to do this. Note.. this trace has nothing to do with the TbredcomTrace.txt file that is created if the "-D" option is supplied. That trace file and it's functionality remain in-tact.

This TbredComm also checks to see if it's started with a Control-P value (hot key, also known as the menu selection). If the hot key implies character mode (hot key starts with 'c'), the terminal emulation window appears as normal. However, if the hot key implies the application is GUI (hot key starts with 'v'), TbredComm will not show it's terminal emulation window. The user will receive notification messages as to the progress of connecting, logging on, and starting Vip4. Without these prompts on a slow connection, it's appears to the user nothing is happening. This makes for a much cleaner startup, no flashing windows.

Autologon Timeouts

Every automatic logon has the possibility of timing out. If a timeout occurs during the execution of the logon script, Tbredcom will exit. The default timeout period is 120 seconds (2 minutes). This default can be overridden in one of two ways: (1) Use of the "-L" command line argument, or (2) Indicating a timeout value in the autologon configuration. The Workstation Manager allows a timeout to be associated with an autologon configuration. The timeout value is communicated to Tbredcom by the "timeout=" tag in the INI file entry for the autologon configuration.

The "-L" argument is currently used only when the user builds the Tbredcom run command and specifies the "-L" command line argument on the command line. The "-L" argument overrides the default timeout of 120 seconds and overrides any value that may have been specified in the autologon configuration by the Workstation Manager.

If a timeout occurs and Tbredcom is not in debug mode, Tbredcom will exit after presenting a message indicating the automatic logon has failed.

If  Tbredcom is in debug mode and a timeout occurs, Tbredcom will still exit, but will invoke Notepad to show the user the contents of the autologon trace file. The autologon trace file is only created when Tbredcom is in debug mode and an autologon script is active. The trace file only shows text received by the host, never text that was sent to the host. This prevents compromising the values of the user name and password.

 

Autologon Scripts

The following is from an internal document describing the TbredComm script file commands.

Script File Commands

Each autologon configuration must be associated with a script file. The only exception is if the older (beta) autologon tags are in the INI file. The Workstation Manager’s option tab allows users to pick a script file for an autologon configuration. Script files are simple ASCII text files that may be maintained with Notepad or any text file editor. The script commands are listed below. Each command is shown using in the following syntax notation:

Square brackets indicate an option item, i.e. [ ok-label ]

Braces indicate that one of the enclosed items is required. A vertical line separates the items.

{ varname | string }

A string is defined as sequence text characters that may contain embedded spaces. Stings are not enclosed in quotes except in the input command when a string must be enclosed in double quotes (") or single quotes (‘).

A varname is a variable name that can be from 2 to 8 characters that must begin with a ‘$’

The commands currently supported include:

:label   Serves to label a script command. See the input and goto commands below.

waitfor { varname | string }  When the script engine sees this command it waits for the string specified or the string contained in the variable name to arrive from the host. The command will wait until either the overall autologon timeout occurs (see "Tbredcom Command Line Arguments" below) or the host issues a timeout and disconnects.

send { varname | string }  The script engine sends the string or contents of the variable name to the host. The following variable names are always known to the script engine:

$cr   carriage return

$username  Contents of the "User Name" edit box in the autologon configuration

$wusername Contents of the Windows 95 or NT 4.0 user name.

$password  Contents of the "Password" edit box in the autologon configuration

NOTE – If a script command references $username or $password, and the variable contains an empty string, the script engine will automatically issue an "inputpw" command to allow the user to supply a value.

input varname "string" [ cancel-label [ ok-label ] ]  The script engine will present a dialog box for the user to key a string into. The string keyed by the user is placed in the variable name supplied. The string supplied is used as a prompt and must be enclosed in double quotes or single quotes. The dialog box contains both an OK button and a CANCEL button. If the user presses OK, the script continues at the label specified by ok-label if the ok-label is supplied, otherwise the script continues with the next command in sequence. If the user presses CANCEL, the script continues at the script command after the cancel-label. In order to specify an ok-label, the cancel-label must also be supplied.

inputw varname "string" [ cancel-label [ ok-label ] ]  This command is identical to the input commands above, except the string keyed by the user is echoed as asterisks (*).

set varname string Sets a variable name to contain the string.

goto :label  The next command to execute is the command following the line with the <:label> command.

pause seconds Pause execution for specified number of seconds.

quit  Stops execution of the script.

abort  Stops execution of Tbredcom immediately

 When Script Commands are Executed

Scripts commands are not executed immediately until a send or waitfor command is encountered. Tbredcom will wait for a successful connection to the remote host before executing a send or waitfor command. For example, this sequence:

input $user "Enter user name"

send $cr

waitfor login

send $user

will prompt for the $user variable immediately when Tbredcom starts, but the ‘send $cr’ command will not execute until the remote host is connected. Where as the sequence:

send $cr

input $user "Enter user name"

waitfor login

send $user

will wait until the remote host is connected before the script executes because the first script command is ‘send $cr’.

Sample Scripts

Example 1. The generated script, TBDefaultLoginPassword.tcl, follows. This script is generated and used if the loginPrompt and passwordPrompt tags for an automatic logon are found in the AUTOLOGON configuration section, but no script file is provided. This feature allows Tbredcom to be backward compatible with AUTOLOGON configurations created prior to scripting.

waitfor login:

send $username$cr

waitfor Password:

send $password$cr

Example 2. The generated script, TBAppPromptCmd.tcl, follows. This script is generated and used if no script file is specified and the tags loginPrompt, passwordPrompt, appPrompt and appCmd for an automatic logon are found in the AUTOLOGON configuration section. This feature allows Tbredcom to be backward compatible with AUTOLOGON configurations created prior to scripting.

waitfor login:

send $username$cr

waitfor Password:

send $password$cr

waitfor $appprompt

send $appcmd $cr

Example 3. The following script will prompt for a username and password, regardless if the username and password are defined in the autologon configuration. If the user presses cancel at either prompt, the script is terminated and a manual login is allowed.

waitfor login:

input 'Enter user name' $u sendnull

send $u$cr

waitfor Password:

input 'Enter password' $p sendnull

send $p$cr

goto exit

:sendnull

send $cr

:exit

quit

Example 4.  The following script will prompt for a username and password, regardless if the username and password are defined in the autologon configuration. If the user presses cancel at either prompt, Tbredcom is terminated.

waitfor login:

input 'Enter user name' $u abortnow

send $u$cr

waitfor Password:

input 'Enter password' $p abortnow

send $p$cr

goto exit

:abortnow

abort

:exit

quit

Example 5.  The following script will use the Windows ’95 or NT 4.0 user name and prompt the user for a password. If the user presses cancel at the password prompt, Tbredcom is terminated.

 waitfor login:

send $wusername$cr

waitfor Password:

input 'Enter password' $p abortnow

send $p$cr

goto exit

:abortnow

abort

:exit

quit

Character Translations

For translating international character sets please see International, Character Translations.