From owner-freebsd-questions Fri Jan 26 16:12:15 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id QAA08267 for questions-outgoing; Fri, 26 Jan 1996 16:12:15 -0800 (PST) Received: from hda.com (hda.com [199.232.40.182]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id QAA08249 Fri, 26 Jan 1996 16:12:07 -0800 (PST) Received: (from dufault@localhost) by hda.com (8.6.11/8.6.9) id SAA08084; Fri, 26 Jan 1996 18:48:45 -0500 From: Peter Dufault Message-Id: <199601262348.SAA08084@hda.com> Subject: Re: HP C1553A Autoloading DDS-2 DAT tape drive control? To: kallio@beeblebrox.pccc.jyu.fi (Seppo Kallio) Date: Fri, 26 Jan 1996 18:48:44 -0500 (EST) Cc: questions@freebsd.org, hardware@freebsd.org, kallio@beeblebrox.pccc.jyu.fi In-Reply-To: from "Seppo Kallio" at Jan 26, 96 09:35:24 am X-Mailer: ELM [version 2.4 PL24] Content-Type: text Sender: owner-questions@freebsd.org Precedence: bulk > > > Hi, we have HP C1553A Autoloading DDS2 DAT tape drives attached to > a FreeBSD node. Is there a program available that would allow me to > fully manipulate the drive? > > I have code for HPUX and Solaris, but it is so OS dependend I cannot > compile it in FreeBSD. You can use scsi(8) to send commands to the device. Something like this (I didn't run this - this is a dramatization based on that C code) saved as dds_changer and made executable. As a raw-device-name you must use something that accepts the SCSI ioctl calls - the control device for whatever it comes on line as will. #!/bin/sh PATH="/sbin:/usr/sbin:/bin:/usr/bin"; export PATH usage() { echo "Usage: dds_changer [123456ne] raw-device-name echo "1..6 = Select cartridge" echo "next cartridge" echo "eject magazine" exit 2 } if [ $# -ne 2 ] ; then usage fi cdb3=0 cdb4=0 cdb5=0 case $1 in [123456]) cdb3=$1 cdb4=1 ;; n) ;; e) cdb5=0x80 ;; ?) usage ;; esac scsi -f $2 -s 100 -c "1b 0 0 v v v" $cdb3 $cdb4 $cdb5