[sane-devel] Mac OS X: sane pixma (not) scanning via network
nicolas.martin at freesurf.fr
Wed Apr 1 20:11:20 UTC 2009
Have taken a look at the libusb/darwin.c code, and as far as I can see,
usb _interrupt_ read sequences do not support a timeout. Timeouts are
only used for normal read or write operations.
Now I understand the meaning of the last message that appears in your
"USB pipe is an interrupt pipe. Timeouts will not be used."
In the pixma backend, usb interrupt reads are regularly performed to
check for presence of an interrupt message provided by the scanner, for
status report, scan button state report, or time request.
A normal behavior of the libusb is to use the timeout, and if no such
interrupt message is sent by the scanner, backend processing goes on.
But with the MAC OS X libusb (darwin.c), this timeout, as not used,
makes the interrupt read statement to never end, that's why the backend
seems to get stuck there.
It is waiting indefinitely in read mode for an interrupt message, that
never comes as the scanner doesn't have anyone to send.
The question now is: why libusb on MAC OS X does not use timeouts for
interrupt reads, like libusb on Linux ?
Don't know the reason yet.
Le mercredi 01 avril 2009 à 09:36 -0700, Peter Schoenrank a écrit :
> On 09-Mar-31, at 14:00, Nicolas Martin wrote:
> > Following Louis idea, I tried to change some timing constants around
> > usb
> > timeouts.
> > Could you give a try to it, just replace the 2 place files to replace
> > the existing ones in your Sane CVS directory (subdir backend) and
> > recompile/reinstall, then try it with the same command as you did
> > before.
> Saved pixma_io_sanei.c and pixma_io.h to
> $ cd ~/Desktop/scanning_from_the_command_line/sane-scm-2009-03-27/sane-
> $ sudo make uninstall
> $ make distclean
> $ export BACKENDS="canon pixma"
> $ ./configure
> $ make
> $ sudo make install
> $ cd ~/Desktop/scanning_from_the_command_line/2009-03-27_sane_testing.8/
> $ export SANE_DEBUG_SANEI_USB=255
> $ export SANE_DEBUG=255
> $ export SANE_DEBUG_PIXMA=20
> $ scanimage -T &> scanimage-T.log
> scanimage hangs, apparently in the same place as before. The log is
> available as
> Would you like me to try again after first turning on USB Probe?
> Peter Schoenrank
> mailto: peter at schoenrank.ca
> phone: 250-655-6753
More information about the sane-devel