The text of a manual · part 16 of 37
Native Terminal Emulation Programmer's Guide: Chapter 4: Customizing Your Configuration, pages 123 to 131
Pages 123 to 131 of 340, from Native Terminal Emulation Programmer's Guide
The original document is the PDF (2.9 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the Intermec 2435
Page 123
4
Customizing Your Configuration
This chapter describes the procedures you can use to customize the standard Native TE program by Intermec Technologies Corporation. You customize the TE program by creating or modifying configuration files, and then downloading them to your terminal to do the following: S Use the auto-login feature to send the same login information each time you login to the host (page 104). S Create a custom parameter set-up file to download a customized file to all terminals so they have the same setup information (page 112). S Change the text of TE configuration menus or system messages (page 140). S Preinitialize the Native TE program (page 141). S Remap national characters (page 147). S Substitute national characters (page 148).
Native Terminal Emulation Programmer’s Guide
103
Page 124
Chapter 4, Customizing Your Configuration
Using the Auto-Login Feature Use the auto-login feature to send the same login information each time you login to the host. When you start the TE application, the terminal checks for an auto-login script file. If a script file exists, the terminal runs the login commands from the auto-login script file before the TE program starts. To use the auto-login feature, you need to develop an auto-login script file and load the auto-login script file on the terminal. These steps are covered on the following pages along with a list of the necessary control characters and the procedure for disabling the auto-login feature.
Developing Auto-Login Script Files A typical auto-login script file consists of Input and InputHidden commands followed by a HostName command, followed by a series of WaitFor and Send commands. A very simple script file may not have any input commands if all of the terminals are using the same account. Note: The auto-login script must be an ASCII text file with AUTOLOG.SCR as the required file name or the file will not be processed.
Commands You can use several commands to create auto-login script files. All commands are case-sensitive. For example, WaitFor is a command, but Waitfor is not a valid command. For examples of script files, see “Sample Auto-Login Script Files” on page 109. S Input This is called with two parameters. The first one is a character string enclosed in quotes used as a prompt to the user. The second one is a string variable name indicating where the text string will be stored. S InputHidden Same as the Input script command except that user input is echoed as a string of asterisks. S HostName This command is case-sensitive and must be presented as mixed-case letters. HostName is followed by a character string enclosed in quotes. The character string can be a host name or an asterisk. The HostName command acts as an IF clause. If the host name matches, the following section of the script file is executed up to the next HostName command. If an asterisk is used, it matches any host name. S WaitFor Wait for a list of up to ten strings. The strings must be enclosed in quotes and must be separated by a comma. The strings cannot exceed 20 characters in length. S Send This command sends a character string enclosed in quotes or a string variable to the host. The character string enclosed in quotes can have embedded IBM mnemonics in Native TE.
104
Native Terminal Emulation Programmer’s Guide
Page 125
Chapter 4, Customizing Your Configuration
S Pause “xxxxx” Delays the terminal for x milliseconds, halts terminal operation from receiving and processing for the duration specified. S PromptSessionStart This command is a predefined variable. If this variable is defined and set to any value other than 0, the application prompts the user to press [Enter] before starting a Telnet session with the host. Do not put quotes around the variable. S Restart “x” Restarts the autologin script file. The “x” is a dummy argument. S Keyboard “0” Disables the keyboard. Key presses are ignored. For additional information, see Note below. S Keyboard “1” Enables the keyboard. Key presses are processed. The keyboard is enabled by default. For additional information, see Note below. S # (pound symbol) Documents the script file. Text following a # (pound) symbol is considered a comment unless the # symbol is in a quoted string. Note: Input the Keyboard “0” or Keyboard “1” command into the autologin script file after the PromptSessionStart command (if present) and the HostName command (if present). Also turn on the keyboard command before another HostName command is found in the file.
Search Strings Some auto-login search string limitations are as follows. You can use line wrapping to look for unique strings. S The searches are case sensitive. S The maximum search string length is 20 characters. S Each WaitFor command searches the entire screen from the top. If a screen from the host has multiples of the word you are looking for, you can use the preceding spaces to identify a unique string.
Example If the screen sent to the terminal is: Linux rlogin 2.4.6 login The autologin script would be: PromptSessionStart=1 HostName “*” #wait for host login screen and send login and password WaitFor “login” Send “billy<ENTER>” WaitFor “password” Send “letmein<ENTER>” In this example, you can search for the three leading spaces from the end of the previous line to make a unique search string.
Native Terminal Emulation Programmer’s Guide
105
Page 126
Chapter 4, Customizing Your Configuration
Control Characters You can include control characters in your auto-login script file. The control character must be enclosed by < > (angle brackets) in AUTOLOG.SCR. The following table lists control characters for Native TE. Note: Some control characters may be represented by their hexadecimal values. For a description of control characters and hexadecimal equivalents, see the full tables in Appendix C, “Terminal Font Set Table.” Control Characters for Auto-Login Script File Control Character
Definition
Control Character
Definition
<CLEAR>
Clear
<F1> – <F4>
Function keys
<CR>
Carriage return
<HOME>
Home
<CUR_DN>
Cursor down
<INS>
Insert
<CUR_LF>
Cursor Left
<LTAB>
Left Tab
<CUR_RT>
Cursor Right
<NEWLN>
New Line
<CUR_UP>
Cursor Up
<RESET>
Error reset
<DEL>
Delete
<RTAB>
Right Tab
<ERS_EOF>
Erase EOF
<SPACE>
Space
Loading the Auto-Login Script File Follow these procedures to download an auto-login script file to your terminal. The method depends on the type of terminal you are using.
2415, 2425, 2435A, 2455, 2475, 248X Terminals You can download more than one script file to a 2415, 2425, 2435A, 2455, 2475, or 248X Terminal, but immediately name the file to use as AUTOLOG.SCR and name any other script files with different names ending with .SCR. To learn more about transferring files, refer to your terminal’s user manual. Use one of the following download utilities to copy your completed AUTOLOG.SCR file to the terminal.
Using Serial Port to Download File 1 Connect the terminal to the development personal computer or host. For help, refer to your terminal’s user manual or your accessory documentation. 2 Load the AUTOLOG.SCR file into drive C, where the TE application is stored. For help, refer to your terminal’s user manual. 3 Use T24XCOPY.EXE (from the developer’s kit) to copy the file directly to drive C: on the terminal; or use LOADER.EXE (from the flash upgrade) to copy the file to the terminal in flash mode using the following command: loader AUTOLOG.SCR
106
Native Terminal Emulation Programmer’s Guide
Page 127
Chapter 4, Customizing Your Configuration
Using RF Communications to Download File Note: Loading the AUTOLOG.SCR file from the DCS 300 is supported. 1 Copy the AUTOLOG.SCR file to the DCS 300. 2 Configure the download server on the DCS 300 to send AUTOLOG.SCR to the terminals in groups of 10 or less. 3 Start the download. When you reset your terminal, it clears the auto-login information, such as the password and user’s name. You can cancel the auto-login process by pressing any key during the auto-login sequence. When a host session is broken, you can restart the auto-login sequence by rebooting your terminal.
6400, 5055 Terminals Use INTERLNK/INTERSVR communications to connect your terminal to a personal computer. For help, see “Downloading Files” on page 151. You must load AUTOLOG.SCR into drive C, where the TE application is stored.
59XX, 17XX, 11XX Terminals The download process requires flash and utility files. 1 Using FLSHCONV.EXE from the TOOLS.EXE file from the flash program, append the AUTOLOG.SCR file to the end of the .HEX program. Below are sample command lines for each terminal type: S 11XX Terminal with 256K flash (this uses 1180, but applies to all radio types): flshconv –eC000 –a fwp118c0.hex AUTOLOG.scr –oNEW1180.HEX
S 11XX Terminal with 512K flash (this uses 1180, but applies to all radio types): flshconv –eFFC0 –a fwp118h0.hex AUTOLOG.scr –oNEW1180.HEX
S 17XX Terminal (example uses 1780, but applies to all radio types); flshconv –eFFC0 –a fwp178h0.hex AUTOLOG.scr –oNEW1780.HEX
S 59XX Terminal (example uses 5980, but applies to all radio types): flshconv –eE000 –a fwp598h0.hex AUTOLOG.scr –oNEW5980.HEX
2 Using PROGDUX.EXE from the flash files, load the NEW.HEX file onto the terminal. Below is a sample command line using the 1780 Terminal: PROGDUX –e NEW178H0.HEX
Native Terminal Emulation Programmer’s Guide
107
Page 128
Chapter 4, Customizing Your Configuration
Disabling the Auto-Login Feature To disable auto-login, you may rename or delete the AUTOLOG.SCR file. Renaming the file ensures that you can use the same auto-login script file later by changing the name back to AUTOLOG.SCR. If you want to enable a new script file, you can use the instructions in this section to rename a different script file to AUTOLOG.SCR. Follow these procedures to disable (or delete) the auto-login script file. The method depends on the type of terminal you are using.
2415, 2425, 2435A, 2455, 2475, 248X Terminals 1 Press the appropriate key sequence or scan the following bar code to access the TRAKKER AntaresR 2400 Menu System’s Main Menu: Enter Test and Service Mode
*../M.* *..-.*
2 Choose System Menu and then choose File Manager. 3 Select drive C. Press Y or B to highlight AUTOLOG.SCR. 4 Press [FnL .] to delete the file or press [F7] to rename the file. 5 Exit the TRAKKER Antares 2400 Menu System to return to your current TE session. Restart the TE application to use TE without the autologin. You can also rename the auto-login script file from your host. For help, refer to your terminal’s user manual.
6400, 5055 Terminals 1 Reboot the terminal to a DOS prompt. S For the 6400 Computer: press and hold the yellow, blue, and both green enter keys until the terminal resets. Watch the screen as the terminal boots and press 0 (zero) when the prompt appears. S For the 5055 Data Collection PC: power-cycle the terminal and select the minimum DOS prompt from the boot menu. 2 Rename or delete the AUTOLOG.SCR file. 3 Reboot the terminal again and allow it to complete the boot into terminal emulation.
59XX, 17XX, 11XX Terminals To disable auto-login on a 59XX, 17XX, or 11XX Terminal, reload the terminal with unmodified flash, then perform a cold start to flush the memory. The flash file does not allow selective erasing; files can be added, but not removed without removing all files.
108
Native Terminal Emulation Programmer’s Guide
Page 129
Chapter 4, Customizing Your Configuration
Sample Auto-Login Script Files You can use these sample script files as they are or as the starting point for creating your own auto-login script files.
Example 1 Auto-Login With All Terminals Using the Same Account HostName “*” WaitFor “login:” Send “user_name<CR>” WaitFor “Password:” Send “letmein<CR>”
#Use this to log into any host #Wait for the login prompt #Send the user name #Wait for the password prompt #Send the password
S The HostName command matches the host the user accesses. S The WaitFor command waits for a string to be displayed by the host. WaitFor takes up to 10 strings, 20 characters long. The strings must be enclosed in quotes and separated by a comma. S The first Send command sends a fixed user name. The second Send command sends a fixed password. S Angle brackets < and > can enclose uppercase mnemonics or hexadecimal values.
Example 2 Auto-Login With Different User Names and Passwords Input “Enter user name”, username InputHidden “Enter password”, password HostName “*” WaitFor “login:” Send user_name Send “<CR>” WaitFor “Password:” prompt Send password Send “<CR>”
#Prompt for user name #Prompt for password #Wait for login prompt #Send the user name #Send a carriage return #Wait for password #Send the users password #Send a carriage return
S The Input and Send commands use input variables. Input commands require a prompt string followed by a comma and a variable name in which to store the string. S The InputHidden command will display “*” in place of any characters the user types. All Input commands must be before the first HostName command. S The Send command only accepts a single argument, so you need two Send commands to send the user name and a carriage return.
Native Terminal Emulation Programmer’s Guide
109
Page 130
Chapter 4, Customizing Your Configuration
Example 3 Auto-Login to an Application
Input “Enter user name”, username InputHidden ”Enter Password”, password HostName “*” WaitFor “login:” Send username WaitFor “<CR>” WaitFor “Password:” Send password Send “<CR>” WaitFor “Main Menu” Send “3” Send “<CR>” WaitFor “Wip Menu” Send “1” Send “<CR>”
#Prompt for user name #Prompt for password #Wait for login prompt #Send the user name #Send a carriage return #Wait for password prompt #Send the users password #Send a carriage return #Wait for the main menu #Pick option 3 from menu #Await work-in-process menu #Pick option 1 from menu
S Example 3 modifies the script file in Example 2. The additional modification (which starts with WaitFor “Main Menu”) allows you to move automatically to an application after logging in.
Example 4 Auto-Login With Variable Processing
Input “Enter user name”, username InputHidden “Enter Password”, password HostName “BigHost” WaitFor “User:” Send username Send “<CR>” WaitFor “Password:” Send password Send “<CR>” HostName “*” WaitFor “login:” Send username WaitFor “<CR>” WaitFor “Password:” Send password Send “<CR>” WaitFor “Main Menu” Send “3” Send “<CR>” WaitFor “Wip Menu” Send “1” Send “<CR>”
#Prompt for user name #Prompt for password #Use script portion for BigHost #Wait for the user prompt #Send the user name #Send a carriage return #Wait for password prompt #Send the users password #Send a carriage return #Match any host name #Wait for login prompt #Send the user name #Send a carriage return #Wait for password prompt #Send the users password #Send a carriage return #Wait for the main menu #Pick option 3 from menu #Await work-in-process menu #Pick option 1 from menu
S A section for the host name BigHost is added to the beginning of the script file. If you log into any host other than BigHost, the script file starts at the HostName “*” line. This allows for different processing on each host.
110
Native Terminal Emulation Programmer’s Guide
Page 131
Chapter 4, Customizing Your Configuration
Auto-Login Restart The Auto-Login Restart command starts the auto-login script file from the correct HostName statement in the script file when a host session is broken. For this command to work, the WaitFor string must match the last data sent from the host. For example, if the WaitFor string is the login prompt “login:” with a space after the colon, the WaitFor string must include a space for the auto-login restart to work. To use the Auto-Login Restart command, press the keys listed in Chapter 2, “Using the Terminal’s Keyboard.” Or, scan the following bar code. Auto-Login Restart
*/EALRS* *%ALRS*
Native Terminal Emulation Programmer’s Guide
111