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 logs:
"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. Nicolas 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 > ~/Desktop/scanning_from_the_command_line/sane-scm-2009-03-27/sane- > backends/backend/ > > then > > $ cd ~/Desktop/scanning_from_the_command_line/sane-scm-2009-03-27/sane- > backends/ > $ 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 > http://members.shaw.ca/schoenrank.ca/2009-03-27_sane_testing.8/scanimage-T.log > > Would you like me to try again after first turning on USB Probe? > > > > Peter > ----- > Peter Schoenrank > mailto: peter at schoenrank.ca > phone: 250-655-6753 >