• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Sending SCSI commands in Mac OS X
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sending SCSI commands in Mac OS X


  • Subject: Re: Sending SCSI commands in Mac OS X
  • From: email@hidden
  • Date: Fri, 24 Jul 2009 12:18:34 +0200


Am 24.07.2009 um 05:55 schrieb Terry Lambert:

Since no one else posted...

Apparently the last machine I used had your tools installed on, which generated BSD device stubs for my QIC tape drive when I plugged it it. 8-).

Ok. What we are doing with our tools is to create pseudo device files in /etc/UGSdev, e.g. /etc/UGSdev/nst0, which can be passed as remote devices (e.g. 127.0.0.1:/etc/UGSdev/nst0) to command line tools such as tar, xtar, dump/restore, mt, etc., so that our rmt will communicate with the SCSI, FireWire, USB and FibreChannel tape/changer devices. Please take a look at http://www.ugsoft.de/intl/faq.html#xtarntape for more information on that.


For those who are interested:
The tools esbdump, esbrestore, esbmt, rmt and the smtc tape device "driver" are free to use and are included in ES-Backup http://www.ugsoft.de/intl/esbackup . No registration nor activation keys required to use the shell commands. See included License document. Since no source code is included one won't be able to learn how to do the SCSI programming on OS X, though. In addition to the functionality of the corresponding Unix tools such as the standard dump tape format, our tools offer support for Mac OS X file attributes, resource forks, etc., as well as direct tape positioning during restore which make them usefull for today's large amounts of backup data. Also, these tools are used in our commercial product ES-Backup on Mac OS X Intel and PPC, Solaris SPARC and x86, Linux x86 - but this is off-topic.




The officially supported interface is SCSITaskDeviceInterface, from a user client. Sorry for the confusion.

I thought I've missed something ;-)

Uwe


Rohan: This means "no, you can not use an ioctl".

-- Terry

On Jul 23, 2009, at 7:04 AM, email@hidden wrote:
Am 23.07.2009 um 13:26 schrieb Terry Lambert:
Did you go to <http://developer.apple.com> and read the document "SCSI Architecture Model Device Interface Guide"?

It states:

"By design, Mac OS X does not allow applications to send SCSI or ATA commands to storage devices unless the application developer also provides an in-kernel device driver that supports the commands."

One of the intents if this is to allow the driver to model state for such coomands such that the state if the device is known to the driver at all times.

For standard tape devices, you should not need to write your own driver; if you plug the device in, it will show up in /dev,

Never seen a tape drive, neither SCSI, FireWire, USB nor FibreChannel connected to Mac OS X 10.2 up to 10.5 which shows up in /dev. What device filename should I look for?


and you can at least issue reads, writes, and standard commands, such as causing a rewind, via the device file. For non-standard commands, such as you would use to control loading and unloading tapes in a tape robot, etc., you will need to write an in-kernel driver that knows how to talk to the hardware and subclasses the more generic device (i.e. the IOKit model lets you write only the missing pieces implementing the missing control commands; you don't write a whole driver that implements read/write/etc.).

Instead we use SCSITaskDeviceInterface functions from userland as described in Apple's SCSI Architecture Model Device Interface Guide "WorkingWithSAM.pdf" in order to implement a "SCSI pass-thru" functionality. No additional driver required.



Uwe




_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Sending SCSI commands in Mac OS X
      • From: rohan a <email@hidden>
References: 
 >Sending SCSI commands in Mac OS X (From: rohan a <email@hidden>)
 >Re: Sending SCSI commands in Mac OS X (From: rohan a <email@hidden>)
 >Re: Sending SCSI commands in Mac OS X (From: Terry Lambert <email@hidden>)
 >Re: Sending SCSI commands in Mac OS X (From: email@hidden)
 >Re: Sending SCSI commands in Mac OS X (From: Terry Lambert <email@hidden>)

  • Prev by Date: Re: Sending SCSI commands in Mac OS X
  • Next by Date: Crashreport for iPhone apps
  • Previous by thread: Re: Sending SCSI commands in Mac OS X
  • Next by thread: Re: Sending SCSI commands in Mac OS X
  • Index(es):
    • Date
    • Thread