[sane-devel] Uninterrupted HP LaserJet M1005 Backend
couriousous at mandriva.org
Thu Jan 31 21:31:00 UTC 2008
> If break scaning with signal 2, then see next:
> 1. backend stalled into sane_cancel.get_data... - next step only
> 'killall scanimage'
Ok, this is because sane_cancel() is called from a signal handler. I've
re-read the sane API documentation and the backend should handle that.
The problem is that sane_cancel is called while a sanei_usb_read_bulk() is in
flight. But the only known way to cancel the scan is to do it until the end
(remainder: the whole backend has been reverse engineered, there may be a way
to do it cleanly but I don't know it). So sane_cancel() try to read the data
and throw them away.
But to read the data we must call sanei_usb_read_bulk(). Which seems to lead
to a deadlock (I suspect this is because libusb use poll() to check if data
I'm trying to fix this, but I don't see any "easy" solutions. So suggestions
are welcome !
> 2. MFP stalled with display message 'Scanning to PC' - only power
> off/on help
This is because the backend has not sent a "revert into idle mode" packet to
the MFP. The MFP will "timeout" and go itself into "Ready" mode after some
time (2-5 minutes).
More information about the sane-devel