Am 06.11.2013 02:50, schrieb human2013odd at icebubble.org:
> Rolf Bensch writes:
>
>> Please check scanner's raw data with this patch:
>
>
>
> With that patch applied, the raw data exhibits the same color shifting.
> See attached PNM.
>
Please check color shifting for all resolutions. By now the scanners
don't need any color shifting @ 75dpi. It seems that your scanner needs
different color shift handling.
>> There is a well known bug for ADF scans. If you like I can send you some
>> test code so that we can fix this issue. I have no ADF scanner to test
>> this by myself.
>
> Sure, I'd be happy to test it.
>
I attached patch files for pixma.c and for pixma_mp150.c.
The problem seems to be inside pixma.c or pixma_common.c. Pixma backend
uses two independent processes for scanner control:
(1) send scan parameters and start / stop around reader_loop() in
pixma.c and pixma_common.c which call functions in pixma_mp150.c.
(2) read image data using sane_read() in pixma.c.
Until last summer pthread support was disabled by default. This avoided
data exchange between both processes. Now we have 2 threads which can
use e.g. the struct ss for data exchange.
You can see functional behaviour with enabled debug messages: 'export
SANE_DEBUG_PIXMA=4'. You can use macro PDBG (pixma_dbg (4, ...)) to add
additional debug info.
After the last page the scanner is programmed to scan an empty page and
detect paper empty.
At the first page the scanner is initialised with start_session(s) and
after the last page the scanner is closed with abort_session(s), both in
pixma_mp150.c. Between scanning single pages the scanner stays idle. You
can find all scanner related functions in pixma_mp150.c.
An interesting value is the no. of scanned ADF pages which is controlled
with the parameters sp->adf_pageid or s->param->adf_pageid and
ss->page_count.
>> Your scanner should also button controlled. Please test this patch:
>
>
>
> With that patch applied, the button status is correctly reflected by
> "scanimage -A", and the buttons can be used in --button-controlled=yes
> mode. However, button control is buggy:
>
> 1. If you press Gray to cancel, scanimage exits as expected, but the
> scanner sits there (waiting for something) and can't be used. After
> about 30 seconds, it times out, and the scanner can be used again.
>
> 2. If you press one of the buttons before scanimage has a chance to
> poll button status, the scanner does the same thing (just wait).
> After the scanner times out and comes back to reality, a subsequent
> button press is received and processed by scanimage correctly.
>
Please check if you can see any differences in the USB protocols in both
cases. You can enable debug output for USB protocols with 'export
SANE_DEBUG_PIXMA=11'.
I'm using scanbd for button controlled scanning. I attached my config files.
Cheers,
Rolf
-- next part --
A non-text attachment was scrubbed...
Name: pixma.c.patch
Type: text/x-patch
Size: 415 bytes
Desc: not available
URL:
<http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20131108/9477e033/attachment-0003.bin>
-- next part --
A non-text attachment was scrubbed...
Name: pixma_mp150.c.patch
Type: text/x-patch
Size: 2774 bytes
Desc: not available
URL:
<http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20131108/9477e033/attachment-0004.bin>
-- next part --
/*
* $Id: scanbd.conf 157 2013-01-06 07:42:46Z wimalopaan $
*
* scanbd - KMUX scanner button daemon
*
* Copyright (C) 2008 - 2013 Wilhelm Meier (wilhelm.meier at fh-kl.de)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
USA.
*/
# global settings
global {
# turn on debugging
# log to console
debug = true
# debug logging
# 1=error, 2=warn, 3=info, 4-7=debug
debug-level = 0
# drop priviliges to this user
#=
# Linux:
# user= saned # root
# *BSD
# user= root
user= saned