Re: [linux-minidisc] scsi test tool using cdrtools/libscg
On Mon, May 31, 2010 at 07:58:26AM +0200, Thomas Arp wrote:
> > On the other hand we still have the problem that apparently we cannot
> > send any SCSI commands to non-CD/DVD/BD drives on MacOS X. We will
> > need to patch cdrtools as well, so that it will also work with the
> > HiMD. When connecting a USB cdrom, the drive is detected by "cdrecord
> > -scanbus" so it's not an issue with the bus but rather with the drive
> > type.
> >
> > Any ideas? Michael was already suggesting that it's a matter of
> > cdrecord using the SCSI driver from MacOS which provides access to the
> > optical drives only.
>
> Can you check the source code?
>
> Take a look at libscg/scsi-mac-iokit.c on line 137ff.
> "LOCAL char *devnames[]" seems to hold the Services which are
> used by libscg.
> You can try to append "IOSCSIPeripheralDeviceNub" and test
> if this works.
I appended "IOSCSIPeripheralDeviceNub" and re-compiled
cdrtools. However, cdrecord --scanbus still doesn't see the HiMD
Walkman. However, it seems that you are on the correct trail.
There is a command line utility called "ioreg" on MacOS X. Calling it
with the HiMD Walkman connected results in:
minimac2:~ zedv$ ioreg |grep Nub
| | | +-o IOSCSIPeripheralDeviceNub <class IOSCSIPeripheralDeviceNub, id 0x0, registered, matched, active, busy 0 (539 ms), retain 6>
| | | +-o com_sony_driver_SonyMagicGateNub <class com_sony_driver_SonyMagicGateNub, id 0x0, registered, matched, active, busy 0 (199 ms), retain 6>
| | | | +-o ATADeviceNub@0 <class ATADeviceNub, id 0x0, registered, matched, active, busy 0 (225 ms), retain 6>
| | | | +-o IOSCSIPeripheralDeviceNub <class IOSCSIPeripheralDeviceNub, id 0x0, registered, matched, active, busy 0 (62 ms), retain 6>
So "IOSCSIPeripheralDeviceNub" is the correct interface to use. But
for some reason, cdrecord doesn't see the HiMD Walkman even though it
should be scanning that interface as well.
Adrian