[sane-devel] OS X Firewire support

Henning Meier-Geinitz henning@meier-geinitz.de
Thu, 21 Aug 2003 12:28:07 +0200


On Sun, Aug 17, 2003 at 02:47:33PM +0200, Guy Brooker wrote:
> OK, a zip archive for the patch to 1.0.12 is available at
> http://homepage.mac.com/guy_brooker/.cv/guy_brooker/Public/Sane/sane-backend
> s-1.0.12-osx.zip-link.zip

Thanks for your work.

I've applied the patch to SANE CVS. I've changed all the "//" comments
to "/* */" because otherwise SANE doesn't compile with warnings
enabled on my system.

I can't test on MacOS X, so some reports about success/failure woruld
be nice (in case I broke something).

Maybe you or someone else could also have a look at README.darwin and
make sure it's uptodate.

An unofficial snapshot of the current CVS is here:

> It still supports the previous implementation which uses the deprecated SCSI
> Family IOKit API, so all being well it should not break anything that has
> previously worked.

> I have added some #ifdefs which may allow it to be compiled when either the
> old or new i/f are not available, but this has not been tested. To use just
> the old API, compile with OSX_ONLY_10_1_API defined, and to use just the new
> API, compile with OSX_ONLY_10_2_API defined. By default neither are defined,
> and both APIs are used.

What happens if someone only has 10.1? Does it break compilation or
just not use the new interface? If it breaks, some autoimatic test in
configure would be nice.

> % scanimage -L             device
> `epson:iokitscsi@<04502000001222af34a59175>' is a Epson GT-7000 flatbed
> scanner
> As does xsane (which I installed using fink)
> The only problem I have is that both these tools need dll.conf and
> epson.conf in the current working directory, they don't find the version in
> the standard location for some reason. I'll look into that later, but I
> don't think it has anything to do with my changes.

Maybe something with the path delimiter is wrong?

> As you can see from above, the device name is made up, and I use the text
> 'iokitscsi@<' followed by the SCSIUserClient GUID from the IO Registry. That
> is the unique ID for the client, and allows me to refind the device very
> quickly. The only problem is that the number will change after reboot, or if
> the device is unplugged, and replugged into the firewire port.

Is the device detected correctly by just using the "scsi ..."
directives in the backend files? In this case the actual name doesn't
leally matter. That's similar to USB devices supported by libusb. The
name changes after every replug.

> 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.