File: Tapedrv.txt Tapedrv.exe -- IBM Tape Device Firmware Utility - v0.9 9/17/01 Copyright (c) 2000-2001 IBM Corporation Contents -------- Description Usage autoupdate Command autoupdate Screen Examples autosim Command status Command statussim Command Device Firmware States inick Command msgck Command Tapedrv.ini Syntax Tapedrv.ini [tapedrv] Section Tapedrv.ini [autoupdate] Section Tapedrv.ini [] Sections Tapedrv.ini Example Tapedrv.msg Syntax Tapedrv.msg Special Messages Tapedrv.msg Runtime Error Checking Tapedrv.exe Executable Exit Codes Tapedrv Errors Technical Notes Supported Tape Devices Description ----------- Tapedrv.exe is a tape device firmware utility program whose primary function is to automatically update certain supported tape devices with the latest firmware. "Tape devices" means both tape drives and medium changers. Medium changers are also called loaders, libraries, and robots. See Supported Tape Devices. Usage ----- tapedrv.exe -- IBM Tape Device Firmware Update Utility - v0.9 usage: tapedrv command [ options ] Commands: autoupdate Automatically updates tape device firmware autosim Simulates automatic update for all supported drives status Reports firmware version status statussim Simulates status for supported drives inick Check Tapedrv.ini and firmware files msgck Check Tapedrv.msg message numbers for duplicates and sequence ver Prints program's version Options: /g Prints additional debug information to log /l [+] Log messages to file. If is preceded by a '+', then the file is opened in append mode. /o Direct output to a file (for status, statussim) /p Specifies the pathname of the directory in which firmware image files are found (for autoupdate, autosim, inick). is used as prefix for filename strings given by AutoFileName parameters in Tapedrv.ini. /r Print additional program recognizable output (for status) Commands and options are case insensitive. autoupdate Command ------------------ 'autoupdate' automatically updates supported tape devices with the latest firmware. autoupdate is intended for use by a system update utility such as Update Xpress. By way of example, Update Xpress might start a tape device update process using a command line such as: tapedrv autoupdate /p Z:\SGUIDE\ADAPT\TAPEDRV\DRIVEMIC The /p option specifies the pathname of the directory in which firmware image files are found. Firmware images may actually reside in a subdirectory of depending on AutoFileName entries in Tapedrv.ini. Information that controls tape device recognition and firmware file correspondence resides in the mandatory initialization file, Tapedrv.ini. See the Tapedrv.ini Syntax section. When the program starts, it searches the system for tape devices and creates a tape device list. Subsequently the list is displayed in device screen. Refer to autoupdate Screen Examples. If no devices are recognized, the initial device screen is retained. The operator is shown the following message in the second and third lines: No updateable device found. Will end in 25 seconds. Press Enter key to end immediately. Exit code 2: "No supported tape devices found" is returned. If all recognized devices are found to be up to date, the initial device screen is retained. The operator is shown the following message in the second and third lines: Tape device(s) already up to date. Will end in 25 seconds. Press Enter key to end immediately. Exit code 3: "Tape device already up to date" is returned. Otherwise if it is discovered that one or more devices need updating, the operator is provided a time window in which to cancel, and a prompt in the second and third lines: Update pending. Update will start in in 25 seconds. Press Enter key to end without updating. If Enter is pressed, the update is canceled and the exit code 5: "Operator canceled automatic update" is returned. Otherwise when the dynamic seconds field decrements to zero, update commences. The device list is redrawn before each device update to reflect the current activity. The operator is shown the following message in the second and third lines: Update in progress for the highlighted device... This will take approximately 2 minutes. Do NOT power down! % The % in the above message is a dynamic spinner that indicates activity. The approximate minutes value defaults to 2 and can be configured in the appropriate device section in Tapedrv.ini. After the final update, the screen is again redrawn to show the final update status. The operator is shown one of following messages in the second and third lines: Update successful. Will end in 25 seconds. Press Enter key to end immediately. Exit code 0: "Tape device successfully updated: is returned. -or- Update failed. Will end in 25 seconds. Press Enter key to end immediately. Exit code 1: "Tape device update failure", or exit code 4: "Unrecoverable error unrelated to the tape device" is returned. autoupdate Screen Examples -------------------------- Screen 1 gives an example of a system before update commences. Screen 1 -------- Update pending. Update will start in 25 seconds. Press Enter key to end without updating. Device Address: Controller_Number/SCSI_Device_ID Current Update Device Ver- Version Address Device Inquiry sion State Old,New Status ------- ------------------------ ---------------- ----------------- 0/1/0 Seagate STT8000A 5.48 Out-of-date 5.48,5.51 Waiting 1/0/0 IBM ULTRIUM-TD1 09A1 Out-of-date 09A1,0BN1 Waiting 1/1/0 IBM ULTRIUM-TD1 0BN1 Up-to-date 1/13/0 SEAGATE AIT 04j9 Unrecognized When update commences Screen 2 might look like this: Screen 2 -------- Update in progress for the highlighted device... This will take approximately 2 minutes. Do NOT power down! % Device Address: Controller_Number/SCSI_Device_ID Current Update Device Ver- Version Address Device Inquiry sion State Old,New Status ------- ------------------------ ---------------- ----------------- >>0/1 Seagate STT8000A 5.48 Out of date 5.48,5.51 Updating<< 1/0 IBM ULTRIUM-TD1 09A1 Out of date 09A1,0BN1 Waiting 1/1 IBM ULTRIUM-TD1 0BN1 Up to date 1/13 SEAGATE AIT 04j9 Unrecognized In Screen 2 above and Screen 3 below, ">>...<<" means "reverse video bar" and the % is a spinning indicator. Screen 3 depicts the update of the second device. Screen 3 -------- Update in progress for the highlighted device... This will take approximately 2 minutes. Do NOT power down! % Device Address: Controller_Number/SCSI_Device_ID Current Update Device Ver- Version Address Device Inquiry sion State Old,New Status ------- ------------------------ ---------------- ----------------- 0/1 Seagate STT8000A 5.51 Up to date 5.48,5.51 Success >>1/0 IBM ULTRIUM-TD1 09A1 Out of date 09A1,0BN1 Updating<< 1/1 IBM ULTRIUM-TD1 0BN1 Up to date 1/13 SEAGATE AIT 04j9 Unrecognized Screen 4 shows a successful completion. Screen 4 -------- Update successful. Will end in 25 seconds. Press Enter key to end immediately. Device Address: Controller_Number/SCSI_Device_ID Current Update Device Ver- Version Address Device Inquiry sion State Old,New Status ------- ------------------------ ---------------- ----------------- 0/1 Seagate STT8000A 5.51 Up to date 5.48,5.51 Success 1/0 IBM ULTRIUM-TD1 0BN1 Up to date 09A1,0BN1 Success 1/1 IBM ULTRIUM-TD1 0BN1 Up to date 1/13 SEAGATE AIT 04j9 Unrecognized Update completed successfully. Screen 5 depicts an abnormal completion. Screen 5 -------- Update failed. Will end in 25 seconds. Press Enter key to end immediately. Device Address: Controller_Number/SCSI_Device_ID Current Update Device Ver- Version Address Device Inquiry sion State Old,New Status ------- ------------------------ ---------------- ----------------- 0/1 Seagate STT8000A 5.51 Up to date 5.48,5.51 Success 1/0 IBM ULTRIUM-TD1 09A1 Out of date 09A1,0BN1 FAIL 1/1 IBM ULTRIUM-TD1 0BN1 Up to date 1/13 SEAGATE AIT 04j9 Unrecognized TAPEDRV8580 error: An inquiry error occurred after Flashing firmware. Firmware update failed. autosim Command --------------- autosim permits testing of Tapedrv's handling of various firmware files without actually accessing or downloading a tape drive. autosim performs a simulated firmware update for each tape device section listed in Tapedrv.ini. autosim is similar to 'autoupdate' (above) in that inquiry/filename validation functions are used and firmware file integrity is verified. autosim differs from 'autoupdate' in all supported drives are assumed present, inquiry is simulated. If a log file is specified (see /l option), then the "write buffer" commands that would be used to download are sent to the log file. autosim accepts all 'autoupdate' options. inick Command ------------- inick checks certain Tapedrv.ini [] parameters for validity. The inick command can be used to check whether an update CD or floppy will fail in the field because of a syntax error in Tapedrv.ini. In DOS mode, inick is only partially implemented (to save memory). That is the most complete checking occurs in 32-bit Windows mode. inick reduces the likelyhood of failure in the the field because of a syntax error in Tapedrv.ini. For each [] listed in the [tapedrv] device list, the following parameters are checked; InquiryStd pattern is checked to see whether they represent 28 character "MAKE MODEL VERS" inquiry strings. InquiryStdHex, if present, is checked for validity. UpdateAlgorithm is checked to verify if it contains a recognized algorithm AutoFileName is checked to see if the firmware file is present. If the firmware file is present, it is further checked, against the UpdateAlgorithm's image checking constraints, if any. For example, many UpdateAlgorithms have firmware image size and content constraints. Any errors found are reported to the standard output device. Example: tapedrv inick /p ..\DRIVEMIC > error.txt msgck Command ------------- msgck checks Tapedrv.msg message numbers for duplicates and sequence. This utility command examines Tapedrv.msg. Duplicate, out of sequence, excessively long messages, and messages for which there is no comparable number in an alternate language are reported. Msgck errors are formatted as follows: X:\...\Tapedrv.msg(): : where error descriptions are: Excessive length Message is too long (approaching 2K in length). Duplicate Message number duplicates a previous number. Message numbers must be unique. Sequence Message number is less than previous message number. Message numbers should be in sequence. Warning: entry message number save buffer full The buffer 'Tapedrv msgck' uses for saving numbers for number checking is full. Tapedrv.c needs to be modified. status Command -------------- 'Tapedrv status' reports firmware status. It is useful for determining which devices are "out of date". Only those devices that indicate "Out of date" in the "Device Firmware Status" field would be updated by a 'Tapedrv autoupdate' command. Example output for 'tapedrv status': tapedrv -- IBM Tape Device Firmware Utility - v0.9 Copyright (c) 2000-2001 IBM Corporation Device Address: Controller_Number/SCSI_Device_ID Device Device Update Address Device Inquiry Version Version Device Firmware State ------- ------------------------ ------- ------- --------------------- 0/5 SEAGATE DAT 04106-XXX 7270 7550 Out of date More easily parsed information may be obtained using the /r option. For example 'Tapedrv status /r' might print the following. ##Tapedrv_status=1 tapedrv -- IBM Tape Device Firmware Utility - v0.9 Copyright (c) 2000-2001 IBM Corporation Device Address: Controller_Number/SCSI_Device_ID Device Device Update Address Device Inquiry Version Version Device Firmware State ------- ------------------------ ------- ------- --------------------- 0/5 SEAGATE DAT 04106-XXX 7270 7550 Out of date ##Device=0/5,Tape,SEAGATE DAT 04106-XXX,7270,7270,7550,9,Out of date ##FwStateUnrecognized=0 ##FwStateInaccessible=0 ##FwStateInUse=0 ##FwStateIgnored=0 ##FwStateCurrent=0 ##FwStateNewer=0 ##FwStateNeedsDOS=0 ##FwStateNeedsAlternate=0 ##FwStateOutOfDate=1 /r causes additional ## prefixed records to be added to the output stream. ##Tapedrv_status= is a signature. This is always the first ## prefixed record in the output. is a positive integer indicating the formatting version for the following ## entries. is currently 1 and may incremented if a subsequent change in format makes it necessary. ##Device=,,, ,,, , Device records are only present if tape devices are found. Each device record represents a device and has the following comma separated fields: has the SCSI device address. is either Tape or Changer. always contains 24 characters which is the Inquiry data bytes 8 through 31 returned by the device. This includes the Vendor Identification field in the first 8 characters, and the Product Identification in the remaining 16 characters. always contains 4 characters which is the Inquiry data bytes 32 through 35, or Product Revision Level returned by the device. is variable in length and contains 0 through 4 characters giving the current device version. is variable in length and contains 0 through 4 characters giving the update version. That is, the version to which the device will be updated if out of date. Of these two fields, the first contains a positive integer value and the second the corresponding text describing the state of the device firmware. See the Device Firmware States section for a description of all possible values. ##FwStateUnrecognized= ##FwStateInaccessible= ##FwStateInUse= ##FwStateIgnored= ##FwStateCurrent= ##FwStateNewer= ##FwStateNeedsDOS= ##FwStateNeedsAlternate= ##FwStateOutOfDate= These counter records are always present and follow ##Device= records, if any. They summarize the number of devices found in each possible state. Each record corresponds to one of the states in the Device Firmware States section. statussim Command ----------------- 'Tapedrv statussim' simulates the 'Tapedrv status' command without actually accessing a tape drive. statussim creates status information based on each device section listed in Tapedrv.ini. An attempt is made to simulate each possible value for "Device Firmware State" field, statussim accepts all 'status' options. Device Firmware States ---------------------- Below is the list of device firmware states. 'Tapedrv autoupdate' will update only tape devices in the "out of date" state. Device Firmware States Num- ber Name Counter -- -------------------------- ----------------------------- 1 Unrecognized device ##FwStateUnrecognized= An unrecognized device is a device that is unsupported. That is, a tape or changer device for which there is no matching device section in Tapedrv.ini. 2 Inaccessible device ##FwStateInaccessible= An inaccessible device is one that is recognized as being both present and supported, but cannot be accessed by the program, usually as the result of an uninstalled or disabled device driver. Under Windows NT/2000, an inaccessible device results when a tape or changer device, listed in the registry's SCSI tree, matches a device section in Tapedrv.ini, but the device cannot be opened using the CreateFile() system call. Normally the device is inaccessible because either no device driver is installed or the device is disabled in the Device Manager. Under Windows NT/2000 devices are found by scanning the SCSI tree in the registry. In order to access a SCSI device listed at a given registry node, the key, 'DeviceName', must also exist in the node. The DeviceName key maps the registry's device node to a device-filename. For example, if DeviceName=Tape0 then the device-filename is "\\.\Tape0". A missing DeviceName results when no device driver has claimed the device. This usually means there is no correspond device driver installed. When a DeviceName does exist, a device is also set to the inaccessible state when the device cannot be opened, via the CreateFile() system call, for any error other than a "sharing violation" (see state 3 Device in use). 3 Device in use ##FwStateInUse= A device in use is one that is recognized as being both present and supported, but cannot be accessed by the program because another program is using the device. Under Windows NT/2000, an attempt to open the device returns a "sharing violation" error, 32. 4 Ignored device ##FwStateIgnored= An "ignored device" state indicates the device is recognized but a determination cannot be made as to whether the device is up to date. That is, the device matches a device section in Tapedrv.ini but the section has either a missing or empty AutoFileVersion parameter. 5 Up to date ##FwStateCurrent= An "up to date" device state indicates no firmware update is necessary. The device both matches a device section in Tapedrv.ini and matches the AutoFileVersion parameter within the section. 6 Newer firmware ##FwStateNewer= An "newer firmware" device state means the device has firmware even more recent than the firmware required to be up to date. The command 'tapedrv autoupdate' will not update the device. That is, the device matches a device section in Tapedrv.ini but has firmware that is newer than the version indicated by AutoFileVersion parameter within the section. 7 Needs DOS mode update ##FwStateNeedsDOS= A "needs DOS mode update" state indicates a device is out of date but will only be updated while running under DOS. This state is only possible under Windows 95/98/ME/NT/2000. It is not possible when tapedrv is running under 16-bit DOS. The machine needs to be booted under DOS (or Windows 95/98/Me in DOS command prompt only mode) in order for 'tapedrv autoupdate' to update certain devices. For ##FwStateNeedsDOS=, gives the number of attached devices that can only be updated from within DOS. When running under DOS, is always 0 (zero). When running under Windows 95/98/Me/NT/200, might be non-zero. DOS only 'tapedrv autoupdate' is necessary for: - All Seagate Travan tape drives. - Seagate DDS-1/DDS-2 with either a .HEX or 256K .BIN firmware file. All other supported tape devices (including Seagate DDS-1/DDS-2 with 512K .BIN files and all Seagate DDS-3/DDS-4) can be successfully updated from within Windows 95/98/Me/NT/2000. The device matches a device section in Tapedrv.ini, has firmware that is out of date when compared to the AutoFileVersion parameter within the device section, and has a non-empty AutoFileName parameter. The UpdateAlgorithms "seagate_dds2_256k", and "seagate_travan" trigger this state under Windows. 8 Needs alternate update method ##FwStateNeedsAlternate= The "Needs alternate update method" state indicates the device cannot be updated by 'tapedrv autoupdate', but rather needs updating by an alternate method. Examples of alternate method update are 1) physical return of the device to a service center for "factory update" (perhaps ROM replacement), 2) update by a program other than 'Tapedrv'. As a practical matter, this state is not seen for all previous and the current (v0.9) versions of Tapedrv. The "Needs alternate update method" state is present in case recognition is subsequently added for a device that cannot be updated by 'tapedrv autoupdate'. In order for a drive to be recognized as being in the "Needs alternate update method" state, the device must match a device section in Tapedrv.ini and have a firmware version that is out of date when compared to the AutoFileVersion parameter within the device section, and have an empty or missing AutoFileName parameter. 9 Out of date ##FwStateOutOfDate= An "out of date" device state indicates that 'tapedrv autoupdate' would update the device. That is, the device matches a device section in Tapedrv.ini, has firmware that is out of date when compared to the AutoFileVersion parameter within the section, and has a non-empty AutoFileName parameter. Tapedrv.ini Syntax ------------------ Tapedrv.ini is a mandatory file that contains initialization information and other data. A primary function of Tapedrv.ini is to specify tape device recognition and firmware file correspondence. At initial program load, Tapedrv.exe attempts to open and read Tapedrv.ini from the following places in order given: First in the current directory, then the if /p option is given, and finally the directory from which Tapedrv.exe was loaded. Tapedrv.ini may be modified with any text editor. There are three types of lines in Tapedrv.ini: comment, section, and parameter. Comment lines begin with a semicolon (;). Example: ; this is a comment line Section lines mark the beginning of a group of parameters and are enclosed in brackets ([]). For example, the following marks the start of the Tapedrv global initialization section: [tapedrv] Parameter lines are of the form parameter=value. By way of example, the following parameter shows where a firmware file may be found: AutoFileName = seagate\v8???000.bin Section and parameter names are case insensitive. Parameter Values ---------------- Parameter values in the .ini are generally treated as lists of comma separated strings. For example string1,"string2" , string3 For most parameters, only the the first string in a list is significant. Thus for these parameters, strings beyond the first are ignored. Each string in a list, may be an unquoted string, a quoted or a combination. For unquoted strings, leading and trailing white space is stripped. Unquoted and quoted strings, between commas, are concatenated. For example " a " b c "d " e is the same as the single string " a b cd e" In order for a string to contain a literal comma (one that is not a string list separator), the comma must either appear between matching double quotes ("xx,yy") , or be escaped using a caret (xx^,yy). A literal double quote is represented using a caret (^"). A double caret (^^) represents a literal caret. a b^, c For example, the input string text string "a", b, " c,d" e "fg",, "z ASCII Patterns -------------- String values for InquiryStd and AutoFileName are patterns. Patterns are matched with actual strings returned by the SCSI Inquiry command or by system file directory services. A pattern is an ASCII string which may contain the control characters: * ? [ { ^ A pattern containing control characters may be capable of matching more than one actual string. The character "*" matches any string of characters, including the null string. The character "?" matches any single character. Character sequences within square brackets ([ and ]) matches any of the characters enclosed. Within square brackets, a pair of characters separated by a "-" additionally matches any of the characters lexically between the two. As special cases, within a string a "[]" as well as a closing "]" without a matching opening "[" is matched literally. Square brackets have higher precedence than braces ({ and }). The notation a*?[bd-x]z says match a string beginning with 'a', followed by zero or more undefined characters, and ending with three characters, the first being any single character, the second being either b, or d through x, and the final being z. The notation "a{b,c{,d}f}" is shorthand for "ab", "acf", or "acdf". As special cases, within a string a "{}" as well as a closing "}" without a matching opening "{" is matched literally. Also a "{", at the end of a pattern, is matched literally. When matching filenames the directory separator "/" is a synonym for "\". Drive letters, colons, and directory separators are matched explicitly. Also ".", at the beginning of a filename, is matched explicitly. The character "^" (caret) is the pattern escape character and causes the character following to be taken literally rather than as a pattern control. To specify a single caret (^) literal, a double caret (^^) must be given. For example "^?" says match "?" literally. Tapedrv.ini [tapedrv] Section ----------------------------- The [tapedrv] section contains global initializations for Tapedrv.exe. magic= is used for file format verification. ide_search_length= This parameter controls the number of IDE adapters to search starting with ide0_*. When ide_search_length=2, ide0_* (the Primary IDE adapter) is searched first, ide1_* (the Secondary IDE adapter) is searched second, and ide2_* and ide3_ are ignored. ide[0-3]_port= ide[0-3]_irq= devices= device parameters, where is 00 through 99, lists the names of each [] that follows. Any device section names not present within this list are ignored. Tapedrv.ini [autoupdate] Section -------------------------------- [autoupdate] has parameters used by the autoupdate command: UpdateDelay = gives the delay before the initial device update if any. FinalDelay = gives the delay before the exiting after the final status display. Tapedrv.ini [] Sections --------------------------------------- Each supported tape device has its own [] In order to be used, a given [] must be mentioned in a devices entry in the [tapedrv] section. A [] has the following parameters: Description = "" Description is optional. It has information that is printed by the 'scan' command when a tape device is recognized. Example: Description = "IBM Hornet-8 SCSI TR-4" InquiryStd = ":" InquiryStd gives a string used to detect the make and model of the device associated with the device section. It consists of two strings separated by a ":". has a string indicating which peripheral device type to match. The peripheral device type is a 5-bit binary field at Inquiry data byte 0, bits 4..0. Recognized ASCII values and binary mappings for are: ASCII Binary ----- ------ Tape 1 Changer 8 is an ASCII Pattern string that is compared against the ASCII field of standard Inquiry data returned by the device. Where the ASCII field is 28 character contiguous field beginning at byte 8 and includes the Vendor Identification, Product Identification, and Product Revision Level fields. are case sensitive. See ASCII Patterns. Examples: InquiryStd = "Tape:CONNER CTT8000-S 3???" InquiryStd = "Changer:HP C7145 ????" InquiryStd = "Tape:{SEAGATE DAT ,ARCHIVE Python} 04106-XXX[73]???" InquiryStdHex = ":" InquiryStdHex may optionally be used to extend the matching of standard Inquiry into the vendor specific data area. InquiryStdHex is used only after Inquiry data matches the InquiryStd parameter in the same []. This is useful for identifying DLT Firmware Personality kept in byte 41 of Inquiry data. When the InquiryStdHex parameter is specified, additional standard Inquiry data (up to 255 bytes) is retrieved from the device. Then, the actual number data bytes read is converted into an ASCII hexadecimal string. This hex string is then used as the target of InquiryStdHex pattern matching. InquiryStdHex's value consists of an integer and a string separated by a ":". is an integer value, in the range 0 through 254, giving the byte offset in the Inquiry data at which to begin matching. For example, 41 if we are interested in byte 41 of Inquiry data. is an ASCII Pattern string using characters from the set *?[-]{}0123456789ABCDEFabcdef. A is compared against the ASCII hexadecimal target string (derived from Inquiry data) as described above. Pattern matching begins at in the target string. Often the final character in is an '*' as the remainder of most Inquiry data is not of interest. Pattern matching is case insensitive. See ASCII Patterns. For example, if a device returns the following 56 bytes of Inquiry data: 0: 01 80 02 02 33 00 00 38 51 55 41 4e 54 55 4d 20 ....3..8QUANTUM 16: 44 4c 54 37 30 30 30 20 20 20 20 20 20 20 20 20 DLT7000 32: 32 35 36 30 71 60 00 07 32 0f 01 00 00 3f 00 00 2560q`..2....?.. 48: 00 00 00 02 41 30 30 33 ....A003 The the data is converted to the following 112 character ASCII hexadecimal string (in actuality, all on one line): "01800202330000385155414e54554d20 444c5437303030202020202020202020 3235363071600007320f0100003f0000 0000000241303033" Using the parameter InquiryStdHex = "41:0f*" specifies that Inquiry byte 41 must be a 0f hexadecimal. Using InquiryStdHex = "41:[0-4]???{05,3c,99}*" specifies that byte 41 must be in the range 00 through 4f, and byte 43 must be either 05, 3c, or 99. For Quantum OEM, use: InquiryStdHex = "41:04*" OML, use: InquiryStdHex = "41:0f*" OMX, use: InquiryStdHex = "41:12*" InquiryCFR_OEM = "<1 to 3 digit oem number>" This parameter is needed only for certain Seagate DAT drives. It is used uniquely identify certain models when InquiryStd is insufficient. When this parameter is set, the Seagate Controller Firmware Revision Inquiry page (0xc0) is retrieved from the drive. The 1 to 3 digit OEM field contained within the CFR page is compared with the parameter value. Insignificant leading zeros are ignored by the comparison operation. Thus "047" compares with "47" and "000" with "0". Examples: InquiryCFR_OEM = "0" InquiryCFR_OEM = "547" AutoFileName = "" AutoFileName gives name of the firmware file with which to update an out-of-date device. If a /p is specified on the command line, then is prefixed to . is an ASCII Pattern (see ASCII Patterns). The pattern must represent a unique filename. If AutoFileName is empty or missing from a device section, and and a device is found to be "out of date" (when compared with AutoFileVersion), then Tapedrv reports the device state as "Needs alternate update method". That is, the device needs to be updated by a method other than using 'Tapedrv autoupdate'. Example: AutoFileName = "seagate\ti4s?3??.fls" AutoFileVersion = "<4-character version>" AutoFileVersion gives the version (or Product Revision Level) that would be returned by the device, in the 4-bytes, beginning at byte 32 of SCSI Inquiry data, after the firmware file, given by AutoFileName, is transferred and saved in the device's EEPROM. When any of the 4 characters has the special character "?", it is substituted with the corresponding version character currently present in the device. If AutoFileVersion is missing or has an empty string, than the drive is displayed as "Ignored". Any non-empty <4-character version> having less than 4-characters is right padded with '?' to 4 characters. To assure correct 'new version' display, "?" must be used when both these conditions occur: 1) the character will not change as a result of the update, and 2) the character is not "fixed" based on the make and model. For example for a Quantum DLT4000, the first and second characters indicate the "servo code level". The servo code level is neither altered by firmware update, nor fixed for the make and model. The third and fourth characters indicate the firmware code level" and *are* altered by firmware update. Thus, for the DLT4000, if AutoFileName represents version 45 firmware, then set AutoFileVersion to the string, "??45". Examples: AutoFileVersion = "??10" AutoFileVersion = "1.AB" CompareControl = "" CompareControl controls the comparison of the device version (or 4-character Product Revision Level) with that of the file version. is a 1 to 4 character string with each character being a unique selection from the list 0 1 2 or 3. Characters other than 0 1 2 or 3 are ignored. specifies both the byte offsets of, and order of version character comparison. Version comparisons are case insensitive. For example if is "3210", all 4 characters of the version are compared in reverse order from right to left. If is "23", than only the final 2 characters of the version are compared from left to right. The string "??23" is identical to "23" because "??" is ignored. If CompareControl is missing or has an empty string, or contains no valid characters then the default value, "0123", is used. UpdateAlgorithm = "" selects the algorithm used to update the tape device firmware and must be one of the following: Algorithm Tape Device ------------------- ----------------------------------- "standard" Standard tape or changer "exabyte_mammoth" Exabyte Mammoth "seagate_travan" Seagate Travan "seagate_dds2_256k" Seagate DDS-1, DDS-2 w/ 256K EEPROM "seagate_dds2_512k" Seagate DDS-1, DDS-2 w/ 512K EEPROM "seagate_dds3" Seagate DDS-3 "seagate_dds4" Seagate DDS-4 "quantum_dlt" Quantum/Benchmark DLT "ibm_ultrium" IBM Ultrium "hp_ultrium" HP Ultrium "hp_library" HP Library/Autoloader UpdateSeconds = gives a maximum number of seconds required to update firmware. If is too small, a firmware update error may be erroneously reported. The default value is 120. Note that, on the display, the operator sees a message similar to "Update will take up to minutes" where is derived by rounding up UpdateSeconds to the nearest minute. The minimum displayed value for on the display is 2. Example: UpdateSeconds = 45 Tapedrv.ini Example ------------------- ; Tapedrv.ini -- tapedrv.exe initialization ; ; ide_search_length= ; This parameter controls the number of IDE adapters to search ; starting with ide0_*. ; When ide_search_length=2, ide0_* (the Primary IDE adapter) is ; searched first, ide1_* (the Secondary IDE adapter) is searched ; second, and ide2_* and ide3_ are ignored. ; ide[0-3]_port= ; ide[0-3]_irq= ; [tapedrv] magic = 0x5400 ide_search_length=2 ide0_port=0x1f0 ide0_irq=14 ide1_port=0x170 ide1_irq=15 ide2_port=0x1e8 ide2_irq=11 ide3_port=0x168 ide3_irq=10 devices00 = IBM_Ultrium-TD1_SCSI devices01 = Seagate_Scorpion-40 [autoupdate] UpdateDelay = 25 FinalDelay = 25 [IBM_Ultrium-TD1_SCSI] Description = "IBM Ultruim-1" InquiryStd = "Tape:IBM ULTRIUM-TD1 ????" AutoFileName = "ibm\0BN1.fmr" AutoFileVersion = "0BN1" UpdateAlgorithm = "ibm_ultrium" UpdateSeconds = 121 [Seagate_Scorpion-40] ; Switch 7 On=SEAGATE..., Off=ARCHIVE... ; Scorpion-40 and Scorpion-240 use same file Description = "Seagate Scorpion-40 DDS-4: STDx401LW" InquiryStd = "Tape:{SEAGATE DAT ,ARCHIVE Python} 06240-XXX8???" AutoFileName = "seagate\v8???000.bin" AutoFileVersion = "8160" CompareControl = "?123" UpdateAlgorithm = "seagate_dds4" UpdateSeconds = 60 Tapedrv.msg Syntax ------------------ Tapedrv.msg contains messages used by the Tapedrv.exe program. The message file is a text file which has message entries and comments. Each message entry consists of a message number and a message string. Message numbers are positive hexadecimal integers. Message strings are similar to strings in the C programming language. Each message string is double quoted. Multiple quoted strings are concatenated. That is, "string1" "string2" is the same as "string1string2". With in a message string, certain escape sequences are recognized. Escape sequences begin with a Backslash (\). Escape sequence Meaning -------- ------- \a Alert (bell) \b Backspace \f Form feed \n Newline \r Carriage return \t Tab \v Vertical tab \\ Backslash (\) \" Double quote (") \ is a one through three digit octal number in the range 0 (or 000) through 377 octal (equivalent to 255 decimal) representing an ASCII code. For example, \101 is the same as the 'A' character, and \40 or \040 is the same as the SPACE (' ') character. Two types of comments are recognized, the double slash (//) and the traditional C language style slash-star star-slash (/**/). A double slash (//) opens a comment which continues until end of line. For example: // This is a double slash comment A slash-star star-slash (/**/) comment is opened by a slash-star (/*) and continues, possibly for several lines, until closed by a star-slash (*/). For example: /* This is a slash-star star-slash comment */ Tapedrv.msg Special Messages ---------------------------- 0020 "" must agree with the version stored in Tapedrv.exe. For example, 0020 "1.0" Tapedrv.msg Runtime Error Checking ---------------------------------- Each time Tapedrv is invoked, it performs certain checks on the message file. The syntax of the Tapedrv.msg is checked. If there is an error in syntax, one of following errors are shown: X:\...\Tapedrv.msg(): Message file syntax error: Message number to large Unexpected end-of-file in c-string Unexpected end-of-file in comment begun on line '': Unquoted character Tapedrv also checks Tapedrv.msg for a special version message, message number 20, and may show one of these errors: "X:\...\Tapedrv.msg": Version message (20) not found "X:\...\Tapedrv.msg": Incorrect message file version For most messages, when Tapedrv cannot locate a given message number, one of these errors is shown: "X:\...\Tapedrv.msg": : Message not found See also msgck. Tapedrv.exe Executable ---------------------- Tapedrv.exe contains two program images -- a 16-bit DOS program called Tapedrv16, and a 32-bit Win32 Intel platform program called Tapedrv32. Tapedrv16 (the 16-bit DOS program), executes in MS-DOS, Windows 3.1x, or Windows 95/98 in MS-DOS Only mode. Tapedrv32 (the 32-bit Win32 Intel program) executes in Windows 95/98 in Graphics (normal) mode, or Windows NT 3.51/NT 4.0/2000. Tapedrv16 uses the Video BIOS (int 10) to write the screen, and Tapedrv32 uses Win32 Console i/o to write the screen. Interfaces Used for Finding and Accessing Tape Drives ----------------------------------------------------- Tapedrv16, finds and accesses SCSI tape drives via the DOS ASPI driver. The ASPI driver must have been loaded from CONFIG.SYS during boot. For ATAPI Travan drives, Tapedrv16 finds and accesses the drives using a built-in IDE/ATAPI ASPI driver (no DOS ASPI driver is required for ATAPI Travan drives). Note: Tapedrv cannot access Travan ATAPI tape drives while running Windows 3.1x (you must exit from Windows 3.1x to DOS.) Tapedrv32, when running in Windows 95/98 in Graphics mode, finds and accesses both SCSI and ATAPI tape drives via \system\WNASPI32.DLL. WNASPI32.DLL provides a 32-bit ASPI interface and should be present in all Windows 95/98 installations. Tapedrv32, when running in Windows NT 3.51/NT 4.0/2000, finds ATAPI and SCSI tape drives by searching the registry. Information in the registry is used to construct a device filename (for example, "\\.\Tape0") by which a tape device driver is be opened. Once opened, a tape drive is accessed via the tape device driver's SCSI pass through interface. Finding and Accessing Tape Drives via ASPI 16/32 ------------------------------------------------ When using the ASPI 16 or 32-bit interfaces, Tapedrv16/32 scans for tape drives by first requesting ASPI to return the number of host adapters present. Then for each possible SCSI target ID (device address) on each host adapter, Tapedrv sends a SCSI Inquiry command. For each successful Inquiry command, Tapedrv examines Inquiry data returned by the device. Tapedrv recognizes a tape device when returned Inquiry data indicates a tape peripheral or medium changer device type, and when certain portions of ASCII strings, in the data (at inquiry[8-35]), match strings contained in Tapedrv.ini (for example, "SEAGATE DAT 02779-XXX6???"). Once a tape drive is recognized, further SCSI commands may be sent to unload the cartridge and to download firmware. Finding and Accessing Tape Drives In Windows NT/2000 ---------------------------------------------------- During system boot, Windows NT/2000 scans for IDE/ATAPI and SCSI devices. A result of this process, called enumeration, is the creation of a tree structure in the registry under the key -- My Computer\HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\Scsi You can examine the registry using \REGEDIT.EXE. Tapedrv32, when running on Windows NT/2000, finds ATAPI and SCSI tape drives by searching the registry. Tapedrv32 starts by opening the root registry key for SCSI: My Computer\HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\Scsi From the "SCSI root" key above, Tapedrv32 walks the tree looking for logical unit sub-key leaf nodes having the form: Scsi Port \Scsi Bus \Target Id \Logical Unit Id In each logical unit leaf node, Tapedrv32 looks for value keys with these names and values: Type: "TapePeripheral" Identifier: "SEAGATE DAT 02779-XXX6500" DeviceName: "Tape" InquiryData: 01 80 02 02 1f 00 00 18 41 52 43 ... Tapedrv recognizes a tape drive when the 'Type' value key is set to "TapePeripheral", and a portion of 'Identifier' (which is equivalent to the 28 bytes of inquiry[8-35]), matches strings read from Tapedrv.ini (for example, "SEAGATE DAT 02779-XXX6???"). When a Seagate tape drive is identified, Tapedrv looks for a 'DeviceName' value key in the same logical unit leaf node. A DeviceName value key is present only when a tape device driver has successfully loaded and claimed the logical unit. Possible causes for 'DeviceName' being absent from the registry are: Tape device driver not installed, Tape device service disabled, or Tape device driver failed to load. When DeviceName is present, its value is an ASCII string (for example, "Tape0") which Tapedrv uses to construct a device filename (for example, "\\.\Tape0") by which the tape device driver is opened. Tapedrv opens the device filename (e.g. "\\.\Tape0") to gain access to the tape device driver. Once opened, SCSI commands are sent to the tape drive via the DeviceIoControl() system call using the IOCTL_SCSI_PASS_THROUGH_DIRECT command. Exit Codes ---------- On exit, 'Tapedrv autoupdate' returns one of the following codes: Exit Code Status ---- ------- 0 Tape device successfully updated One or more supported tape drives and/or medium changers was identified, and one or more of these devices required a firmware update. All devices requiring so were successfully updated. 1 Tape device update failure One or more supported tape drives and/or medium changers was identified, and one or more of these devices required a firmware update. However, at least one device failed to be updated. 2 No supported tape devices found No supported tape drive nor supported medium changer was identified. However an unsupported tape drive may be present. 3 Tape device already up to date One or more supported tape drives and/or medium changers was identified. None of these devices required a firmware update. 4 Unrecoverable error unrelated to the tape device These errors include - Invalid or corrupt firmware file - Insufficient memory 5 Operator canceled automatic update 6 Tape device needs update by an alternate method One or more tape drives and/or medium changers was found to have out-of-date firmware. However, this program is incapable of updating the device. An alternate method of update is required. Alternate methods may include update using a different program, replacement of an EEPROM, or factory update. 7 Tape device needs update in DOS only mode A tape drive or medium changer was found to have out-of-date firmware. However, this program can only update the firmware while booted in DOS only mode. Firmware cannot be updated from either Windows 95/98/ME in graphics mode or from Windows NT/2000. 8 Tape device in use by another program A tape drive or medium changer was either partially or fully recognized from Windows NT/2000 registry. However, the device is cannot be opened because it is in use by another program. 9 Tape device is inaccessible A tape drive or medium changer was either partially or fully recognized from Windows NT/2000 registry. However, the device is inaccessible. Typical causes for inaccessibility are either a device driver is not installed or is disabled. This exit code is also reported if a device failed to open for a reason other than "device in use". 'Tapedrv autoupdate' exit code priority from highest to lowest ------------------------------------------------------------- 1, 4, 5 1:Tape device update failure 4:Unrecoverable error unrelated to the tape device 5:Operator canceled automatic update 8 8:Tape device in use by another program 7 7:Tape device needs update in DOS only mode 6 6:Tape device needs update by an alternate method 9 9:Tape device is inaccessible 0, 2, 3 0:Tape device successfully updated 2:No supported tape devices found 3:Tape device already up to date On exit, 'Tapedrv status' returns one of the following codes: Exit Code Status ---- ------- 0 Tape status successfully reported 4 Unrecoverable error making it impossible to report status Tapedrv Errors -------------- The following lists Tapedrv errors with additional commentary. TAPEDRV8010 error: "": Out of memory Comment: There is likely a programming error in Tapedrv. Contact technical support. TAPEDRV8110: No IDE adapter found. TAPEDRV8111: The DOS ASPI Manager was not found. TAPEDRV8112: No IDE adapter found, and the DOS ASPI Manager was not found. Comment: If you have an IDE/ATAPI tape drive and the message says "No IDE adapter found", verify that the appropriate IDE channel is enabled in the BIOS setup. See the "Searching Additional IDE Adapters" section above. If you have a SCSI tape device and the message says "DOS ASPI Manager was not found", see the "MS-DOS, Windows 3.1x, Windows 95/98/ME MS-DOS Only Mode" section above. TAPEDRV8113: The Windows 95/98/ME ASPI Manager was not found. Comment: Try rebooting in DOS only mode. If you have a SCSI tape device, you will need to have a DOS ASPI manager driver configured. See the "MS-DOS, Windows 3.1x, Windows 95/98/ME MS-DOS Only Mode" section above. TAPEDRV8115: No [ATAPI/IDE or SCSI] host adapters found. Comment: You may need to install an IDE/ATAPI or SCSI driver for the host adapter (also called a controller) to which the tape device is attached. For NT 4.0, click Start -> Settings -> Control Panel -> SCSI -> Drivers If you see that an adapter driver is installed but not started, then the driver is, likely, not recognizing the tape drive. In this case, check the hardware installation (see comment after TAPEDRV8530). For Windows 95/98/ME/2000, check for the existence of an IDE/ATAPI or SCSI controller in the Device Manager by right clicking on My Computer -> Properties then selecting the [Hardware ->] Device Manager tab or button. If the controller, to which the tape device is connected, is not present, use Start -> Settings -> Control Panel -> Add/Remove Hardware to detect and install a driver for the controller. TAPEDRV8130 error: []: "": File find error: Pattern syntax: Missing ] Pattern syntax: Missing } Insufficient stack memory File not found Filename not unique Comment: These errors indicate a failure to match or locate a file during an autoupdate operation. Typical causes of these errors include: 1) An incorrect AutoFileName= parameter in the named device section of Tapedrv.ini. 2) An invalid value for the /p option on the command line. 3) The firmware file is missing. 4) Multiple filenames match the . TAPEDRV8140 error: "": Firmware file open error: Comment: This error might occur if you do not have read permission for the firmware file. TAPEDRV8142 error: "": Firmware file read error: TAPEDRV8150 error: (): Hexfile record error: TAPEDRV8160 error: (): Hexfile syntax error: TAPEDRV8170 error: "": Firmware signature invalid TAPEDRV8180 error: "": Firmware image size = bytes: Invalid image size Comment: The firmware file may be corrupt. Obtain a new copy of the firmware file intended for your tape device model then try again. TAPEDRV8190 error: "": Firmware image size ( bytes) does not match device requirement ( bytes) Comment: The firmware file image is either to small or too large for the EEPROM. Obtain a new copy of the firmware file intended for your tape device model then try again. TAPEDRV8200 error: Insufficient memory for K transfer buffer TAPEDRV8201 error: Insufficient memory for K transfer buffer (additional K needed) Comment: If using MS-DOS, Windows 3.1x or, Windows 95/98/ME in MS-DOS only mode, you may need to remove (or comment out) unnecessary drivers and/or "terminate-and-stay- resident" (TSR) programs from CONFIG.SYS and AUTOEXEC.BAT to increase available memory for Tapedrv. TAPEDRV8210 error: Cannot update this device's firmware in Windows 95/98/ME Graphics mode (Within a DOS Box). reboot your system into MS-DOS only mode. Comment: See the section "Windows 95/98/ME Graphics Mode" above. TAPEDRV8220 error: Cannot update this device's firmware from Windows NT/2000. Use MS-DOS or Windows 95/98/ME in MS-DOS Only mode. Comment: See the section "Windows NT 3.51/NT 4.0/2000" above. TAPEDRV8250: Above tape device inaccessible: 'DeviceName' not in registry. Possible causes: Tape device driver not installed, tape device service disabled, or tape device driver failed to load. TAPEDRV8252: Above tape device inaccessible: Can't open device "\\.\Tape": Operating system error : TAPEDRV8272 error: Tape device inaccessible: Can't open device "\\.\Tape": Operating system error : Comment: Another process may may be using the device. TAPEDRV8310 error: Controller re-select failure TAPEDRV8320 error: Tape device re-inquire failure TAPEDRV8330 error: Tape device is not responding: TAPEDRV8340 error: Device communication error: Too many Unit Attentions: TAPEDRV8350 error: Device communication error: Unexpected sense key: TAPEDRV8360 error: Timeout waiting device to become stable: Firmware update not started. Comment: Verify that tape device cables are securely connected. If an IDE/ATAPI tape drive is being used with another device (for example, CD-ROM) on the same IDE cable, make sure that one is configured as master and the other as slave. If a SCSI tape device is being used, verify that the SCSI bus is properly terminated. Make sure the tape device's SCSI ID does not conflict with another device on the SCSI bus. Shutdown and turn power off. Examine cables and connections. Power up and reboot the system. Try again. TAPEDRV8410 error: []: UpdateAlgorithm "": Unrecognized or missing Comment: The UpdateAlgorithm parameter, for the named device section in Tapedrv.ini, needs to be edited. TAPEDRV8510: A [SCSI or IDE/ATAPI] tape device was NOT found. Comment: Depending on whether any tape drives are present, this may or may not be an error. TAPEDRV8570 error: Image offset 0x: WriteBuffer(mode=, adrs=0x length=) error: An error occurred while downloading firmware. Firmware update failed. Comment: The tape device may have rejected the new firmware. The new firmware may be incorrect for the tape device. TAPEDRV8580 error: An inquiry error occurred after updateing firmware: Firmware might be successful. -- Please shutdown, power cycle all devices, then reboot and determine whether firmware was updated from "" to "" Comment: The tape device may have rejected the new firmware. Power cycle and reboot your system, then check whether the tape device is present in the list shown by the command 'Tapedrv scan.' If not, contact technical support. TAPEDRV8590 error: Old version "": Current version "": Expected new version "": The version did not change to the expected. -- Please shutdown, power cycle all devices, then reboot and determine whether firmware was updated. Comment: Possible causes include: 1) The tape device rejected the new firmware. 2) the device may need power a power cycle for the new version to take effect. 3) The expected new version (kept in a AutoFileVersion parameter in Tapedrv.ini) may be incorrect. Technical Notes --------------- TAPEDRV8570 error under DOS using an IPSRASPI.SYS Driver ---------------------------------------------------- When using the IPSRASPI.SYS DOS mode ASPI raid driver on an IBM Netfinity server, the following error was observed during firmware update of a Seagate Scorpion-24: TAPEDRV8570 error: WriteBuffer(mode=7, adrs=0x00180000 length=0) error. Host adapter status 0x11 This error is reported when the IPSRASPI.SYS driver times out the firmware update (WriteBuffer) request before firmware update is actually completed. The firmware update actually completes successfully after the message appears. This error is circumvented by increasing the timeout used by the IPSRASPI.SYS driver. IPSRASPI.SYS supports the following CONFIG.SYS line parameters. /t: Timeout in ticks (18.2 ticks/second) /F Load even if no device is seen SCSI scan For example, the following CONFIG.SYS line gives about a 6.4 minute timeout which is sufficient (5 minutes + 1.4 minute safety margin) for updating firmware in a Scorpion-240 loader. DEVICE=IPSRASPI.SYS /t:7000 /F Currently, the Seagate Scorpion-240 loader needs the longest timeout (about 5 minutes) of any Seagate tape drive. All other Seagate drives complete firmware update in under 2 minutes. Most ASPI drivers have an infinite timeout. Supported Tape Devices ---------------------- ATL Products Libraries ---------------------- L200 Library with Quantum DLT7000 drives L500 Library with Quantum DLT7000 drives Exabyte Mammoth --------------- Mammoth (M1) Mammoth-2 (M2) Benchmark DLT ------------- DLT1 Half high HP Ultrium ---------- Ultrium-1 Half high HP Libraries ------------ HP 1x9 Autoloader with an IBM Ultrium-1 drive HP 2x20 Library with 2-IBM Ultrium-1 drives IBM Ultrium-1 ------------ Ultrium-1 Seagate Travan IDE/ATAPI -------------------- CTT8000I-A,CTT8000R-A TR-4 Bali 2/2A STT28000A,STT38000A TR-4 Hornet 8 ATAPI STT220000A,STT320000A TR-5 Hornet 20 ATAPI Seagate Travan SCSI ------------------- CTT8000I-S,CTT8000R-S,CTT8000E-S TR-4 Falcon 2 STT28000N,STT38000N,STT68000N TR-4 Hornet 8 SCSI STT220000N-C,STT320000N-C,STT620000N-C TR-5 Hornet NS20 Seagate DAT ----------- 4326NP,4326RP,4356XP DDS-2 Piranha CTD8000H-S,CTD8000R-S,CTD8000E-S DDS-2 Peregrine STD18000N,STD28000N,STD68000N DDS-2 Scorpion 8 (Cobra 2) STD124000N,STD224000N,STD624000N DDS-3 Scorpion 24 (Cobra 3) STD1401LW,STD2401LW,STD6401LW DDS-4 Scorpion 40 STDL42401LW,STDL62401LW DDS-4 Scorpion 240 Loader Quantum DLT ----------- DLT4000 DLT8000 DLT7000 SuperDLT