[sane-devel] Mac OS X: sane pixma (not) scanning via network

Louis Lagendijk louis at lagendijk.xs4all.nl
Fri Mar 27 21:01:25 UTC 2009

Hi Peter
Thanks for your patience. Here is some more input....
On Fri, 2009-03-27 at 11:27 -0700, Peter Schoenrank wrote:
> On 09-Mar-26, at 14:17, Louis Lagendijk wrote:
> > This could be because the MX850 is not connected on that Lan (duh)
> So, I disconnected the USB cable and connected the MX850 to my D-Link  
> switch.
> Then, from the 10.5 iMac (which currently has gettext 0.17, libusb  
> 0.1.13 beta 2009-02-22 and sane-backends 1.1.0-cvs 2009-02-20 as  
> packaged for Mac OS X 10.5 by Mattias Ellert, and which does not  
> currently have the Canon software installed),
> $ cd ~/Desktop/scanning_from_the_command_line
> $ mkdir 2009-03-27_sane_testing.3
> $ cd 2009-03-27_sane_testing.3
> $ export SANE_DEBUG_SANEI_USB=255
> $ export SANE_DEBUG=255
> $ export SANE_DEBUG_PIXMA=20
> $ sane-find-scanner &> sane-find-scanner.log
> $ scanimage -L &> scanimage-L.log
> device `pixma:04a9172c_d1da4f' is a CANON Canon PIXMA MX850 multi- 
> function peripheral
great, very well documented!!!

> $ scanimage -d pixma:04a9172c_d1da4f -T &> scanimage-T.log

If scanimage finds only one scanner you can leave the -d parameter off
as it will pick the last auto-detected scanner.

> FAIL Error: Error during device I/O
> [pixma] pixma_close(): Canon PIXMA MX850
> [pixma] sanei_bjnp_close(1):
> The scanimage process doesn’t hang, but the MX850 is left showing the  
> message  "scanner is warming up" on its front panel. The message never  
> clears; pressing the Cancel button on the front panel results in  
> beeping; the MX850 must be power-cycled.
Ok, scanning starts, but apparently you may be running into a bug I
fixed recently. You are not blocked by the firewall. I unfortunately
deleted your old mails to the list, so I could not check whether you
could compile the sane code yourself. Could you compile a recent CVS
version? I hate having to ask this. Fortunately you are not dependent on
libusb anymore. otherwise we may have to ask Mathias if he could kindly
compile a recent CVS version?
Nicolas, could it be an issue that even over USB, there is a problem
with the button scanning code? I completely disabled that in the bjnp
code after Raoul problems. It may be a long shot, but so far we seem to
have no real clue as to what is happening.Could this be causing the
problems for Peter? In the logs that Peter included now, my code is
loosing contact with the scanner after an interrupt read. Anyhow, using
a recent CVS should solve that issue for the bjnp interface.....

> The system log shows
> kernel[0]: USBF:	116.185	AppleUSBEHCI[0x6a52800]::Found a transaction  
> past the completion deadline on bus 0xfd, timing out! (Addr: 2, EP: 0)
> kernel[0]: USBF:	118.186	AppleUSBEHCI[0x6a52800]::Found a transaction  
> past the completion deadline on bus 0xfd, timing out! (Addr: 2, EP: 0)
> but that appears to be a result of the sane-find-scanner command.
Right, this is caused by the "old" USB based scan. The BJNP code
emulates USB over IP, so it bypasses the kernel USB code as well as
libusb. So we should not run into the problems you were having over USB
if the error is in the kernel or libusb. 

> The complete logs are available at
> http://members.shaw.ca/schoenrank.ca/2009-03-27_sane_testing.3/
which show that the bjnp code looses the connection to the scanner (see
scanimage-T.log showing bjnp_recv_header: could not read response header
(select): Resource temporarily unavailable!).
I wish I could get my hands on a Mac to test myself.....
> Peter
> -----
> Peter Schoenrank
> mailto: peter at schoenrank.ca
> phone: 250-655-6753

More information about the sane-devel mailing list