[sane-devel] OS X Firewire support
Fri, 22 Aug 2003 17:45:43 +0200
On Thu, Aug 21, 2003 at 05:44:43PM +0200, Guy Brooker wrote:
> >> sane-find-scanner does not work, as it hard codes device names for each
> >> platform. Just use scanimage -L
> > Someone could add support to sane-find-scanner to use the MacOS API
> > :-) For libusb, there are already special functions.
> Sure, as long as it is OK to call sanei_scsi_find_devices from
I think it is ok to do that.
> I had looked at the code of sane-find-scanner, and was surprised to see that
> instead of calling sanei_scsi_find_devices like the frontend/backends, it
> seems to have hardcoded device names in /dev that it tries one after the
> other for specific platforms. I assumed this was to provide an alternative
> method for looking for devices than scanimage -L.
I'm not sure if this is really the reason. My guess is that in the
early SANE releases you had to hardcode the device file (e.g.
/dev/sg2) or use the /dev/scanner link. Therefore you needed a way to
find the scanner's device file. Probably sanei_scsi_find_devices is
just newer (and not implemented on every platform).
> As there is no equivalent on OS X, I assumed there was no need to add
> anything to that command, but it should be straightforward to add a
> call to sanei_scsi_find_devices to ensure completeness if you would
> like me to.
It's not high-priority but I think it may help to locate problems when
a scanner is found by the operating system but not by a backend.
And it would stop questions from Mac OS X users like "Why is my
scanner not found by sane-find-scanner?"
> My assumption is that I would call it with no vendor/device lun etc to match
> (so it will find all scanner types on all busses) and an attach routine that
> just lists the device name, and vendor/model name from the registry, without
> calling any of the backends. Does that sound correct/useful ?
Yes. Look at sanei_scsi.c itsself, sanei_scsi_find_devices() is called
there in a similar way to find out the buffer size.