[sane-devel] One Step Closer to Mac OS X Support

Henning Meier-Geinitz henning at meier-geinitz.de
Sun Nov 3 22:26:08 GMT 2002


Hi,

On Sun, Nov 03, 2002 at 03:59:20PM -0500, Karl Heinz Kremer wrote:
> I almost got my backend working today with Mac OS X. The most
> important step was a fix to sanei_usb.c (the diff is attached
> to this email). I am not that familiar with USB in general
> or libusb to determine if this is safe for all platforms. 
> all I know is it works on Linux as well. 

Looks like you are right. The libusb documentation only talks about
the endpoint (ep) and doesn't mention if the direction flag should be
added. The documentation for libusb0.1.7beta is a bit better but also not
that clear.

The linux.c code has some checks to make sure, that the direction is
there so it doesn't matter with Linux. darwin.c doesn't have this
check. The comment " /* Ensure the endpoint address is correct */"
looks like they really expect the complete endpoint address +
direction.

Please apply this fix to CVS.

There are some more assumptions in the open code concerning
configuration/interface/altsetting that may need someone to check. I
just use the first available settings without checks. That seems to
work so far, but I'm not sure, if it's just good luck.

> After corecting one byteorder problem in my backend, I was
> actually able to initialize the backend, report all the 
> options to XSane (including the dynamic stuff frm the
> scanner) and to start a scan. I then got all the data
> for a low resolution scan, but the acknowledge message
> that the backend sends to the scanner never made it out -
> the bulk write command just hangs. 

I have similar problems with The mustek_usb and gt68xx backends and
all the BSDs. With mustek_usb I can scan once, but after the device is
closed, it can't be opened again (every command is ignored). That
happens with both libusb and the kernel scanner driver. Looks like
nobody is really interested in these scanners under BSD because my bug
reports for FreeBSD and the scanner driver seem to be ignored.

Bye,
  Henning



More information about the sane-devel mailing list