From owner-freebsd-hardware Thu Apr 25 03:23:26 1996 Return-Path: owner-hardware Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id DAA29864 for hardware-outgoing; Thu, 25 Apr 1996 03:23:26 -0700 (PDT) Received: from zibbi.mikom.csir.co.za (zibbi.mikom.csir.co.za [146.64.24.58]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id DAA29496 Thu, 25 Apr 1996 03:13:54 -0700 (PDT) Received: (from jhay@localhost) by zibbi.mikom.csir.co.za (8.6.12/8.6.9) id MAA25078; Thu, 25 Apr 1996 12:09:09 +0200 From: John Hay Message-Id: <199604251009.MAA25078@zibbi.mikom.csir.co.za> Subject: Re: HP C1553A Autoloading DDS-2 DAT tape drive control? To: dufault@hda.com (Peter Dufault) Date: Thu, 25 Apr 1996 12:09:09 +0200 (SAT) Cc: kallio@beeblebrox.pccc.jyu.fi, questions@freebsd.org, hardware@freebsd.org In-Reply-To: <199601262348.SAA08084@hda.com> from "Peter Dufault" at Jan 26, 96 06:48:44 pm X-Mailer: ELM [version 2.4 PL24 ME8b] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hardware@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Hi, I also got a HP Autoloader and except for two small changes which I attach at the end, it works fine. Thanks, it saved me quite a lot of effort trying to figure it out. John -- John Hay -- John.Hay@mikom.csir.co.za > > > > 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 > *** dds_changer.org Thu Apr 25 09:51:07 1996 --- dds_changer Thu Apr 25 11:59:24 1996 *************** *** 3,9 **** usage() { ! echo "Usage: dds_changer [123456ne] raw-device-name echo "1..6 = Select cartridge" echo "next cartridge" echo "eject magazine" --- 3,9 ---- usage() { ! echo "Usage: dds_changer [123456ne] raw-device-name" echo "1..6 = Select cartridge" echo "next cartridge" echo "eject magazine" *************** *** 33,37 **** ;; esac ! scsi -f $2 -s 100 -c "1b 0 0 v v v" $cdb3 $cdb4 $cdb5 --- 33,37 ---- ;; esac ! scsi -f $2 -s 100 -c "1b 0 0 $cdb3 $cdb4 $cdb5"