[sane-devel] Canon MX430 / MX510 / MX925 - does not recover when ADF out of paper

2014-03-21 Thread Rolf Bensch
Hi Matthias,

I need a new log file for this issue:

>>> And in the debug level 11 Iog I stopped the 2nd paper by hand.
>>> Scanner and sane aborts. But after removing the paper and pressing
>>> ok on the device, nothing happens anymore.

and the 2nd patch is for this issue:

>>> By the way. The timeouts in the sane logs are still rediculous.
>>> When it counts down, between each line it waits up the 40 seconds
>>> and not the amount of seconds it says in the log.

and please test normal ADF scanning again.

Cheers,
Rolf


Am 21.03.2014 00:16, schrieb Matthias Peter Walther:
> Hello,
> 
> I'm not sure if I did this right. I installed the two patches shipped
> with your last email and used this command:
> 
> $ export SANE_DEBUG_PIXMA=11
> $ scanimage -x 100 -y 100 > test.png 2>
> Scanimage_Debug_11_patch1+2+3new+4+Pressed_cancel_after_device_started.txt
> 
> After the scanner started, I pressed cancel on the device. Is this what
> you need?
> 
> Bye
> Matthias
> 
> 
> Am 20.03.2014 18:05, schrieb Rolf Bensch:
>> Hi Matthias,
>>
>> Please don't mix different testings in one log file and at the same
>> time. Please keep them in mind and let us go step by step.
>>
>> I assume that "normal" ADF scanning works with new patch 3.
>>
>> Am 19.03.2014 19:46, schrieb Matthias Peter Walther:
>>> Standard debug level 4 scan, the last 1 mm is still missing. As this
>>> seems to be firmware related, I think sane won't be able to change this.
>>> The linux binary has the same problem. And I tested it in windows with
>>> IrfanView. The last mm is still missing under windows, too. I think this
>>> is a firmware issue?
>>>
>> I guess the ADF hardware needs the last 1mm for the paper detector.
>>
>>> Maybe you just set the maximum height of an adf page to that last line
>>> it scans. That is 870 pixels @75 dpi.
>>>
>> I won't do so. What's when you want to scan a 14" sheet or A5 format?
>> Please set the used paper size in the frontend. Then you can also crop
>> left and right ADF frame.
>>
>>> And in the debug level 11 Iog I stopped the 2nd paper by hand. Scanner
>>> and sane aborts. But after removing the paper and pressing ok on the
>>> device, nothing happens anymore.
>>>
>> I see this error in the log file: "cancelled by hardware". The problem
>> is that the scan process has not been closed and the scanner cannot be
>> initialised for a new scan session because the previous is still active
>> in the scanner.
>>
>> To fix this I need the exact position in the code where "cancelled by
>> hardware" is detected. Please create a new log file with usb messages
>> with attached patch "pixma_mp150.c.patch4".
>>
>> And please scan a small area @ 75 dpi, not a whole page. This reduces
>> log file size.
>>
>>> The same bug comes, if you interrupt the scan with ctrl + C (scanimage).
>>> The printer continues pulling pages, but does not recover after it has
>>> finished. That works correctly with the binary. If I recover the scanner
>>> with the binary driver, that requires up to three attempts. During the
>>> first and often the second, it searches the scanner for 2 minuites and
>>> aborts then. After that the second failure the scanner works prefectly
>>> again. Maybe it's just a timeout in the devices firmware?
>>>
>> I assume that this is the same problem as above.
>>
>>> By the way. The timeouts in the sane logs are still rediculous. When it
>>> counts down, between each line it waits up the 40 seconds and not the
>>> amount of seconds it says in the log.
>>>
>> Maybe "pixma_common.c.patch4" will fix this.
>>
>>> I had to zip the logs, cause they are larger than 100 KB and the mailing
>>> list server doesn't accept that.
>>>
>>> Last question: Is it possible to autodetect if adf has paper and
>>> autoswitch the input method? Some scanner are able to do that.
>>>
>> Please keep this in mind.
>>
>> Cheers,
>> Rolf
> 



[sane-devel] Canon MX430 / MX510 / MX925 - does not recover when ADF out of paper

2014-03-20 Thread Rolf Bensch
Hi Matthias,

Please don't mix different testings in one log file and at the same
time. Please keep them in mind and let us go step by step.

I assume that "normal" ADF scanning works with new patch 3.

Am 19.03.2014 19:46, schrieb Matthias Peter Walther:
> 
> Standard debug level 4 scan, the last 1 mm is still missing. As this
> seems to be firmware related, I think sane won't be able to change this.
> The linux binary has the same problem. And I tested it in windows with
> IrfanView. The last mm is still missing under windows, too. I think this
> is a firmware issue?
> 

I guess the ADF hardware needs the last 1mm for the paper detector.

> Maybe you just set the maximum height of an adf page to that last line
> it scans. That is 870 pixels @75 dpi.
> 

I won't do so. What's when you want to scan a 14" sheet or A5 format?
Please set the used paper size in the frontend. Then you can also crop
left and right ADF frame.

> And in the debug level 11 Iog I stopped the 2nd paper by hand. Scanner
> and sane aborts. But after removing the paper and pressing ok on the
> device, nothing happens anymore.
> 

I see this error in the log file: "cancelled by hardware". The problem
is that the scan process has not been closed and the scanner cannot be
initialised for a new scan session because the previous is still active
in the scanner.

To fix this I need the exact position in the code where "cancelled by
hardware" is detected. Please create a new log file with usb messages
with attached patch "pixma_mp150.c.patch4".

And please scan a small area @ 75 dpi, not a whole page. This reduces
log file size.

> The same bug comes, if you interrupt the scan with ctrl + C (scanimage).
> The printer continues pulling pages, but does not recover after it has
> finished. That works correctly with the binary. If I recover the scanner
> with the binary driver, that requires up to three attempts. During the
> first and often the second, it searches the scanner for 2 minuites and
> aborts then. After that the second failure the scanner works prefectly
> again. Maybe it's just a timeout in the devices firmware?
> 

I assume that this is the same problem as above.

> By the way. The timeouts in the sane logs are still rediculous. When it
> counts down, between each line it waits up the 40 seconds and not the
> amount of seconds it says in the log.
> 

Maybe "pixma_common.c.patch4" will fix this.

> I had to zip the logs, cause they are larger than 100 KB and the mailing
> list server doesn't accept that.
> 
> Last question: Is it possible to autodetect if adf has paper and
> autoswitch the input method? Some scanner are able to do that.
> 

Please keep this in mind.

Cheers,
Rolf
-- next part --
--- ./pixma_mp150.c 2014-03-20 17:37:13.0 +0100
+++ ../sane-backends/backend/pixma_mp150.c  2014-03-20 17:41:28.0 
+0100
@@ -1485,7 +1485,10 @@
   do
 {
   if (s->cancel)
+  {
+PDBG (pixma_dbg (4, "*mp150_fill_buffer* s->cancel  *\n"));
 return PIXMA_ECANCELED;
+  }
   if ((mp->last_block & 0x28) == 0x28)
 {  /* end of image */
PDBG (pixma_dbg (4, "*mp150_fill_buffer* end of image  
*\n"));
@@ -1497,6 +1500,7 @@
   error = read_image_block (s, header, mp->imgbuf + mp->data_left_len);
   if (error < 0)
 {
+  PDBG (pixma_dbg (4, "*mp150_fill_buffer* error = %d  *\n", 
error));
   if (error == PIXMA_ECANCELED)
 {
/* NOTE: I see this in traffic logs but I don't know its 
meaning. */
-- next part --
--- ./pixma_common.c2014-03-20 17:37:13.0 +0100
+++ ../sane-backends/backend/pixma_common.c 2014-03-20 17:55:36.0 
+0100
@@ -657,7 +657,7 @@
   if (error == PIXMA_ETIMEDOUT)
   {
 PDBG (pixma_dbg (2, "No response yet. Timed out in %d sec.\n", tmo));
-pixma_sleep (100);  /* 1s timeout */
+/*pixma_sleep (100);*/  /* 1s timeout */
   }
 }
   while (error == PIXMA_ETIMEDOUT && --tmo != 0);


[sane-devel] Canon MX370 / MX430 / MX510 / MX925 - Button Support

2014-03-20 Thread Rolf Bensch
Hi Matthias,

Please test all buttons and look if the debug output will change. The
code says that some scanners ask to set the time when byte 3 is set.

Cheers,
Rolf


Am 19.03.2014 00:31, schrieb Matthias Peter Walther:
> Hello,
> 
> I think it works. That would be so cool.
> 
> Thank you so much for your work on this and with the adf, too!
> 
> I'll try out scanbd later. Do I have to do further code changes or is
> scanbd supposed to work just like that with that single additional line?
> 
> Is it capable of detecting different buttons? So that it would be
> possible to sort the scans into different directories by different
> buttons? That would be so awesome. I pressed the button '9' on the
> dialpad. I think the menu buttons doesn't work, but the numbers do.
> 
> Bye
> Matthias
> 
> Am 18.03.2014 23:13, schrieb Rolf Bensch:
>> Hi,
>>
>> If you like, please test button support for your scanner.
>>
>> If button support is working, you can use scanbd to control scanning via
>> your scanner's buttons. You can find more infos about this in the
>> mailing lists archive, e.g. here:
>> http://sane.10972.n7.nabble.com/template/NamlServlet.jtp?macro=search_page&node=3&query=scanbd&days=0&sort=date
>>
>> To enable button support, add one single line with your scanner-pid in
>> file pixma_mp150.c in function handle_interrupt() between lines 927 and
>> 928, e.g.
>> || s->cfg->pid == MX370_PID
>>
>> Test procedure:
>> (1) 'export SANE_DEBUG_PIXMA=11'
>> (2) press any button
>> (3) check output from 'scanimage -A'
>>
>> You should see something like this:
>>
>>   Buttons:
>> --button-update
>> Update button state
>> [pixma] INTR T=1.670 len=32
>> [pixma]  :00 40 00 00 00 00 00 00  00 00 00 00 00 00 00 00
>> [pixma]  0010:00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
>> [pixma]
>> --button-1  [1] [read-only]
>> Button 1
>> --button-2  [0] [read-only]
>> Button 2
>> --original  [0] [read-only]
>> Type of original to scan
>> --target  [4] [read-only]
>> Target operation type
>> --scan-resolution  [0] [read-only]
>> Scan resolution
>>
>> Please report your results.
>>
>> Cheers,
>> Rolf
> 



[sane-devel] Canon MX430 / MX510 / MX925 - does not recover when ADF out of paper

2014-03-19 Thread Rolf Bensch
Hi,


Am 19.03.2014 00:12, schrieb Matthias Peter Walther:
> Hallo Rolf,
> 
> that one screwed it. The scanner scans the first page, starts loading
> the second one and aborts. See the attached log. I inserted 3 papers as
> usual.
> 

This was my fault. Please try attached patch as replacement for last
patch 3.

> The image size is 638x1050 (standard resolution, I think that is 75 or
> 150(?)). The image is in relation much higher than wide as a standard
> German DinA4 paper now, but the filled/scanned area is exact the same,
> last 1mm is still missing and the rest is plain, digital white. I think
> there might be a maximum hight the firmware of the scanner can handle in
> adf mode. How can we smartly test that? Or do we have to do that by hand?
> 

Yes, maximum paper height is 1050 px @ 75 dpi. The ADF units stops
scanning at paper end and the frontend saves excepted paper height of
1050 px, except the frontend (user) sets a shorter height.

> There's another adf related iussue: If something goes wrong with the
> hardware/pulling in of the papers, sane aborts and gets status 9. The
> only way to get the device out of this and to work again, is to restart
> the device or to once load the binary and close it. Could you look into
> there, if there is a command to reset the scanner somehow? See second
> log attached, tested with patch1+2 only.
> 

Please send me a log file with enabled usb outputs (export
SANE_DEBUG_PIXMA=11).

Cheers,
Rolf
-- next part --
--- ./pixma_mp150.c 2014-03-18 21:57:18.0 +0100
+++ ../sane-backends/backend/pixma_mp150.c  2014-03-18 22:11:32.0 
+0100
@@ -1273,22 +1273,8 @@
 
   /* Some exceptions here for particular devices */
   /* Those devices can scan up to 14" with ADF, but A4 11.7" in flatbed */
-  if (( s->cfg->pid == MX850_PID ||
-s->cfg->pid == MX860_PID ||
-s->cfg->pid == MX870_PID ||
-s->cfg->pid == MX880_PID ||
-s->cfg->pid == MX320_PID ||
-s->cfg->pid == MX330_PID ||
-s->cfg->pid == MX340_PID ||
-s->cfg->pid == MX350_PID ||
-s->cfg->pid == MX360_PID ||
-s->cfg->pid == MX410_PID ||
-s->cfg->pid == MX420_PID ||
-s->cfg->pid == MX510_PID ||
-s->cfg->pid == MX920_PID ||
-s->cfg->pid == MX7600_PID )
-   &&
-sp->source == PIXMA_SOURCE_FLATBED)
+  /* PIXMA_CAP_ADF also works for PIXMA_CAP_ADFDUP */
+  if ((s->cfg->cap & PIXMA_CAP_ADF) && sp->source == PIXMA_SOURCE_FLATBED)
 sp->h = MIN (sp->h, 877 * sp->xdpi / 75);
 
   if (sp->source == PIXMA_SOURCE_TPU)
@@ -1343,8 +1329,7 @@
 
   /* Generation 4: send XML dialog */
   /* adf: first page or idle */
-  if ((mp->generation == 4 && s->param->adf_pageid == 0) ||
-  mp->adf_state == state_idle)
+  if (mp->generation == 4 && mp->adf_state == state_idle)
 {
   if (!send_xml_dialog (s, XML_START_1))
 return PIXMA_EPROTO;
@@ -1402,10 +1387,8 @@
 
   tmo = 10;
   /* adf: first page or idle */
-  if ((s->param->adf_pageid == 0 || mp->generation <= 2) ||
-  mp->adf_state == state_idle)
+  if (mp->generation <= 2 || mp->adf_state == state_idle)
 { /* single sheet or first sheet from ADF */
-  /* TODO: s->param->adf_pageid != 0 @ next scan session! */
   PDBG (pixma_dbg (4, "*mp150_scan* start scanning *\n"));
   error = start_session (s);
   while (error == PIXMA_EBUSY && --tmo >= 0)
@@ -1505,11 +1488,6 @@
 return PIXMA_ECANCELED;
   if ((mp->last_block & 0x28) == 0x28)
 {  /* end of image */
-   /* TODO: reset ADF page counter here!
-*   there are 2 counters: s->param->adf_pageid == 
sp->adf_pageid and
-* ss->page_count (see pixma.c)
-*   OR
-*   define a new parameter in mp150_t for new session 
detection in mp150_scan() */
PDBG (pixma_dbg (4, "*mp150_fill_buffer* end of image  
*\n"));
mp->state = state_finished;
return 0;
@@ -1686,8 +1664,8 @@
   DEVICE ("Canon PIXMA MP610", "MP610", MP610_PID, 4800, 0, 0, 638, 877, 
PIXMA_CAP_CIS),
 
   DEVICE ("Canon PIXMA MX300", "MX300", MX300_PID, 600, 0, 0, 638, 877, 
PIXMA_CAP_CIS),
-  DEVICE ("Canon PIXMA MX310", "MX310", MX310_PID, 1200, 0, 0, 638, 877, 
PIXMA_CAP_CIS | PIXMA_CAP_ADF),
-  DEVICE ("Canon PIXMA MX700", "MX700", MX700_PID, 2400, 0, 0, 638, 877, 
PIXMA_CAP_CIS | PIXMA_CAP_ADF),
+  DEVICE ("Canon PIXMA MX310", "MX310", MX310_PID, 1200, 0, 0, 638, 1050, 
PIXMA_CAP_CIS | PIXMA_CAP_ADF),
+  DEVICE ("Canon PIXMA MX700", "MX700", MX700_PID, 2400, 0, 0, 638, 1050, 
PIXMA_CAP_CIS | PIXMA_CAP_ADF),
   DEVICE ("Canon PIXMA MX850", "MX850", MX850_PID, 2400, 0, 0, 638, 1050, 
PIXMA_CAP_CIS | PIXMA_CAP_ADFDUP),
   DEVICE ("Canon PIXMA MX7600", "MX7600", MX7600_PID, 4800, 0, 0, 638, 1050, 
PIXMA_CAP_CIS | PIXMA_CAP_ADFDUP),
 
@@ -1716,7 +1694,7 @@
   DEVICE ("Canon PIXMA MX360", "MX360", MX360_PID, 1200, 0, 0, 638

[sane-devel] Canon MX370 / MX430 / MX510 / MX925 - Button Support

2014-03-18 Thread Rolf Bensch
Hi,

If you like, please test button support for your scanner.

If button support is working, you can use scanbd to control scanning via
your scanner's buttons. You can find more infos about this in the
mailing lists archive, e.g. here:
http://sane.10972.n7.nabble.com/template/NamlServlet.jtp?macro=search_page&node=3&query=scanbd&days=0&sort=date

To enable button support, add one single line with your scanner-pid in
file pixma_mp150.c in function handle_interrupt() between lines 927 and
928, e.g.
|| s->cfg->pid == MX370_PID

Test procedure:
(1) 'export SANE_DEBUG_PIXMA=11'
(2) press any button
(3) check output from 'scanimage -A'

You should see something like this:

  Buttons:
--button-update
Update button state
[pixma] INTR T=1.670 len=32
[pixma]  :00 40 00 00 00 00 00 00  00 00 00 00 00 00 00 00
[pixma]  0010:00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
[pixma]
--button-1  [1] [read-only]
Button 1
--button-2  [0] [read-only]
Button 2
--original  [0] [read-only]
Type of original to scan
--target  [4] [read-only]
Target operation type
--scan-resolution  [0] [read-only]
Scan resolution

Please report your results.

Cheers,
Rolf



[sane-devel] Canon MX430 / MX510 / MX925 - does not recover when ADF out of paper

2014-03-18 Thread Rolf Bensch
Hi,

Am 18.03.2014 00:16, schrieb Matthias Peter Walther:
> 
> scan passes through, and it is possible to do multiple scans in a row.
> Also tested with resolution 300.
> 

This is a good message.

> Two issues:
> 
>  - image is too width (binary detects page width somehow automatically)

It seems so, but binary does!

Binary image is 2479 pixels wide and pixma has 2552 pixels. It seems
that binary crops image width to hide ADF frame and pixma doesn't.

>  - image not high enough, last 1-1.5 mm of the page are missing. But
> this is the same with the binary package from canon. See that white
> stripe at the end.
> 

It seems that ADF cannot scan whole page length. Binary crops here, too.
Pixma saves the expected image height of 3508 pixels.

You can investigate this behaviour @ 75 dpi, if you like. Otherwise you
can set the scan size (x, y positions and width, height) in the frontend
to crop ADF frames by yourself.

I prepared a new patch with these fixes (based on patch 2):
(1) remove s->param->adf_pageid to avoid doubled coded functions.
(2) all ADF scanners support 14" legal paper size in ADF mode, but only
A4 in flatbed mode.

Please test this patch again and try to use it in your productive work.

If everything is OK, I'll commit this patch and we can close the ADF
paper empty issue.

Many thanks for your help.

Cheers,
Rolf
-- next part --
--- ./pixma_mp150.c 2014-03-18 21:57:18.0 +0100
+++ ../sane-backends/backend/pixma_mp150.c  2014-03-18 22:11:32.0 
+0100
@@ -1273,22 +1273,8 @@
 
   /* Some exceptions here for particular devices */
   /* Those devices can scan up to 14" with ADF, but A4 11.7" in flatbed */
-  if (( s->cfg->pid == MX850_PID ||
-s->cfg->pid == MX860_PID ||
-s->cfg->pid == MX870_PID ||
-s->cfg->pid == MX880_PID ||
-s->cfg->pid == MX320_PID ||
-s->cfg->pid == MX330_PID ||
-s->cfg->pid == MX340_PID ||
-s->cfg->pid == MX350_PID ||
-s->cfg->pid == MX360_PID ||
-s->cfg->pid == MX410_PID ||
-s->cfg->pid == MX420_PID ||
-s->cfg->pid == MX510_PID ||
-s->cfg->pid == MX920_PID ||
-s->cfg->pid == MX7600_PID )
-   &&
-sp->source == PIXMA_SOURCE_FLATBED)
+  /* PIXMA_CAP_ADF also works for PIXMA_CAP_ADFDUP */
+  if ((s->cfg->cap & PIXMA_CAP_ADF) && sp->source == PIXMA_SOURCE_FLATBED)
 sp->h = MIN (sp->h, 877 * sp->xdpi / 75);
 
   if (sp->source == PIXMA_SOURCE_TPU)
@@ -1343,8 +1329,7 @@
 
   /* Generation 4: send XML dialog */
   /* adf: first page or idle */
-  if ((mp->generation == 4 && s->param->adf_pageid == 0) ||
-  mp->adf_state == state_idle)
+  if (mp->generation == 4 || mp->adf_state == state_idle)
 {
   if (!send_xml_dialog (s, XML_START_1))
 return PIXMA_EPROTO;
@@ -1402,10 +1387,8 @@
 
   tmo = 10;
   /* adf: first page or idle */
-  if ((s->param->adf_pageid == 0 || mp->generation <= 2) ||
-  mp->adf_state == state_idle)
+  if (mp->generation <= 2 || mp->adf_state == state_idle)
 { /* single sheet or first sheet from ADF */
-  /* TODO: s->param->adf_pageid != 0 @ next scan session! */
   PDBG (pixma_dbg (4, "*mp150_scan* start scanning *\n"));
   error = start_session (s);
   while (error == PIXMA_EBUSY && --tmo >= 0)
@@ -1505,11 +1488,6 @@
 return PIXMA_ECANCELED;
   if ((mp->last_block & 0x28) == 0x28)
 {  /* end of image */
-   /* TODO: reset ADF page counter here!
-*   there are 2 counters: s->param->adf_pageid == 
sp->adf_pageid and
-* ss->page_count (see pixma.c)
-*   OR
-*   define a new parameter in mp150_t for new session 
detection in mp150_scan() */
PDBG (pixma_dbg (4, "*mp150_fill_buffer* end of image  
*\n"));
mp->state = state_finished;
return 0;
@@ -1686,8 +1664,8 @@
   DEVICE ("Canon PIXMA MP610", "MP610", MP610_PID, 4800, 0, 0, 638, 877, 
PIXMA_CAP_CIS),
 
   DEVICE ("Canon PIXMA MX300", "MX300", MX300_PID, 600, 0, 0, 638, 877, 
PIXMA_CAP_CIS),
-  DEVICE ("Canon PIXMA MX310", "MX310", MX310_PID, 1200, 0, 0, 638, 877, 
PIXMA_CAP_CIS | PIXMA_CAP_ADF),
-  DEVICE ("Canon PIXMA MX700", "MX700", MX700_PID, 2400, 0, 0, 638, 877, 
PIXMA_CAP_CIS | PIXMA_CAP_ADF),
+  DEVICE ("Canon PIXMA MX310", "MX310", MX310_PID, 1200, 0, 0, 638, 1050, 
PIXMA_CAP_CIS | PIXMA_CAP_ADF),
+  DEVICE ("Canon PIXMA MX700", "MX700", MX700_PID, 2400, 0, 0, 638, 1050, 
PIXMA_CAP_CIS | PIXMA_CAP_ADF),
   DEVICE ("Canon PIXMA MX850", "MX850", MX850_PID, 2400, 0, 0, 638, 1050, 
PIXMA_CAP_CIS | PIXMA_CAP_ADFDUP),
   DEVICE ("Canon PIXMA MX7600", "MX7600", MX7600_PID, 4800, 0, 0, 638, 1050, 
PIXMA_CAP_CIS | PIXMA_CAP_ADFDUP),
 
@@ -1716,7 +1694,7 @@
   DEVICE ("Canon PIXMA MX360", "MX360", MX360_PID, 1200, 0, 0, 638, 1050, 
PIXMA_CAP_CIS | PIXMA_CAP_ADF),
   DEVICE ("Canon PIXMA MX410", "MX410", MX410_PID, 1200, 0, 0, 638, 1

[sane-devel] Canon MX430 / MX510 / MX925 - does not recover when ADF out of paper

2014-03-17 Thread Rolf Bensch
Hi,

As you can see on the log file, the backend doesn't start a new scan
after page 3 has been scanned. Due to this the scanner cannot handle the
scan commands and a timeout raises.

I prepared a patch with a new adf state variable. This patch is based on
the latest git sources and patch1.

Please test the patch and create a new log file.

Cheers,
Rolf


Am 17.03.2014 21:03, schrieb Matthias Peter Walther:
> Hello All,
> 
> I had some trouble to apply the new patch, but Rolf helped me to fix it.
> 
> Here comes the result with git + patch pixma_mp150.c.patch1, 3 pages in ADF.
> 
> It works correct, but the timeout at the end acts weird. In the log it
> counts down 8 7 6...but between each line it pauses around 15-20
> seconds. This scan took ages!
> 
> The log comes as attachment.
> 
> Bye
> Matthias
> 
> Am 15.03.2014 20:16, schrieb Rolf Bensch:
>> Hi All,
>>
>> Now we have Matthias on board with his MX375.
>>
>> Please don't use the old patches. I started changing code in pixma.c
>> where we might get problems with other scanners, e.g. with the
>> Imageclass sub-backend. So, we should find a fix which affects
>> pixma_mp150.c only.
>>
>> We should start at the beginning. Please use attached patch with latest
>> code from git. I added some additional debug outputs to show the status
>> of adf scanning. Please create a debug file with 'export
>> SANE_DEBUG_PIXMA=4'.
>>
>> I also added TODO comments as hints for possible fixes.
>>
>> Cheers,
>> Rolf
>>
>>
>>
>> Am 14.03.2014 22:41, schrieb Matthias Peter Walther:
>>> Hallo Rolf,
>>>
>>> thanks for your quick reply. I'm from Germany too, by the way. But to
>>> keep this conformed, I'm gonna answer you in english.
>>>
>>> If I understood your posts correctly, you want me to use patch 3+4.
>>> Patch 5 is only for the feature to initiate a scan from the device.
>>> Which is nice, but I will look into that later.
>>>
>>> So I pulled my git-sane-backend-repo and patched it:
>>>
>>> mpw at Server0:~/sane$ patch -p1 < attachment-0003.bin
>>> patching file sane-backends/backend/pixma.c
>>> mpw at Server0:~/sane$ patch -p1 < attachment-0004.bin
>>> patching file sane-backends/backend/pixma_mp150.c
>>> Hunk #2 succeeded at 1397 (offset -12 lines).
>>> Hunk #3 succeeded at 1439 (offset -12 lines).
>>> Hunk #4 succeeded at 1493 (offset -12 lines).
>>> Hunk #5 succeeded at 1560 (offset -12 lines).
>>> Hunk #6 succeeded at 1568 (offset -12 lines).
>>> Hunk #7 succeeded at 1580 (offset -12 lines).
>>>
>>> I think the offset is related to the age of the patch.
>>>
>>> After installing, I check the ldconfig:
>>>
>>> $ sudo ldconfig -v | grep libsane
>>> /sbin/ldconfig.real: Kann ?stat()? f?r ?/lib/i686-linux-gnu? nicht
>>> aufrufen: Datei oder Verzeichnis nicht gefunden
>>> /sbin/ldconfig.real: Kann ?stat()? f?r ?/usr/lib/i686-linux-gnu? nicht
>>> aufrufen: Datei oder Verzeichnis nicht gefunden
>>> /sbin/ldconfig.real: Pfad ?/usr/local/lib? mehrfach angegeben
>>> /sbin/ldconfig.real: Pfad ?/lib/x86_64-linux-gnu? mehrfach angegeben
>>> /sbin/ldconfig.real: Pfad ?/usr/lib/x86_64-linux-gnu? mehrfach angegeben
>>> libsane.so.1 -> libsane.so.1.0.25
>>> libsane.so.1 -> libsane.so.1.0.22
>>> /sbin/ldconfig.real: Es ist nicht m?glich, den Status (stat()) der Datei
>>> /usr/lib/x86_64-linux-gnu/libsoftokn3.so zu lesen: Datei oder
>>> Verzeichnis nicht gefunden
>>> libsane.so.1 -> libsane.so.1.0.22
>>> libsane-canon_mfp.so.1 -> libsane-canon_mfp.so.1.0.9
>>>
>>> This looks good, I think I had 1.0.24 from last october before. Okay, I
>>> tried a scan then:
>>>
>>> $ scanadf
>>> scanadf: sane_read: Error during device I/O
>>> Error during device I/O
>>> Scanned 0 pages
>>> $
>>>
>>> This did not work before, either. Maybe my sane-frontend is too old? I
>>> have the original one from Ubuntu 12.04.4.
>>> $ scanadf --version
>>> scanadf (sane-frontends) 1.0.14
>>>
>>> Next try, scanimage:
>>> $ scanimage --source "Automatic Document Feeder" -p --batch
>>> Scanning -1 pages, incrementing by 1, numbering from 1
>>> Scanning page 1
>>> Scanned page 1. (scanner status = 5)
>>> Scanning page 2
>>> scanimage: sane_read: Document feeder out of documents
>>> Scanned page 2.

[sane-devel] Canon MX430 / MX510 / MX925 - does not recover when ADF out of paper

2014-03-15 Thread Rolf Bensch
Hi All,

Now we have Matthias on board with his MX375.

Please don't use the old patches. I started changing code in pixma.c
where we might get problems with other scanners, e.g. with the
Imageclass sub-backend. So, we should find a fix which affects
pixma_mp150.c only.

We should start at the beginning. Please use attached patch with latest
code from git. I added some additional debug outputs to show the status
of adf scanning. Please create a debug file with 'export
SANE_DEBUG_PIXMA=4'.

I also added TODO comments as hints for possible fixes.

Cheers,
Rolf



Am 14.03.2014 22:41, schrieb Matthias Peter Walther:
> Hallo Rolf,
> 
> thanks for your quick reply. I'm from Germany too, by the way. But to
> keep this conformed, I'm gonna answer you in english.
> 
> If I understood your posts correctly, you want me to use patch 3+4.
> Patch 5 is only for the feature to initiate a scan from the device.
> Which is nice, but I will look into that later.
> 
> So I pulled my git-sane-backend-repo and patched it:
> 
> mpw at Server0:~/sane$ patch -p1 < attachment-0003.bin
> patching file sane-backends/backend/pixma.c
> mpw at Server0:~/sane$ patch -p1 < attachment-0004.bin
> patching file sane-backends/backend/pixma_mp150.c
> Hunk #2 succeeded at 1397 (offset -12 lines).
> Hunk #3 succeeded at 1439 (offset -12 lines).
> Hunk #4 succeeded at 1493 (offset -12 lines).
> Hunk #5 succeeded at 1560 (offset -12 lines).
> Hunk #6 succeeded at 1568 (offset -12 lines).
> Hunk #7 succeeded at 1580 (offset -12 lines).
> 
> I think the offset is related to the age of the patch.
> 
> After installing, I check the ldconfig:
> 
> $ sudo ldconfig -v | grep libsane
> /sbin/ldconfig.real: Kann ?stat()? f?r ?/lib/i686-linux-gnu? nicht
> aufrufen: Datei oder Verzeichnis nicht gefunden
> /sbin/ldconfig.real: Kann ?stat()? f?r ?/usr/lib/i686-linux-gnu? nicht
> aufrufen: Datei oder Verzeichnis nicht gefunden
> /sbin/ldconfig.real: Pfad ?/usr/local/lib? mehrfach angegeben
> /sbin/ldconfig.real: Pfad ?/lib/x86_64-linux-gnu? mehrfach angegeben
> /sbin/ldconfig.real: Pfad ?/usr/lib/x86_64-linux-gnu? mehrfach angegeben
> libsane.so.1 -> libsane.so.1.0.25
> libsane.so.1 -> libsane.so.1.0.22
> /sbin/ldconfig.real: Es ist nicht m?glich, den Status (stat()) der Datei
> /usr/lib/x86_64-linux-gnu/libsoftokn3.so zu lesen: Datei oder
> Verzeichnis nicht gefunden
> libsane.so.1 -> libsane.so.1.0.22
> libsane-canon_mfp.so.1 -> libsane-canon_mfp.so.1.0.9
> 
> This looks good, I think I had 1.0.24 from last october before. Okay, I
> tried a scan then:
> 
> $ scanadf
> scanadf: sane_read: Error during device I/O
> Error during device I/O
> Scanned 0 pages
> $
> 
> This did not work before, either. Maybe my sane-frontend is too old? I
> have the original one from Ubuntu 12.04.4.
> $ scanadf --version
> scanadf (sane-frontends) 1.0.14
> 
> Next try, scanimage:
> $ scanimage --source "Automatic Document Feeder" -p --batch
> Scanning -1 pages, incrementing by 1, numbering from 1
> Scanning page 1
> Scanned page 1. (scanner status = 5)
> Scanning page 2
> scanimage: sane_read: Document feeder out of documents
> Scanned page 2. (scanner status = 7)
> mpw at Server0:~/sane$ ls
> attachment-0003.bin  attachment-0004.bin  out1.pnm  sane-backends
> 
> This is a first success. But as you can see in the output of ls, it
> stores only the first page, the second is lost. Or is there something
> wrong with my scanimage-command?
> 
> BTW: Can you please change "Automatic Document Feeder" to simply "ADF",
> that would be much more comfortable to type :)
> 
> So thanks for your patch, I think it's almost perfect. I just need to
> store the 2nd page.
> 
> Please let me know, if you need more detailed debugging output. Will you
> commit this two patches to the git repository?
> 
> Gr??e aus M?nster
> Matthias
> 
> Am 14.03.2014 19:31, schrieb Rolf Bensch:
>> Hi Matthias,
>>
>> Please read this thread:
>> http://lists.alioth.debian.org/pipermail/sane-devel/2014-March/032138.html.
>>
>> Cheers,
>> Rolf
>>
>>
>> Am 12.03.2014 21:11, schrieb Matthias Peter Walther:
>>> Hello,
>>>
>>> I'm new to this, but I'm gonna try my luck. I own a Canaon MX375
>>> all-in-one. The PIXMA-backend has this annoying adf-empty-bug.
>>>
>>> Is there any information I could provice to help to fix this?
>>>
>>> The binary driver from canon.uk works with their gui-frontend only and
>>> I'd like to get it working on a headless system.
>>>
>>> Thanks for any comments.
>>>

[sane-devel] Canon Pixma MX525

2014-03-14 Thread Rolf Bensch
Hi Trygve,

Am 10.03.2014 22:48, schrieb Trygve Flathen:
> On Mon, Mar 10, 2014 at 9:39 PM, Rolf Bensch  wrote:
>> The attached patch should fix these issues:
>> (1) interlacing @ 1200 dpi
> 
> Did not see any change to this problem.

OK, I removed this from the patch.

> However, this patch fixed it (don't know if it breaks something else though)
> 
> --- a/backend/pixma_common.c
> +++ b/backend/pixma_common.c
> @@ -1053,7 +1053,7 @@ pixma_check_scan_param (pixma_t * s,
> pixma_scan_param_t * sp)
> 
>/* FIXME: I assume the same minimum width and height for every model. */
>CLAMP2 (sp->x, sp->w, 13, s->cfg->width, sp->xdpi);
> -  CLAMP2 (sp->y, sp->h, 8, s->cfg->height, sp->ydpi);
> +  CLAMP2 (sp->y, sp->h, 16, s->cfg->height, sp->ydpi);
> 

Your patch sets minimum scan size to 13 x 16 pixels. This shouldn't
break anything.

> 
>> (2) 14" legal paper size in ADF mode
> 
> I assume the 877->1050 does this. Have not tested.
> 
>> (3) button support
> 
> Results:
> 
> $ export SANE_DEBUG_PIXMA=11
> # pressing "black"
> $ scanimage -A
> ...
> --button-update
> Update button state
> [pixma] INTR T=7.333 len=32
> [pixma]  :00 00 00 00 01 01 03 02  01 00 00 00 00 00 00 00
> [pixma]  0010:00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
> [pixma]
> ...
> # wait for scanner to time out

Is this a scanner internal timeout? Is the scanner waiting for scanning?

After checking button timeout I'll commit the patches.

Cheers,
Rolf



[sane-devel] Fixing PIXMA MX360/370 ADF empty bug

2014-03-14 Thread Rolf Bensch
Hi Matthias,

Please read this thread:
http://lists.alioth.debian.org/pipermail/sane-devel/2014-March/032138.html.

Cheers,
Rolf


Am 12.03.2014 21:11, schrieb Matthias Peter Walther:
> Hello,
>
> I'm new to this, but I'm gonna try my luck. I own a Canaon MX375
> all-in-one. The PIXMA-backend has this annoying adf-empty-bug.
>
> Is there any information I could provice to help to fix this?
>
> The binary driver from canon.uk works with their gui-frontend only and
> I'd like to get it working on a headless system.
>
> Thanks for any comments.
>
> Bye
> Matthias Walther
>
>




[sane-devel] Canon Pixma MX525

2014-03-10 Thread Rolf Bensch
Hi Trygve,

The attached patch should fix these issues:
(1) interlacing @ 1200 dpi
(2) 14" legal paper size in ADF mode
(3) button support

I'm not sure that your scanner has button support. The buttons look like
the MX925, and that one has. Please test this so:
(1) set debug level: 'export SANE_DEBUG_PIXMA=11'
(2) press any button (maybe you need to set size, format and dpi in your
scanner's menu)
(3) read button status with 'scanimage -A'

Then you should see something like this:

  Buttons:
--button-update
Update button state
[pixma] INTR T=1.714 len=32
[pixma]  :00 40 00 00 00 00 00 00  00 00 00 00 00 00 00 00
[pixma]  0010:00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
[pixma]
--button-1  [1] [read-only]
Button 1
--button-2  [0] [read-only]
Button 2
--original  [0] [read-only]
Type of original to scan
--target  [4] [read-only]
Target operation type
--scan-resolution  [0] [read-only]
Scan resolution

To understand sent data please look into the code or sane-pixma man page.

Cheers,
Rolf


Am 10.03.2014 20:00, schrieb Trygve Flathen:
> On Mon, Mar 10, 2014 at 6:17 PM, Rolf Bensch  wrote:
>> ADF paper empty detection is buggy for all MP150 based scanners. If you
>> like to help fixing this issue, please join this thread:
>> http://lists.alioth.debian.org/pipermail/sane-devel/2014-March/032138.html.
>> I cannot fix this by myself 'cause I have no ADF scanner.
> 
> Thanks for the pointer to that thread. By joining the thread, I assume
> you mean use the same subject. I will have a look at the code etc. in
> the near future.
> 
> 
> Meanwhile, I can confirm that the following, except for resolution
> 1200, works as expected (at least by first looks)  on my
> USB-only-connected Pixma MX525, source flatbed:
> 
>scanimage --resolution 75 > 75.pnm
>scanimage --resolution 150 > 150.pnm
>scanimage --resolution 300 > 300.pnm
>scanimage --resolution 600 > 600.pnm
>scanimage --resolution 1200 > 1200.pnm
>scanimage --mode color > color.pnm
>scanimage --mode gray > gray.pnm
>scanimage --mode lineart > lineart.pnm
>scanimage --gamma 0.7  > gamma.pnm
>scanimage --gamma 4  > gamma4.pnm
>scanimage -l 100 -t 50 -x 20 -y 20 > pos.pnm
>scanimage -l 100 -t 150 -x 20 -y 20 --resolution 1200 > 1200small.pnm
>scanimage --format tiff >x.tiff
>scanimage -p > x.pnm
> 
> With resolution 1200, there seems to be some interlacing in the output.
> See http://flathen.net/tmp/75.pnm
> and http://flathen.net/tmp/1200.pnm.gz   (287MB, 410MB unpacked)
> and http://flathen.net/tmp/1200small.pnm
> (You need the big one to see clearly.)
> 
> -Trygve
> 
> 
> Some other outputs:
> 
> $ scanimage -V
> scanimage (sane-backends) 1.0.25git; backend version 1.0.25
> $ scanimage -L
> device `pixma:04A91769_12999B' is a CANON Canon PIXMA MX520 Series
> multi-function peripheral
> $ scanimage -A
> 
> All options specific to device `pixma:04A91769_12999B':
>   Scan mode:
> --resolution auto||75|150|300|600|1200dpi [75]
> Sets the resolution of the scanned image.
> --mode auto|Color|Gray|Lineart [Color]
> Selects the scan mode (e.g., lineart, monochrome, or color).
> --source Flatbed|Automatic Document Feeder [Flatbed]
> Selects the scan source (such as a document-feeder). Set source before
> mode and resolution. Resets mode and resolution to auto values.
> --button-controlled[=(yes|no)] [no]
> When enabled, scan process will not start immediately. To proceed,
> press "SCAN" button (for MP150) or "COLOR" button (for other models).
> To cancel, press "GRAY" button.
>   Gamma:
> --custom-gamma[=(auto|yes|no)] [yes]
> Determines whether a builtin or a custom gamma-table should be used.
> --gamma-table auto|0..255,...
> Gamma-correction table.  In color mode this option equally affects the
> red, green, and blue channels simultaneously (i.e., it is an intensity
> gamma table).
> --gamma auto|0.299988..5 [2.2]
> Changes intensity of midtones
>   Geometry:
> -l auto|0..216.069mm [0]
> Top-left x position of scan area.
> -t auto|0..297.011mm [0]
> Top-left y position of scan area.
> -x auto|0..216.069mm [216.069]
> Width of scan-area.
> -y auto|0..297.011mm [297.011]
> Height of scan-area.
>   Buttons:
> --button-update
> Update button state
> --button-1  [0] [read-only]
> Button 1
> --button-2  [0] [read-only]
> Butto

[sane-devel] Canon ImageClass MF4820d - scanner

2014-03-10 Thread Rolf Bensch
Hi Ajay,

Please first install Sane as described in README.linux (within the
source code or here: http://www.sane-project.org/README.linux).

Are you sure that you switched your scanner to "remote scanner" mode?

If this doesn't help, please ask the mailing list.

Cheers,
Rolf


Am 07.03.2014 14:53, schrieb Ajay Deo:
> Hello,
> 
> In my struggle of Canon ImageClass MF4820d scanner driver installation,
> I came across the following website
> 
> http://mp610.blogspot.in/2008/04/give-your-scanner-new-freshly-sane.html
> 
> I followed the procedure but I am unable to get my scanner working. I
> spent almost a whole day. Please can you help me. I am attaching some
> information below to help you diagnose the problem.
> 
> 
>> scanimage -V
> scanimage (sane-backends) 1.0.25git; backend version 1.0.25
> 
>>scanimage -L
> device `pixma:04A92773_112CH1101167' is a CANON Canon i-SENSYS MF4800
> Series multi-function peripheral
> 
>>scanimage -T
> scanimage: scanning image of size 640x877 pixels at 24 bits/pixel
> scanimage: acquiring RGB frame, 8 bits/sample
> scanimage: reading one scanline, 1920 bytes...FAIL Error: Device busy
> 
> ===
> 
> Please note that I am using Fedora 18 with 3.11.10-100.fc18.x86_64 kernal.
> I have modified "configure" file so that the libraries will be installed
> under "/usr/lib64".
> 
> Also, I see the attached file which might be helpful.
> 
> Any help in this matter will be greatly appreciated.
> 
> Thanking you.
> 
> With best regards,
> 
> Ajay
> 
> 
> 
> Dr. Ajay Y. Deo
> Assistant Professor
> Department of Physics
> Indian Institute of Technology Roorkee
> Roorkee - 247667
> Uttarakhand, INDIA
> 
> 
> 



[sane-devel] Canon Pixma MX525

2014-03-10 Thread Rolf Bensch
Hi,

Please test the scanner connected to USB only, first. Are all scan
options working without errors or currupted images, except ADF? If there
are problems I can fix them.

Then test LAN/WLAN.

ADF paper empty detection is buggy for all MP150 based scanners. If you
like to help fixing this issue, please join this thread:
http://lists.alioth.debian.org/pipermail/sane-devel/2014-March/032138.html.
I cannot fix this by myself 'cause I have no ADF scanner.

Cheers,
Rolf


Am 08.03.2014 18:16, schrieb Martin:
>
> Hi,
>
> I' got the same Pixma, but I'd like to have it with the LAN to scan.  It
> seems to work with the new version, using ubuntu I use sane 1.0.25 from
> the Rolf Bensch https://launchpad.net/~rolfbensch/+archive/sane-git[1]
>
> I also find the scangearmp a little bit bad, I'm not excited from its
> results.  For adf it just makes gray pdf files from white paper, and its
> a bit bad to work with that further.
>
> scanadf works, but when it comes to an end (no more paper in the feeder)
> it comes with an error.  Then the driver or scanner or something else is
> in a bad state so I cannot use the scanner anymore - but a restart of my
> computer seems to solve the problem.  Ok, I don't want to restart the
> computer for every scan.
>
> If I can help you (have also little programming experience) I would do
> that.
>
> Martin
>
> Trygve Flathen writes:
>
>> Hi
>>
>> I am now the owner of a Canon Pixma MX525, and I see that this is
>> listed as "untested" in the supported devices list.
>>
>> I bought it specifically for its duplex ADF scanner and the impression
>> that they support Linux after seeing the scangearmp software offered
>> by Canon. However, while scangearmp does allow you to scan in Linux,
>> the program is buggy and very mouse-based and manual in use. I need
>> scanning to work from various programs/script in a more automated
>> manner.
>>
>> I am a programmer and would like to help getting it supported by SANE.
>> I will provide some initial info below, and hope the SANE project can
>> point me in a useful direction for further work.
>>
>> -Trygve
>>
>>
>> The scanner is connected to a Mint 16 system via usb and network.
>>
>>
>> ScanGear MP v2.10 for Linux:  (select software, linux)
>> http://www.canon.co.uk/Support/Consumer_Products/products/Fax__Multifunctionals/InkJet/PIXMA_MX_series/MX525.aspx
>>
>>
>> Another owner:
>> http://lists.alioth.debian.org/pipermail/sane-devel/2014-January/032018.html
>>
>>
>> See http://flathen.net/ext/sane/info1.html for output from:
>> lsusb
>> lsusb -s 001:003 -v -v
>> ls -l /dev/bus/usb/001/003
>> sane-find-scanner -v -v /dev/bus/usb/001/003
>> nmap -A 10.0.124.76
>> export SANE_DEBUG_PIXMA=21
>> scanimage -L
>> lsmod|grep scanner
>> dpkg --get-selections|grep sane
>> dpkg --get-selections|grep libusb
>> scanimage --version
>> sane-find-scanner -v -v
>




[sane-devel] It make sense to acquire "raw" data from negative scan?

2014-03-07 Thread Rolf Bensch
Hi Niccolo,

In TPU mode the scanner scans color negatives/slides in 48-bit
resolution and sends raw data to the frontend. You must store the scans
as PNG, PNM or TIFF images. Otherwise the frontend shrinks the image
resolution down to 24 bit.

You can also scan infrared images for dust removal. I haven't found any
free software for post processing yet.

Please report your negatives scan experiences, post processing and
archiving in the mailing list. Many thanks.

Cheers,
Rolf



Am 05.03.2014 18:03, schrieb Niccolo Rigacci:
> Hi to all,
>
> I wish to acquire several negative films with my new Canon 
> CanoScan 9000F Mark II.
>
> I cannot resolve a doubt of mine: does the color correction 
> at scan time influence how data is read by the device (e.g. 
> tuning the backlight or the sensor sensitivity)?
>
> With xsane I can adjust colors before scanning, using gamma, 
> brightness, contrast; there are also some "medium type" presets 
> for different film brands (Kodak, Fuji, etc.).
>
> Those parameters are applied before scanning, i.e. sent to the 
> scanner to obtain different readings? Or they are just applied by 
> software on the received "raw" data?
>
> In the latter case I would prefer to acquire without color 
> correction at all, and just apply the best recipe afterwards with 
> a batch software procedure. I wish also to keep the original 
> "raw" scan for future and better recipes.
>




[sane-devel] Canon MX430 / MX510 / MX925 - does not recover when ADF out of paper

2014-03-01 Thread Rolf Bensch
Hi All,

Now we have 3 threads active in the mailing list with the same ADF empty
issue. We should bundle debugging in this new thread.

The bug affects MX430, MX510, MX925 and all other ADF scanners in the
Pixma MP150 backend.

Everybody who likes to join debugging should start to understand the
source code. I tried to give some hints in this thread:
http://lists.alioth.debian.org/pipermail/sane-devel/2014-February/032133.html

Last year I tried to describe my point of view about ADF empty issue in
this thread:
http://lists.alioth.debian.org/pipermail/sane-devel/2013-November/031855.html

We can discuss questions, share patches and test reports in this thread.
Please always answer to all participants of this thread.

Many thanks for your help.

Cheers,
Rolf



[sane-devel] CANON Pixma MX 510

2014-02-28 Thread Rolf Bensch
Hi Sebastien,

I'm sorry for the delay.

I haven't any time for code debugging yet. Maybe you like to join this
thread:
http://lists.alioth.debian.org/pipermail/sane-devel/2014-February/032133.html.

Cheers,
Rolf


Am 06.02.2014 21:28, schrieb sebastien:
> Hi Rolf,
> I confirm that I have succeed to scan all resolutions up to 1200dpi.
> 
> I would like to help you to debug the ADF. What do you need?
> 
> Sebastien
> 
> 
> 
> 
> 
> Le Jeudi 6 f?vrier 2014 20h29, Rolf Bensch  a ?crit 
> :
> Hi Sebastien,
> 
> /Sorry, I used the wrong email address for SANE ml. Please answer to
> this one./
> 
> ADF has a bug recognising empty document feeder. A work around can be
> scanning exact page count.
> 
> If you like, we can try to debug this issue. I have no ADF scanner, so I
> cannot do this by myself.
> 
> On the other hand, does your MX510 scan all resolutions up to 1200dpi in
> flatbed mode without errors?
> 
> Many thanks for your help.
> 
> Cheers,
> Rolf
> 
> 
> Am 03.02.2014 11:23, schrieb sebastien:
>> Hello,
>>
>> Sorry I have already sent this message to the sane-standard list but I
>> have noticed that it was not the good one.
>>
>>
>> I have a CANON Pixma MX 510, am I am trying to use libsane.
>>
>> I  would like to use the automatic document feeder to aquire
>> automatically all the documents available. I have tried several way
>> and I have found problem with all of them to detect that there is no
>> more document in the document feeder.
>>
>> - sane_start or sane_read never returns SANE_STATUS_NO_DOCS
>> -in synchrone mode, sane_read is blocked, and if I call sane_cancel
>> from another thread, this call is also definitly blocked
>> -The asynchrone mode doen't seem to work. If I call sane_read when a
>> document is available, it returns immediatly but read len =0
>>
>> Do you have other suggestions? Or do you think that there is problems
>> with the PIXMA implementation?
>>
>> Thank you 
>> Sebastien
> 
> 
> 



[sane-devel] report for Canon Pixma MG2490 and sane-pixma

2014-02-28 Thread Rolf Bensch
Hi Jun,

Please check the testings described in chapters 3.4 and complete 4 in
README.linux: http://www.sane-project.org/README.linux.

Cheers,
Rolf


Am 07.02.2014 00:55, schrieb ??:
> What kind of SANE installation do you have (repro | compiled)?
> 
> 
> I am using the sane package from the Arch Linux package repository. I am
> running Linux kernel 3.12.9 amd64.
> 
> Please check the version of SANE:
> $ scanimage -V
> 
> 
> scanimage (sane-backends) 1.0.24; backend version 1.0.24
> 
> Does
> $ sudo scanimage -L
> give any feedback?
> 
> 
> No, sudo scanimage -L gives me the same output as scanimage -L, "No
> scanners were identified."
> 
> Hope this info is useful...
> -Jun
> 
> -BEGIN PGP PUBLIC KEY BLOCK-
> 
> Version: GnuPG v2.0.20 (GNU/Linux)
> 
> 
> mQENBE7vMHIBCADicCu8p52h2LRAaWZYLoR8BsKptqeJ9O5BWnDtobQGAFa5Xua7
> 
> FmrZmhYxKp2vzvlonWmloOP60Zgbxj9rt13S33SLthO+PcKneQkg4dBy/L8fxUaX
> 
> 8L3n++I/i/qh4l7udUH9QoKNXeHDrAxgJfWcK4eXfImFkIc3EQhz/Ib7mEhIRSbP
> 
> gViohOjfwLNy07uf00DjEMvnlF/KY6LfoEEQUvIDmqembQrRXc2castWjL/Hjxae
> 
> seEOonMMuvPkvfcJrzfG8F7HJnRs+7e5/HNYA3iNap7JE1cb1huwXIqU7vh4Rd/R
> 
> Gq0kVOcGqszhyfuMNmbbbTNBEmzFmSBFtAGLABEBAAG0G0p1biBHbyA8Z29qdW4w
> 
> NzdAZ21haWwuY29tPokBOAQTAQIAIgUCTu8wcgIbAwYLCQgHAwIGFQgCCQoLBBYC
> 
> AwECHgECF4AACgkQpWkwz3I1E42NBggA19ciarF8DoPk+myx0AhEw8daDsZQ4sl4
> 
> j7EBDuB0hHDDthX2jKgPwqenYutF0+2EZQ5VS6kiyFCenK4wtYzkSVwlYuoiUbla
> 
> m0EPv8dA0f46/dxRhO2zoF8kfpmnR6BTR+EB+jVM+Mwpmc3shbpspnWPcRH/xTph
> 
> YLcURumTrfyIN++SeqSGcw20wg/+zqxclgOkwzZi9K4qIbdI9alPFsP14/xB+dcG
> 
> Ukows/TY7/eG3XGgiAE9tLLh99viBdLpSZ5T3GJlOGGnK+8EVZc9VG3yqxSURvBq
> 
> +X2CzYUmjsQUo0b7mQxmvFtWmjTbNc4lfWP3kkQdrUOQIe5J8rGfvLkBDQRO7zBy
> 
> AQgAsQC6mcxBHSZQzy8NwgZlQZSSx9zFjFVYkgr4xHym67PnkGs2opEvH0SawwMm
> 
> LM1/rCWVEeFcHQVaQ41z0Iu2WRIrqzbHreT730R8DqpYGICSp6wbPR5/AfVnwhcf
> 
> 5I1Vos+cGzhW3kgsrpBCkKfhhDtRY5tseRm/TDMv1SGowsXVEIM/eSqvcNPkPa0f
> 
> am7Ah/sXYDg9om7wXbmLhPUz2RfPfHRYSDvRV9lIcvU0+jjVAwfpf3niPgZfsnU2
> 
> 5smARZtjS1o0/pcFkrcKLE6VeVKFe2VxqJvFtKf4juxaIO1okxtwVcWfCbAGQplb
> 
> YiIYz2M7YuD5vqeexrEzxosveQARAQABiQEfBBgBAgAJBQJO7zByAhsMAAoJEKVp
> 
> MM9yNRONCb0H/1mV9EPt32R3ZYbUfO07V7GiMNYRZwfTW7ccGROwH1pzaI3ljQKM
> 
> FvXOmWg71yNTSiG9eBeSBIpLUXtIwmZvFzOG3B30msZBTStM605hZ9QV0PLxJNdm
> 
> 61MlZ2EqFqTQYPMKz4Jsn5nZ9FH8wxUJ3QL5zMunE80AjQY4KV7cBswUKQjoDYVq
> 
> YIPVjsnchFduIcAMcpwKzTuMbqQih+mrjhr68Zusd44Lhr1g2qGQGCZXRn9/9oOQ
> 
> jBMXpeMhJMG/iyTdbO8PNbLFqu4QpHJJzRMphFVkFSBmlqDPcVgoeMazWhQMBg37
> 
> No+8Bq/f7QdNm+EJ/DHttuaJXDehVAFYnWE=
> 
> =PeRG
> 
> -END PGP PUBLIC KEY BLOCK-
> 
> 
> On Fri, Feb 7, 2014 at 4:15 AM, Rolf Bensch  <mailto:rolf at bensch-online.de>> wrote:
> 
> Hi,
> 
> What kind of SANE installation do you have (repro | compiled)?
> 
> Please check the version of SANE:
> $ scanimage -V
> 
> Does
> $ sudo scanimage -L
> give any feedback?
> 
> Cheers,
> Rolf
> 
> 
> Am 03.02.2014 01:36, schrieb ??:
>> According to the sane-pixma.5
>> <http://www.sane-project.org/man/sane-pixma.5.html> documentation,
>> no one has reported whether sane-pixma works with the Canon Pixma
>> MG2490. I recently purchased the MG2490 and can confirm that this
>> new Pixma model does not work with SANE. I also own a Canon Pixma
>> MP258 which is perfectly supported in SANE.
>>
>> Output of lsusb:
>>
>> Bus 007 Device 006: ID 04a9:176c Canon, Inc.
>>
>> Output of sane-find-scanner:
>>
>> found USB scanner (vendor=0x04a9 [Canon], product=0x176c [MG2400
>> series]) at libusb:007:006
>>
>> However scanimage -L and xsane do not recognize the MG2490.
>>
>> -BEGIN PGP PUBLIC KEY BLOCK-
>>
>> Version: GnuPG v2.0.20 (GNU/Linux)
>>
>>
>> mQENBE7vMHIBCADicCu8p52h2LRAaWZYLoR8BsKptqeJ9O5BWnDtobQGAFa5Xua7
>>
>> FmrZmhYxKp2vzvlonWmloOP60Zgbxj9rt13S33SLthO+PcKneQkg4dBy/L8fxUaX
>>
>> 8L3n++I/i/qh4l7udUH9QoKNXeHDrAxgJfWcK4eXfImFkIc3EQhz/Ib7mEhIRSbP
>>
>> gViohOjfwLNy07uf00DjEMvnlF/KY6LfoEEQUvIDmqembQrRXc2castWjL/Hjxae
>>
>> seEOonMMuvPkvfcJrzfG8F7HJnRs+7e5/HNYA3iNap7JE1cb1huwXIqU7vh4Rd/R
>>
>> Gq0kVOcGqszhyfuMNmbbbTNBEmzFmSBFtAGLABEBAAG0G0p1biBHbyA8Z29qdW4w
>>
>> NzdAZ21haWwuY29tPokBOAQTAQIAIgUCTu8wcgIbAwYLCQgHAwIGFQgCCQoLBBYC
>>
>> AwECHgECF4AACgkQpWkwz3I1E42NBggA19ciarF8DoPk+myx0AhEw8daDsZQ4sl4
>>
>> j7EBDuB0hHDDthX2jKgPwqenYutF0+2EZQ5VS6kiyFCenK4wtYzkSVwlYuoiUbla
>>
&g

[sane-devel] Canon MX925 - does not recover when ADF out of paper

2014-02-28 Thread Rolf Bensch
Hi Kay,

There is an ADF empty bug in the code.

If you like you can try to fix it. I cannot do this 'cause I have no ADF
scanner.

Other users reported setting the page count in xsane shold be a workaround.

Cheers,
Rolf


Am 19.02.2014 22:33, schrieb kay at drangmeister.net:
> Hi all
>
> (I'm new to the list so please bear with me if I'm not into netiquette
> of it yet.)
>
> I own a Canon MX925 scanner and successfully run the current sane from
> the PPA. Since I don't know how to see the exact version:
>
> $ sane-find-scanner -v
> # This is sane-find-scanner from sane-backends 1.0.25git
> # found USB scanner (vendor=0x04a9 [Canon], product=0x176b
>[MX920 series]) at libusb:002:025
>
> I did a scan from within gimp (File/create/xsane/device dialog...)
> scanned with ADF selected, but no paper in it (it works fine WITH
> paper :-)), got an error message ("no paper") after several (5-10)
> seconds, put a paper in the ADF and retried, but it was not able
> to scan again (Printer display still says "please wait", GIMP says
> "Error during device I/O" (in German)).
>
> $ gimp &>mx925.log
>
> result:
>
> [sanei_debug] Setting debug level of pixma to 11.
> [pixma] pixma is compiled with pthread support.
> [pixma] pixma version 0.17.6
> [pixma] pixma_collect_devices() found Canon PIXMA MX920 Series at
> libusb:002:025
> [pixma] pixma_find_scanners() found 1 devices
> [pixma] pixma_collect_devices() found Canon PIXMA MX920 Series at
> libusb:002:025
> [pixma] pixma_open(): Canon PIXMA MX920 Series
> [pixma] INTR T=4.576 len=32
> [pixma]  :00 00 00 01 00 00 00 00  00 00 00 00 00 00 00 00
> [pixma]  0010:00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
> [pixma]
> [pixma] INTR T=4.832 len=32
> [pixma]  :00 00 00 01 00 00 00 00  00 00 00 00 00 00 00 00
> [pixma]  0010:00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
> [pixma]
> [pixma] INTR T=14.177 len=32
> [pixma]  :00 00 00 01 00 00 00 00  00 00 00 00 00 00 00 00
> [pixma]  0010:00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
> [pixma]
> [pixma] [pixma] Reader task id=-1294972096 (threaded)
> Reader task started
> [pixma]
> [pixma] pixma_scan(): start
> [pixma]   line_size=5032 image_size=35183744 channels=1 depth=8
> [pixma]   dpi=600x600 offset=(64,8) dimension=5032x6992
> [pixma]   gamma_table=0x9fe951c source=1
> [pixma]   threshold=127 threshold_curve=0
> [pixma]   ADF page count: 0
> [pixma] Setting non-blocking mode
> [pixma] OUT  T=18.556 len=288
> [pixma]  :3c 3f 78 6d 6c 20 76 65  72 73 69 6f 6e 3d 22 31
> [pixma]  0010:2e 30 22 20 65 6e 63 6f  64 69 6e 67 3d 22 75 74
> [pixma]  0020:66 2d 38 22 20 3f 3e 3c  63 6d 64 20 78 6d 6c 6e
> [pixma]  0030:73 3a 69 76 65 63 3d 22  68 74 74 70 3a 2f 2f 77
> [pixma]  0040:77 77 2e 63 61 6e 6f 6e  2e 63 6f 6d 2f 6e 73 2f
> [pixma]  0050:63 6d 64 2f 32 30 30 38  2f 30 37 2f 63 6f 6d 6d
> [pixma]  0060:6f 6e 2f 22 3e 3c 69 76  65 63 3a 63 6f 6e 74 65
> [pixma]  0070:6e 74 73 3e 3c 69 76 65  63 3a 6f 70 65 72 61 74
> [pixma]  ...
> [pixma]
> [pixma] IN   T=18.615 len=365
> [pixma]  :3c 3f 78 6d 6c 20 76 65  72 73 69 6f 6e 3d 22 31
> [pixma]  0010:2e 30 22 20 65 6e 63 6f  64 69 6e 67 3d 22 75 74
> [pixma]  0020:66 2d 38 22 20 3f 3e 0d  0a 3c 63 6d 64 20 78 6d
> [pixma]  0030:6c 6e 73 3a 69 76 65 63  3d 22 68 74 74 70 3a 2f
> [pixma]  0040:2f 77 77 77 2e 63 61 6e  6f 6e 2e 63 6f 6d 2f 6e
> [pixma]  0050:73 2f 63 6d 64 2f 32 30  30 38 2f 30 37 2f 63 6f
> [pixma]  0060:6d 6d 6f 6e 2f 22 3e 0d  0a 09 3c 69 76 65 63 3a
> [pixma]  0070:63 6f 6e 74 65 6e 74 73  3e 0d 0a 09 09 3c 69 76
> [pixma]  ...
> [pixma]
> [pixma] XML message sent to scanner:
>  xmlns:ivec="http://www.canon.com/ns/cmd/2008/07/common/";>StartJob
>
>
> servicetype="scan">00011
>
> [pixma] XML response back from scanner:
> 
> http://www.canon.com/ns/cmd/2008/07/common/";>
> 
> StartJobResponse
> 
> OK
> 
> 0001
> 
> 
> 
> [pixma] OUT  T=18.617 len=390
> [pixma]  :3c 3f 78 6d 6c 20 76 65  72 73 69 6f 6e 3d 22 31
> [pixma]  0010:2e 30 22 20 65 6e 63 6f  64 69 6e 67 3d 22 75 74
> [pixma]  0020:66 2d 38 22 20 3f 3e 3c  63 6d 64 20 78 6d 6c 6e
> [pixma]  0030:73 3a 69 76 65 63 3d 22  68 74 74 70 3a 2f 2f 77
> [pixma]  0040:77 77 2e 63 61 6e 6f 6e  2e 63 6f 6d 2f 6e 73 2f
> [pixma]  0050:63 6d 64 2f 32 30 30 38  2f 30 37 2f 63 6f 6d 6d
> [pixma]  0060:6f 6e 2f 22 20 78 6d 6c  6e 73 3a 76 63 6e 3d 22
> [pixma]  0070:68 74 74 70 3a 2f 2f 77  77 77 2e 63 61 6e 6f 6e
> [pixma]  ...
> [pixma]
> [pixma] IN   T=18.621 len=510
> [pixma]  :3c 3f 78 6d 6c 20 76 65  72 73 69 6f 6e 3d 22 31
> [pixma]  0010:2e 30 22 20 65 6e 63 6f  64 69 6e 67 3d 22 75 74
> [pixma]  0020:66 2d 38 22 20 3f 3e 0d  0a 3c 63 6d 64 20 78 6d
> [pixma]  0030:6c 6e 73 3a 69 76 65 63  3d 22 68 74 74 70 3a 2f
> [pixma]  0040:2f 77 77 77 2e 63 61 6e  6f 6e 2e

[sane-devel] [patch] mf4570dn

2014-02-28 Thread Rolf Bensch
Hi Chrysn,

We should avoid multiple declarations in the code.

I'll simply replace "Canon i-SENSYS MF4550d" with "Canon i-SENSYS MF4500
Series" in the code and commit the changes, soon.

It's correct, there are MF4500 Series scanners with and without
wireless. But we cannot differ wireless from wired only devices because
we identify scanners by their USB PID and they have the same.

Many thanks for your help.

Cheers,
Rolf

Am 21.02.2014 03:18, schrieb chrysn:
> On Mon, Feb 17, 2014 at 11:45:50AM +0100, louis at fazant.net wrote:
>>> $ scanimage -d pixma:mf4570dn_clio
>> Unless you have more than one scanner, there is no need to select the
>> device on the command line. The name you are using here is almost for sure
>> incorrect.
> `scanimage -d pixma` didn't improve the results either, but adding the
> device to the device list did.
>
> the attached patch adds an "i-SENSYS MF4500 Series" line to the list of
> known devices. ("Canon MF4500 Series" is what my MF4570dn reported). the
> usb pid is the same as for the already existing mf4550d (MF4550_PID), so
> i reused that. as a result of the sequence, all 4500 devices should show
> up as "Canon MF4500 Series" when connected by usb, but the 4550 stays
> discernable when connected via network (provided i understand all that
> discovery right).
>
> capability-wise, the new device / device group is no different than all
> the others already present. i've adapted the documentation to match that
> we now probably support all MF4500 series devices. (at least on usb;
> some might still use individual model numbers on network).
>
> side note: the i-SENSYS MF4570dn seems to be identical with the
> imageCLASS MF4570dw except it's not *w*ireless (only regular *n*etwork).
> apart from generalization that could be done from that: it looks like it
> has PIXMA_CAP_ADF.
>
>
> please review and accept the patch.
>
> best regards
> chrysn
>




[sane-devel] Canon PIXMA MX430 Support (USB ID 0x04a9/0x175b)

2014-02-28 Thread Rolf Bensch
Hi Fredrik,

Sorry for answering your request so late.

Please follow these steps to start debugging:

(1) Install latest Sane from git, as described here:
http://www.sane-project.org/README.linux

(2) Read 'man sane-pixma' to catch available environment settings for
debug levels. I'm usually using 'export SANE_DEBUG_PIXMA=4' for common
debug output and 'export SANE_DEBUG_PIXMA=11' to see the USB protocols.

(3) Work on a terminal to see debug outputs. You only need to set
'export SANE_DEBUG_PIXMA...' once for each terminal session.

(4) To redirect debug output in a file use 'scanimage [options] 2>
pixma.log > pixma.pnm' or 'xsane &> pixma.log'. xsane starts with its gui.

(5) The source code for your scanner is in 'backend/pixma_mp150.c'.

(6) To get familiar with the code start with the functions mp150_*().

(7) You can uncomment commented debug output, e.g. in lines 1219 and
1220 in backend/pixma_mp150.c. The debug level in this example is 4.

(8) Feel free to create additional debug output for your understanding
and debugging ( PDBG (pixma_dbg (4, ...)); ).

(9) You should start to test flatbed functions with a low resolution and
a small scan area.  If everything is working increase only one scan
parameter. If you go to higher resolutions you might choose small scan
areas to reduce scan time and log file size.

(10) You should know that the MP150 backend has problems with ADF empty
detection. We can discuss this item after everything else is working for
you.

Don't hesitate to contact me and/or the mailing list to discuss details
of your work.

Cheers,
Rolf


Am 12.02.2014 05:41, schrieb Fredrik Haikarainen:
> Hi,
>
> I noticed that this scanner (as stated in the subjectline) is on your
> list of untested scanners, and I want to be of any help I can to you
> as I have this very scanner.
>
> I have no prior experience of either sane or working with scanners
> under a GNU/Linux environment, but I do have very much experience in
> programming (C++ mainly, also grasp C very well).
>
> I managed to scan some documents I needed to, although with some
> trouble. Sometimes the "scanimage" program would just sit and wait
> with no output, while the scanner did pretty much the same (didn't
> even make a single noise), other times I'd get some I/O error, where
> half the time the scanner would also display a totally unrelated error
> (that didn't even happen, like "Close this lid" while it really was
> closed, and didn't matter at all to the scanning process). One thing
> that always fixed this was replugging the USB and running
> sane-find-scanner again.
>
> To proceed testing (and eventually patching the pixma backend), I
> would be so delighted if you had any test-suite ready for these kinds
> of things, or perhaps a checklist of sorts. Any documentation/tools
> that I could use to ease this process would be highly appreciated,
> although I have no problem to start with nothing at all as well, I'm
> simply wondering what exists for this already. 
>
> PS. I'm on ArchLinux and not Debian, if that matters a lot. I'll have
> you know I've used debian for about 7 years before switching though,
> so I know a lot about it.
>
> Looking forward to add another scanner to your bunch.
>
> Regards,
> Fredrik Haikarainen
>




[sane-devel] NET BJNP Canon imageCLASS MF4880DW

2014-02-08 Thread Rolf Bensch
Hi Louis,

Other Pixma sub-backends use '#define IMAGE_BLOCK_SIZE (512*1024)'.

I would exceed IMAGE_BLOCK_SIZE to the same size (0x8).

Cheers,
Rolf



Am 08.02.2014 00:00, schrieb Louis Lagendijk:
> On Tue, 2014-01-07 at 13:05 +0100, Louis Lagendijk wrote:
> Hi Rolf,
> I am working with Yvan L. G?linas  to get the laser
> multi-functionals to work over the mfnp protocol (usb over IP).
> Yvan has kindly given me access to his scanner over a tunnel.
> 
> I found that the MF4880DW sends pretty big image blocks to the backend:
> I see sizes of 261640 (just below 256K), so we exceed the currently
> defined :
> #define IMAGE_BLOCK_SIZE (0x) and as a result the backend crashes.
> 
> Would it be ok for you if I change  this to:
> #define IMAGE_BLOCK_SIZE (0x3).
> 
> Thanks in advance for your feedback
> 
> Kind regards, Louis
> 
> 
> 
> 



[sane-devel] Canon MF4770N

2014-02-06 Thread Rolf Bensch
Hi Ralph,

Nice to hear from you again.

I guess that I already fixed ADF issue for Imageclass scanners. Please
fetch the latest SANE version from git.

Please check your SANE's versions:

$ export SANE_DEBUG_PIXMA=4
$ scanimage -V
scanimage (sane-backends) 1.0.25git; backend version 1.0.25
$ scanimage -L
[sanei_debug] Setting debug level of pixma to 4.
[pixma] pixma is compiled with pthread support.
[pixma] pixma version 0.17.6
...

If your SANE version is the latest one and the issue still happens,
please create a log file and send it to me:
$ export SANE_DEBUG_PIXMA=11
$ scanimage [options to enable ADF] -x 5 -y 5 2> pixma.log > pixma.pnm

You can also use xsane ($ xsane &> pixma.log). Then select a small scan
area in the preview window.

Cheers,
Rolf


Am 03.02.2014 18:28, schrieb Ralph Little:
> Hi Rolf (et al),
> I now have an MF4770N of my own.
> I will have a go at sorting out the issues relating to the ADF that we
> experienced previously and I will try to get to the bottom of the
> occasional error when scanning.
>
> To recap, the ADF on this scanner (any maybe on others) scans the
> first sheet from the ADF fine, but draws the next sheet ready to scan
> (like a fax). When scanning the next sheet, the printer is already in
> a ready state and doesn't like the sequence sent by sane when it
> starts to scan since it indicates that it is already busy. I have to
> cancel scanning on the scanner before proceeding.
>
> When do you think that the scanner should do in this situation? I can
> think of two possibilities:
>
> 1) Perhaps the driver could detect that the scanner is ready with
> another sheet and do something different to scan the next sheet, that
> is already loaded into the ADF.
> 2) Perhaps if the application is only asking for a single sheet scan,
> the remaining sheets should be cancelled at the end of the first-sheet
> scan.
>
> What think you?
>
> Cheers,
> Ralph
>
>




[sane-devel] CANON Pixma MX 510

2014-02-06 Thread Rolf Bensch
Hi Sebastien,

/Sorry, I used the wrong email address for SANE ml. Please answer to
this one./

ADF has a bug recognising empty document feeder. A work around can be
scanning exact page count.

If you like, we can try to debug this issue. I have no ADF scanner, so I
cannot do this by myself.

On the other hand, does your MX510 scan all resolutions up to 1200dpi in
flatbed mode without errors?

Many thanks for your help.

Cheers,
Rolf


Am 03.02.2014 11:23, schrieb sebastien:
> Hello,
>
> Sorry I have already sent this message to the sane-standard list but I
> have noticed that it was not the good one.
>
>
> I have a CANON Pixma MX 510, am I am trying to use libsane.
>
> I  would like to use the automatic document feeder to aquire
> automatically all the documents available. I have tried several way
> and I have found problem with all of them to detect that there is no
> more document in the document feeder.
>
> - sane_start or sane_read never returns SANE_STATUS_NO_DOCS
> -in synchrone mode, sane_read is blocked, and if I call sane_cancel
> from another thread, this call is also definitly blocked
> -The asynchrone mode doen't seem to work. If I call sane_read when a
> document is available, it returns immediatly but read len =0
>
> Do you have other suggestions? Or do you think that there is problems
> with the PIXMA implementation?
>
> Thank you 
> Sebastien

-- next part --
An HTML attachment was scrubbed...
URL: 



[sane-devel] report for Canon Pixma MG2490 and sane-pixma

2014-02-06 Thread Rolf Bensch
Hi,

What kind of SANE installation do you have (repro | compiled)?

Please check the version of SANE:
$ scanimage -V

Does
$ sudo scanimage -L
give any feedback?

Cheers,
Rolf


Am 03.02.2014 01:36, schrieb ??:
> According to the sane-pixma.5
>  documentation, no
> one has reported whether sane-pixma works with the Canon Pixma MG2490.
> I recently purchased the MG2490 and can confirm that this new Pixma
> model does not work with SANE. I also own a Canon Pixma MP258 which is
> perfectly supported in SANE.
>
> Output of lsusb:
>
> Bus 007 Device 006: ID 04a9:176c Canon, Inc.
>
> Output of sane-find-scanner:
>
> found USB scanner (vendor=0x04a9 [Canon], product=0x176c [MG2400
> series]) at libusb:007:006
>
> However scanimage -L and xsane do not recognize the MG2490.
>
> -BEGIN PGP PUBLIC KEY BLOCK-
>
> Version: GnuPG v2.0.20 (GNU/Linux)
>
>
> mQENBE7vMHIBCADicCu8p52h2LRAaWZYLoR8BsKptqeJ9O5BWnDtobQGAFa5Xua7
>
> FmrZmhYxKp2vzvlonWmloOP60Zgbxj9rt13S33SLthO+PcKneQkg4dBy/L8fxUaX
>
> 8L3n++I/i/qh4l7udUH9QoKNXeHDrAxgJfWcK4eXfImFkIc3EQhz/Ib7mEhIRSbP
>
> gViohOjfwLNy07uf00DjEMvnlF/KY6LfoEEQUvIDmqembQrRXc2castWjL/Hjxae
>
> seEOonMMuvPkvfcJrzfG8F7HJnRs+7e5/HNYA3iNap7JE1cb1huwXIqU7vh4Rd/R
>
> Gq0kVOcGqszhyfuMNmbbbTNBEmzFmSBFtAGLABEBAAG0G0p1biBHbyA8Z29qdW4w
>
> NzdAZ21haWwuY29tPokBOAQTAQIAIgUCTu8wcgIbAwYLCQgHAwIGFQgCCQoLBBYC
>
> AwECHgECF4AACgkQpWkwz3I1E42NBggA19ciarF8DoPk+myx0AhEw8daDsZQ4sl4
>
> j7EBDuB0hHDDthX2jKgPwqenYutF0+2EZQ5VS6kiyFCenK4wtYzkSVwlYuoiUbla
>
> m0EPv8dA0f46/dxRhO2zoF8kfpmnR6BTR+EB+jVM+Mwpmc3shbpspnWPcRH/xTph
>
> YLcURumTrfyIN++SeqSGcw20wg/+zqxclgOkwzZi9K4qIbdI9alPFsP14/xB+dcG
>
> Ukows/TY7/eG3XGgiAE9tLLh99viBdLpSZ5T3GJlOGGnK+8EVZc9VG3yqxSURvBq
>
> +X2CzYUmjsQUo0b7mQxmvFtWmjTbNc4lfWP3kkQdrUOQIe5J8rGfvLkBDQRO7zBy
>
> AQgAsQC6mcxBHSZQzy8NwgZlQZSSx9zFjFVYkgr4xHym67PnkGs2opEvH0SawwMm
>
> LM1/rCWVEeFcHQVaQ41z0Iu2WRIrqzbHreT730R8DqpYGICSp6wbPR5/AfVnwhcf
>
> 5I1Vos+cGzhW3kgsrpBCkKfhhDtRY5tseRm/TDMv1SGowsXVEIM/eSqvcNPkPa0f
>
> am7Ah/sXYDg9om7wXbmLhPUz2RfPfHRYSDvRV9lIcvU0+jjVAwfpf3niPgZfsnU2
>
> 5smARZtjS1o0/pcFkrcKLE6VeVKFe2VxqJvFtKf4juxaIO1okxtwVcWfCbAGQplb
>
> YiIYz2M7YuD5vqeexrEzxosveQARAQABiQEfBBgBAgAJBQJO7zByAhsMAAoJEKVp
>
> MM9yNRONCb0H/1mV9EPt32R3ZYbUfO07V7GiMNYRZwfTW7ccGROwH1pzaI3ljQKM
>
> FvXOmWg71yNTSiG9eBeSBIpLUXtIwmZvFzOG3B30msZBTStM605hZ9QV0PLxJNdm
>
> 61MlZ2EqFqTQYPMKz4Jsn5nZ9FH8wxUJ3QL5zMunE80AjQY4KV7cBswUKQjoDYVq
>
> YIPVjsnchFduIcAMcpwKzTuMbqQih+mrjhr68Zusd44Lhr1g2qGQGCZXRn9/9oOQ
>
> jBMXpeMhJMG/iyTdbO8PNbLFqu4QpHJJzRMphFVkFSBmlqDPcVgoeMazWhQMBg37
>
> No+8Bq/f7QdNm+EJ/DHttuaJXDehVAFYnWE=
>
> =PeRG
>
> -END PGP PUBLIC KEY BLOCK-

-- next part --
An HTML attachment was scrubbed...
URL: 



[sane-devel] Canon MG3250 - new hardware

2014-02-06 Thread Rolf Bensch
Hi Keith,

Please install Sane as described in README.linux and try your scanner
*not* connected via wireless. Especially follow chapters 3.3 to 4.2.

If your machine has USB 3.0 please connect to USB 2.0.

Cheers,
Rolf


Am 03.02.2014 00:09, schrieb Keith Wansbrough:
> Hi,
>
> I have a Canon MG3250 connected via wireless (BJNP, IPv4). I see it's
> marked as "Testers needed". How can I help?
>
> I have pixma 0.17.6 (built from git), running on Ubuntu 12.04 on x86_64.
>
> scanimage -L didn't find the scanner, but putting an explicit line
> "bjnp://192.168.0.16" in /usr/local/etc/sane.d/pixma.conf made it find
> it.
>
> Running xsane and clicking the "Acquire preview" button causes the
> scanner to move slightly, and an error dialog "Error during read:
> Error during device I/O" to appear in xsane.
>
> I've attached the debug output (level 11) of the above. Any
> suggestions for things to try? I'm happy to apply patches, collect
> logs, etc.
>
> Thanks,
>
> --KW 8-)




[sane-devel] Untested scanner that works.

2014-02-05 Thread Rolf Bensch
Many thanks for your report.

Please test scanning a non specified no. of pages in ADF mode. Does your
scanner hang after the last page?

Cheers,
Rolf


Am 05.02.2014 00:27, schrieb e at openmailbox.org:
> The Canon PIXMA MX430 Series says untested on this page,
> http://www.sane-project.org/sane-mfgs.html
>
> However scanning works perfectly for me over the network through
> wifi/ethernet, and from USB, the ADF and flatbed works, scanning up to
> 1200dpi works. Specifically it's a MX432, I'm on Gentoo x86_64, CUPS
> 1.6.4, sane-backends 1.0.24-r1.
>
>




[sane-devel] Imageclass d530 scanner

2014-01-29 Thread Rolf Bensch
Hi Gilad,

I prepared a patch for your scanner some weeks ago. But unfortunately
receiving USB data from the scanner stuck somewhere in the OS.
Fortunately you have a different OS. Pleae try the attached patch.

First you must install SANE from git as described here:
http://www.sane-project.org/README.linux.

Then patch the file backend/pixma_imageclass.c with attached
pixma_imageclass.c.patch4_all:
$ patch pixma_imageclass.c pixma_imageclass.c.patch4_all

and copy attached d530.rules to /etc/udev/rules.d/

After everything has been compiled and installed, please check if you
can access your scanner as described in README.linux.

If your scanner has problems, please enable debug output:
$ export SANE_DEBUG_PIXMA=11

and create a log file with (scan area of 5mm x 5mm in color @ 75dpi ):
$ scanimage -x 5 -y 5 2> pixma.log > pixma.pnm

Many thanks for your help.

Cheers,
Rolf


Am 24.01.2014 16:39, schrieb Giladsom:
> Hello there,
> I just bought an Imageclass d530 printer.
> I was able to activate the printer, but I cannot find any way to activate
> the scanner. The computer just doesn't recognize it.
> I am using UBUNTU 13.04.
>
> Can you please help me?
>
> Gilad
>
>
>

-- next part --
--- ./pixma_imageclass.c2014-01-29 16:38:27.0 +0100
+++ ../sane-backends/backend/pixma_imageclass.c 2014-01-29 16:41:42.0 
+0100
@@ -94,6 +94,7 @@
 #define MF6680_PID 0x26fa
 #define MF8030_PID 0x2707
 #define IR1133_PID 0x2742
+#define D530_PID   0x2775
 
 
 enum iclass_state_t
@@ -412,8 +413,9 @@
 return error;
   if (s->param->source == PIXMA_SOURCE_ADF && !has_paper (s))
 return PIXMA_ENO_PAPER;
-  /* activate only seen for generation 1 scanners */
-  if (mf->generation == 1)
+  /* activate only seen for generation 1 scanners
+   * but not for D530 */
+  if (mf->generation == 1 && s->cfg->pid != D530_PID)
 {
   if (error >= 0)
 error = activate (s, 0);
@@ -470,8 +472,9 @@
   mf->cb.cmd_header_len = 10;
   mf->cb.cmd_len_field_ofs = 7;
 
-  /* set generation = 2 for new multifunctionals */
-  mf->generation = (s->cfg->pid >= MF8030_PID) ? 2 : 1;
+  /* set generation = 2 for new multifunctionals
+   * except D530 is a generation 1 scanner */
+  mf->generation = (s->cfg->pid >= MF8030_PID && s->cfg->pid != D530_PID) ? 2 
: 1;
   PDBG (pixma_dbg (3, "*iclass_open* This is a generation %d scanner.  
*\n", mf->generation));
 
   PDBG (pixma_dbg (3, "Trying to clear the interrupt buffer...\n"));
@@ -563,6 +566,8 @@
   if (error >= 0)
 error = send_scan_param (s);
   if (error >= 0)
+error = query_status (s);
+  if (error >= 0)
 error = request_image_block (s, 0, &ignore, &ignore2, &ignore, &ignore2);
   if (error < 0)
 {
@@ -785,5 +790,6 @@
   DEV ("Canon i-SENSYS MF5880dn", "MF5880", MF5880_PID, 600, 640, 877, 
PIXMA_CAP_ADFDUP),
   DEV ("Canon i-SENSYS MF6680dn", "MF6680", MF6680_PID, 600, 640, 877, 
PIXMA_CAP_ADFDUP),
   DEV ("Canon imageRUNNER 1133", "iR1133", IR1133_PID, 600, 637, 877, 
PIXMA_CAP_ADFDUP),
+  DEV ("Canon imageCLASS D530", "D530", D530_PID, 600, 640, 877, 0),
   DEV (NULL, NULL, 0, 0, 0, 0, 0)
 };
-- next part --
# Canon imageCLASS D530
ATTRS{idVendor}=="04a9", ATTRS{idProduct}=="2775", MODE="0664", 
GROUP="scanner", ENV{libsane_matched}="yes"


[sane-devel] SANE webserver up again

2014-01-03 Thread Rolf Bensch
My recent commits haven't been processed by the supported devices list.

http://www.sane-project.org/lists/sane-backends-cvs.html#S-PIXMA should
show Pixma version 0.17.6 and some changes for particular devices.

Rolf



Am 29.11.2013 16:43, schrieb m. allan noah:
> Yes- our cron scripts are not setup. I'll do that later today.
> 
> allan
> 
> On Fri, Nov 29, 2013 at 10:42 AM, Rolf Bensch  
> wrote:
>> Daily git snapshots isn't working. And the old ones can be removed.
>>
>> Rolf
>>
>> Am 27.11.2013 21:37, schrieb m. allan noah:
>>> Thanks Henning. I was prepared to fix the website, I just needed you
>>> to change the dns records. But, you've done some of my work for me, so
>>> I won't complain :)
>>>
>>> allan
>>>
>>> On Wed, Nov 27, 2013 at 3:19 PM, Henning Geinitz  
>>> wrote:
>>>> Hi everybody,
>>>>
>>>> as you may have noticed, the SANE webserver (www.sane-project.org) is has
>>>> been down since several days. The reason was a hard disc failure on the
>>>> server that hosts SANE (alioth.debian.org). More information:
>>>> http://lists.debian.org/debian-devel-announce/2013/11/msg3.html
>>>>
>>>> So today I copied all data on alioth.debian.org from /mnt/home/groups/sane
>>>> back to the groups directory. This includes htdocs so the website is 
>>>> running
>>>> again on http://sane.alioth.debian.org. Also other services like git may
>>>> work again.
>>>>
>>>> However, I did not test anything else but basic web functionality. Please
>>>> check and correct any scripts that may not be working and crontabs.
>>>>
>>>> The mailing list archive still does not seem to work (no recent articles
>>>> since Nov 24), I have no idea why not.
>>>>
>>>> I also updated the DNS A record of www.sane-project.org to the new IP
>>>> address of alioth.debin.org. DNS propagation may take some time.
>>>>
>>>> Some info bout DNS configuration for the records:
>>>> www.sane-project.org, www1.sane-project.org and sane-project.org all point
>>>> to the IP address of sane.alioth.debian.org (=alioth.debian.org). 
>>>> Originally
>>>> there were mirrors at www2 and www3 but www2 does not work and www3 id very
>>>> old. I try to update www3 in the next few days but no guarantees. New
>>>> mirrors would be nice.
>>>>
>>>> This is a one-time effort i.e. I can not handle more work on alioth. So
>>>> admins with ssh access to alioth are needed to do such work in future. As
>>>> I'm the owner of the domain name sane-project.org I'll handle request to
>>>> change the DNS records but I can't do more due to time constraints.
>>>>
>>>> Kind regards
>>>>
>>>> Henning Geinitz
>>>>
>>>> --
>>>> sane-devel mailing list: sane-devel at lists.alioth.debian.org
>>>> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
>>>> Unsubscribe: Send mail with subject "unsubscribe your_password"
>>>> to sane-devel-request at lists.alioth.debian.org
>>>
>>>
>>
> 
> 
> 



[sane-devel] backend PIXMA: imageCLASS MF4880DW

2014-01-03 Thread Rolf Bensch
Hi Yvan,

Super. I'll change the status from 'good' to 'complete' and remove the
'ADF buggy' hint in the doc file later.

Many thanks for your help.

Cheers,
Rolf



Am 02.01.2014 22:12, schrieb Yvan L. G?linas:
> Hi,
> 
> Thanks, Happy New Year.  Here its -25C today...
> 
> Depends on the frontend;
> 
> -xsane: xsane seems to require to have the # of pgs upfront or use the
> default '1' (top left corner of the gui).  So if there are 3 pgs,
> first one scan OK, but xsane don't check if there are other sheets.
> Scanner will wait for some time (less than 1 min) and time out.
> 
> -scanimage:  with scanimage -b -d pixma:04A92773_0136514EEC94 --format
> tiff --source "Automatic Document Feeder" --mode Gray   All goes OK,
> one file per page, scanimage listen/understand to the scanner status,
> see below.
> 
> Scanning -1 pages, incrementing by 1, numbering from 1
> Scanning page 1
> Scanned page 1. (scanner status = 5)
> Scanning page 2
> Scanned page 2. (scanner status = 5)
> Scanning page 3
> Scanned page 3. (scanner status = 5)
> Scanning page 4
> scanimage: sane_read: Document feeder out of documents
> Scanned page 4. (scanner status = 7)
> 
> Let me know if need more
> 
> Cheers
> 
> 
> On Thu, Jan 2, 2014 at 3:17 PM, Rolf Bensch  wrote:
>> Hi Yvan,
>>
>> Happy new year!
>>
>> One question about ADF: Do you need to tell the frontend the no. of
>> scanning pages and/or does the scanner stop after the last scanned page
>> with unknown no. of pages?
>>
>> Cheers,
>> Rolf
>>
>>
>> Am 30.12.2013 17:34, schrieb Yvan L. G?linas:
>>> Hi Rolf,
>>>
>>> To recap my findings;
>>>
>>> -USB
>>>
>>> After fidling with xsane settings, I am now able to get good scan from
>>> ADF, gray or color.  Not sure why ADF and flatbed default settings
>>> were so different.
>>>
>>> Basic ADF checks were:
>>>- Full pages (3),   gray and color mode.
>>>- Area selected about 10cmx10cm) for the the three pages.
>>> All ok
>>>
>>> I didn't try all combination of dpi (tried 300 and 75) etc, but ADF
>>> work good up to now.
>>>
>>>
>>> -NET
>>>
>>> After changing  pixma_bjnp_private.h/BJNP_STRING to MFNP, was able to
>>> get some scans.  But quite inconsistent.  xsane crashes each time.
>>> xscanimage provided good scan in some cases and in other cases didn't
>>> work (even in exact same condition as much I can see).  When
>>> xscanimage didn't work was getting following
>>>
>>> bjnp] bjnp_recv_header:ERROR, Received response has cmd code 80, expected 33
>>> [bjnp] Could not read response to command!
>>> [bjnp] bjnp_recv_header:ERROR, Received response has cmd code 10, expected 
>>> 33
>>> [bjnp] Could not read response to command!
>>> [bjnp] bjnp_recv_header:ERROR, Received response has cmd code 4, expected 33
>>> [bjnp] Could not read response to command!
>>> [bjnp] bjnp_recv_header:ERROR, Received response has cmd code 1, expected 33
>>> [bjnp] Could not read response to command!
>>> [bjnp] bjnp_recv_header:ERROR, Received response has cmd code 0, expected 33
>>>
>>>
>>> Any suggestions were I should look/change?
>>>
>>> Thanks!
>>>
>>> On Fri, Dec 27, 2013 at 3:53 PM, Rolf Bensch  
>>> wrote:
>>>> Hi Yvan,
>>>>
>>>> please ask Sane mailing list about network support.
>>>>
>>>> If you have the capabilities to do some bug fixing, I can send you my
>>>> ideas about fixing the ADF issue. I don't own an imageCLASS device with
>>>> ADF, so I cannot fix it by myself.
>>>>
>>>> Cheers,
>>>> Rolf
>>>>
>>>> Am 27.12.2013 21:42, schrieb Yvan L. G?linas:
>>>>> Hi,
>>>>>
>>>>> Yes, thanks, now xsane sees the ADF.  First page is scanned OK, except
>>>>> that sheet is not fully getting out and following ones not processed.
>>>>>  So I assumed this is buggy.
>>>>>
>>>>>
>>>>>
>>>>> Re network: looking at a wireshark capture in windows, bjnp is not
>>>>> used, I see instead MFNP to port 8610. 'Query' beside this looks
>>>>> alike.
>>>>> Windows (toolbox): Data: 4d464e500201
>>>>> sane-backend: Data: 424a4e5002010

[sane-devel] Imageclass d530

2014-01-02 Thread Rolf Bensch
Hi Nate,

Happy new year.

It seems that your scanner doesn't respond scanned data and hangs up or
your Linux has USB problems.

Please try another USB 2.0 port.

Please try to scan a small (e.g. 5mm x 5mm) area without prescan.

What Linux distro are you using. Some people reported USB problems with
Ubuntu 13.10.

Please check the used libusb version. Maybe you should install and use
libusb_1.0-0-dev instead of libusb-dev.

Another person solved a similar problem after these steps:
(1) remove sane with 'sudo make uninstall'
(2) purge (not only remove) distro's libsane
(3) reinstall distro's libsane
(4) install self compiled sane

Maybe the printer driver can cause this problem. Please try to remove
the printer driver or try your scanner in a VM with a fresh installed
Ubuntu 12.04 without printer driver.

Sorry for my diffuse ideas. I can only handle visible data.

Cheers,
Rolf



Am 17.12.2013 21:30, schrieb Nate Fuhriman:
> still not working. The attached was taken with all patches applied.
> 



[sane-devel] backend PIXMA: imageCLASS MF4880DW

2013-12-27 Thread Rolf Bensch
Hi Yvan,

Many thanks reporting your scanner.

Your scanner is a member of the MF4800 Series scanners. And Canon is
using both imageCLASS and i-SENSYS for these scanners.

I assume that ADF is buggy for your scanner, too. Please test it.

I just committed to git 14" legal support for the MF4800 and an update
for the doc files.

Cheers,
Rolf


Am 26.12.2013 21:35, schrieb Yvan L. G?linas:
> Hi,
>
> I have a Canon imageCLASS MF4880DW and noted that it is not in the
> sane-backend list.
>
> Checking the usb ID, it is the same as i-SENSYS MF4890dw.  Using
> backend version 1.0.25 and xsane looks to be working fine (few scans,
> default settings).
>
> 
> scanimage -L:
> device `pixma:04A92773_0136514EEC94' is a CANON Canon i-SENSYS MF4800
> Series multi-function peripheral
>
> lsusb: Bus 003 Device 004: ID 04a9:2773 Canon, Inc.
> 
>
>
> The status of the MF4890dw is shown as "Untested", Any specific tests
> still required (with the MF4880DW)? Just let me know.
>
> Thanks for the great work!
>
>




[sane-devel] Imageclass d530

2013-12-17 Thread Rolf Bensch
Hi Nate,

I found 2 possible problems:
(1) It seems that the timeout isn't working. There's a patch for
pixma_common.c.
(2) The Windows driver sends a status request between send scan
parameters and request image block. There's a patch for pixma_imageclass.c.

Please try the patches one by one in the order shown above. If this
doesn't help, please create pixma.log again and an additional log file
with wireshark at the same time.

Cheers,
Rolf


Am 17.12.2013 18:13, schrieb Nate Fuhriman:
> still has issues. pixma.log attached.
> 
-- next part --
--- ./pixma_common.c2013-12-17 19:20:17.0 +0100
+++ ../sane-backends/backend/pixma_common.c 2013-12-17 19:20:28.0 
+0100
@@ -655,7 +655,10 @@
 {
   error = pixma_read (s->io, data, expected_len);
   if (error == PIXMA_ETIMEDOUT)
+  {
 PDBG (pixma_dbg (2, "No response yet. Timed out in %d sec.\n", tmo));
+pixma_sleep (100);
+  }
 }
   while (error == PIXMA_ETIMEDOUT && --tmo != 0);
   if (error < 0)
-- next part --
--- ./pixma_imageclass.c2013-12-17 19:20:17.0 +0100
+++ ../sane-backends/backend/pixma_imageclass.c 2013-12-17 19:20:32.0 
+0100
@@ -565,6 +565,8 @@
   if (error >= 0)
 error = send_scan_param (s);
   if (error >= 0)
+error = query_status (s);
+  if (error >= 0)
 error = request_image_block (s, 0, &ignore, &ignore2, &ignore, &ignore2);
   if (error < 0)
 {


[sane-devel] Imageclass d530

2013-12-17 Thread Rolf Bensch
Hi Nate,

Attached is the next patch pixma_imageclass.c.patch2 for
pixma_imageclass.c. I assume that your scanner is a generation 1 type.

In the meantime I did some work in pixma_imageclass.c. Maybe you need to
fetch the latest code from git and patch with pixma_imageclass.c.patch2_all.

Please send a new pixma.log if the code is buggy.

Cheers,
Rolf



Am 11.12.2013 21:48, schrieb Nate Fuhriman:
> I got pass the not starting problem. This machine has to be put into
> "remote scanner" mode at the actual device.
> 
> When I try to scan now it just hangs on me and the display on the
> device says "An error has occured" and the following appears in my
> /var/log/messages. I have also attached the usblyzer html output as
> requested.
> 
> Dec 11 13:47:07 r2d2 kernel: [  661.651208] usb 2-1: usbfs: interface 1
> claimed by usblp while 'scanimage' sets config #1
> Dec 11 13:47:15 r2d2 kernel: [  670.385064] usb 2-1: usbfs: interface 1
> claimed by usblp while 'scanimage' sets config #1
> Dec 11 13:47:16 r2d2 kernel: [  670.913699] usb 2-1: usbfs: interface 1
> claimed by usblp while 'scanimage' sets config #1
> Dec 11 13:47:19 r2d2 kernel: [  674.327016] hub 2-0:1.0: port 1 disabled
> by hub (EMI?), re-enabling...
> Dec 11 13:47:19 r2d2 kernel: [  674.330553] usb 2-1: USB disconnect,
> device number 2
> Dec 11 13:47:19 r2d2 kernel: [  674.341357] usblp0: removed
> Dec 11 13:47:19 r2d2 colord: device removed: sysfs-Canon_Inc-D530_D560
> Dec 11 13:47:19 r2d2 systemd[1]: Service printer.target is not needed
> anymore. Stopping.
> Dec 11 13:47:19 r2d2 systemd[1]: Stopping Printer.
> Dec 11 13:47:19 r2d2 systemd[1]: Stopped target Printer.
> Dec 11 13:47:20 r2d2 kernel: [  674.559025] usb 2-1: new high-speed USB
> device number 3 using ehci-pci
> Dec 11 13:47:20 r2d2 kernel: [  674.684038] usb 2-1: New USB device
> found, idVendor=04a9, idProduct=2775
> Dec 11 13:47:20 r2d2 kernel: [  674.687474] usb 2-1: New USB device
> strings: Mfr=1, Product=2, SerialNumber=3
> Dec 11 13:47:20 r2d2 kernel: [  674.690815] usb 2-1: Product: D530/D560
> Dec 11 13:47:20 r2d2 kernel: [  674.694190] usb 2-1: Manufacturer: Canon
> Inc
> Dec 11 13:47:20 r2d2 kernel: [  674.697478] usb 2-1: SerialNumber:
> 1131T3600452
> Dec 11 13:47:20 r2d2 kernel: [  674.719116] usblp 2-1:1.1: usblp0: USB
> Bidirectional printer dev 3 if 1 alt 0 proto 2 vid 0x04A9 pid 0x2775
> Dec 11 13:47:20 r2d2 mtp-probe: checking bus 2, device 3:
> "/sys/devices/pci:00/:00:13.2/usb2/2-1"
> Dec 11 13:47:20 r2d2 mtp-probe: bus: 2, device: 3 was not an MTP device
> Dec 11 13:47:20 r2d2 colord: Device added: sysfs-Canon_Inc-D530_D560
> Dec 11 13:47:20 r2d2 systemd[1]: Starting Printer.
> Dec 11 13:47:20 r2d2 systemd[1]: Reached target Printer.
> Dec 11 13:47:20 r2d2 systemd[1]: Starting Configure Plugged-In
> Printer...
> Dec 11 13:47:20 r2d2 systemd[1]: Started Configure Plugged-In Printer.
> Dec 11 13:47:21 r2d2 udev-configure-printer: no corresponding CUPS
> device found
> 
> 
-- next part --
--- ./pixma_imageclass.c2013-12-17 11:54:43.0 +0100
+++ ../sane-backends/backend/pixma_imageclass.c 2013-12-17 12:10:15.0 
+0100
@@ -413,8 +413,9 @@
 return error;
   if (s->param->source == PIXMA_SOURCE_ADF && !has_paper (s))
 return PIXMA_ENO_PAPER;
-  /* activate only seen for generation 1 scanners */
-  if (mf->generation == 1)
+  /* activate only seen for generation 1 scanners
+   * but not for D530 */
+  if (mf->generation == 1 && s->cfg->pid != D530_PID)
 {
   if (error >= 0)
 error = activate (s, 0);
@@ -471,8 +472,9 @@
   mf->cb.cmd_header_len = 10;
   mf->cb.cmd_len_field_ofs = 7;
 
-  /* set generation = 2 for new multifunctionals */
-  mf->generation = (s->cfg->pid >= MF8030_PID) ? 2 : 1;
+  /* set generation = 2 for new multifunctionals
+   * except D530 is a generation 1 scanner */
+  mf->generation = (s->cfg->pid >= MF8030_PID && s->cfg->pid != D530_PID) ? 2 
: 1;
   PDBG (pixma_dbg (3, "*iclass_open* This is a generation %d scanner.  
*\n", mf->generation));
 
   PDBG (pixma_dbg (3, "Trying to clear the interrupt buffer...\n"));
-- next part --
--- ./pixma_imageclass.c2013-12-17 12:24:09.0 +0100
+++ ../sane-backends/backend/pixma_imageclass.c 2013-12-17 12:24:24.0 
+0100
@@ -94,6 +94,7 @@
 #define IR1133_PID 0x2742
 #define MF4570_PID 0x275a
 #define MF4800_PID 0x2773
+#define D530_PID   0x2775
 
 
 enum iclass_state_t
@@ -412,8 +413,9 @@
 return error;
   if (s->param->source == PIXMA_SOURCE_ADF && !has_paper (s))
 return PIXMA_ENO_PAPER;
-  /* activate only seen for generation 1 scanners */
-  if (mf->generation == 1)
+  /* activate only seen for generation 1 scanners
+   * but not for D530 */
+  if (mf->generation == 1 && s->cfg->pid != D530_PID)
 {
   if (error >= 0)
 error = activate (s, 0);
@@ -470,8 +472,9 @@
   mf->cb.cmd_header_len = 10;
   mf->cb.cmd_len_field_ofs = 7;
 
-  /* set generation = 2

[sane-devel] New hardware report, patches: Canon PIXMA MX920/MX922, pixma_mp150.c

2013-12-16 Thread Rolf Bensch
I just committed your patch to the git tree, before I'll forget it.

Cheers,
Rolf


Am 08.11.2013 22:38, schrieb Rolf Bensch:
> 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




[sane-devel] SANE webserver up again

2013-12-14 Thread Rolf Bensch
You forgot to remove '.gitignore' in both snapshots, backend and frontend.

Rolf

Am 29.11.2013 16:43, schrieb m. allan noah:
> Yes- our cron scripts are not setup. I'll do that later today.
> 
> allan
> 
> On Fri, Nov 29, 2013 at 10:42 AM, Rolf Bensch  
> wrote:
>> Daily git snapshots isn't working. And the old ones can be removed.
>>
>> Rolf
>>
>> Am 27.11.2013 21:37, schrieb m. allan noah:
>>> Thanks Henning. I was prepared to fix the website, I just needed you
>>> to change the dns records. But, you've done some of my work for me, so
>>> I won't complain :)
>>>
>>> allan
>>>
>>> On Wed, Nov 27, 2013 at 3:19 PM, Henning Geinitz  
>>> wrote:
>>>> Hi everybody,
>>>>
>>>> as you may have noticed, the SANE webserver (www.sane-project.org) is has
>>>> been down since several days. The reason was a hard disc failure on the
>>>> server that hosts SANE (alioth.debian.org). More information:
>>>> http://lists.debian.org/debian-devel-announce/2013/11/msg3.html
>>>>
>>>> So today I copied all data on alioth.debian.org from /mnt/home/groups/sane
>>>> back to the groups directory. This includes htdocs so the website is 
>>>> running
>>>> again on http://sane.alioth.debian.org. Also other services like git may
>>>> work again.
>>>>
>>>> However, I did not test anything else but basic web functionality. Please
>>>> check and correct any scripts that may not be working and crontabs.
>>>>
>>>> The mailing list archive still does not seem to work (no recent articles
>>>> since Nov 24), I have no idea why not.
>>>>
>>>> I also updated the DNS A record of www.sane-project.org to the new IP
>>>> address of alioth.debin.org. DNS propagation may take some time.
>>>>
>>>> Some info bout DNS configuration for the records:
>>>> www.sane-project.org, www1.sane-project.org and sane-project.org all point
>>>> to the IP address of sane.alioth.debian.org (=alioth.debian.org). 
>>>> Originally
>>>> there were mirrors at www2 and www3 but www2 does not work and www3 id very
>>>> old. I try to update www3 in the next few days but no guarantees. New
>>>> mirrors would be nice.
>>>>
>>>> This is a one-time effort i.e. I can not handle more work on alioth. So
>>>> admins with ssh access to alioth are needed to do such work in future. As
>>>> I'm the owner of the domain name sane-project.org I'll handle request to
>>>> change the DNS records but I can't do more due to time constraints.
>>>>
>>>> Kind regards
>>>>
>>>> Henning Geinitz
>>>>
>>>> --
>>>> sane-devel mailing list: sane-devel at lists.alioth.debian.org
>>>> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
>>>> Unsubscribe: Send mail with subject "unsubscribe your_password"
>>>> to sane-devel-request at lists.alioth.debian.org
>>>
>>>
>>
> 
> 
> 



[sane-devel] Imageclass d530

2013-12-11 Thread Rolf Bensch
Hi Nate,

Your scanner sticks at early scan beginning where I haven't seen
problems before.

If possible please sniff the usb protocols of a small color scan (5mm x
5mm) @ 75 dpi on a Windows machine or virtual machine. You can use
USBLyzer (export as html) or Wireshark or
http://benoit.papillault.free.fr/usbsnoop/.

Cheers,
Rolf


Am 09.12.2013 19:11, schrieb Nate Fuhriman:
> Attached.
> 



[sane-devel] Canon MF4780W

2013-12-11 Thread Rolf Bensch
Hi Wikus,

Your scanner should run with SANE >= 1.0.24.

The Canon MF4700 Series has been implemented as MF4770n
(http://www.sane-project.org/sane-backends.html#S-PIXMA). Please check
the usb id before in a terminal with 'lsusb'. The response should
contain '04a9:2774'.

Cheers,
Rolf



Am 09.12.2013 17:36, schrieb Wikus Neethling:
> Good day.
>
> Is the Canon MF4780W compatible with sane or is there another Canon
> sane driver that I can use with the printer?
>
> Thank you in advance.




[sane-devel] Imageclass d530

2013-12-09 Thread Rolf Bensch
Hi Nate,

Please enable debug output and respond the log file:

(1) open terminal
(2) enable debug output:
'export SANE_DEBUG_PIXMA=11'
(3) start testscan:
'scanimage 2> pixma.log > pixma.pnm
(4) compress and send pixma.log

Cheers,
Rolf


Am 09.12.2013 01:44, schrieb Nate Fuhriman:
> Something must still be wrong. Everytime I try to access it I just get "error
> during read. device busy" I do now see it listed with "scanimage -L"
> which I didn't before.
> 



[sane-devel] Imageclass d530

2013-12-06 Thread Rolf Bensch
Hi Nate,

Now you need to install SANE from git as described here:
http://www.sane-project.org/README.linux

Attached is the patch file for pixma_imageclass.c (before compiling
patch with: 'patch pixma_imageclass.c pixma_imageclass.c.patch1').

Additionally to installation step 3.3 you need to copy attached
d530.rules file to /etc/udev/rules.d/.

Please check all scan resolutions. I prefer xsane as frontend.

If everything is working, I'll add your scanner to SANE.

Cheers,
Rolf


Am 06.12.2013 21:16, schrieb Nate Fuhriman:
> Bus 001 Device 004: ID 04a9:2775 Canon, Inc. 
> 
-- next part --
--- ./pixma_imageclass.c2013-12-06 22:15:35.0 +0100
+++ ../sane-backends/backend/pixma_imageclass.c 2013-12-06 22:15:40.0 
+0100
@@ -94,6 +94,7 @@
 #define IR1133_PID 0x2742
 #define MF4570_PID 0x275a
 #define MF4890_PID 0x2773
+#define D530_PID   0x2775
 
 
 enum iclass_state_t
@@ -784,5 +785,6 @@
   DEV ("Canon imageCLASS MF4570dw", "MF4570dw", MF4570_PID, 600, 640, 877, 0),
   DEV ("Canon imageRUNNER 1133", "iR1133", IR1133_PID, 600, 637, 877, 
PIXMA_CAP_ADFDUP),
   DEV ("Canon i-SENSYS MF4890dw", "MF4890", MF4890_PID, 600, 640, 877, 0),
+  DEV ("Canon imageCLASS D530", "D530", D530_PID, 600, 640, 877, 0),
   DEV (NULL, NULL, 0, 0, 0, 0, 0)
 };
-- next part --
# Canon imageCLASS D530
ATTRS{idVendor}=="04a9", ATTRS{idProduct}=="2775", MODE="0664", 
GROUP="scanner", ENV{libsane_matched}="yes"


[sane-devel] Imageclass d530

2013-12-06 Thread Rolf Bensch
Hi Nate,

Please look for the usb identifier with 'lsusb' on a terminal (I assume
that you're using Linux). My scanner shows this line:
Bus 001 Device 005: ID 04a9:1908 Canon, Inc.

Then I can add your scanner to the code.

Cheers,
Rolf



Am 05.12.2013 19:41, schrieb Nate Fuhriman:
> I have a Canon imageCLASS D30. I don't see any support for the scanner
> on this device. Is there any information or data I can give to get this
> scanner supported?




[sane-devel] SANE webserver up again

2013-11-29 Thread Rolf Bensch
Daily git snapshots isn't working. And the old ones can be removed.

Rolf

Am 27.11.2013 21:37, schrieb m. allan noah:
> Thanks Henning. I was prepared to fix the website, I just needed you
> to change the dns records. But, you've done some of my work for me, so
> I won't complain :)
>
> allan
>
> On Wed, Nov 27, 2013 at 3:19 PM, Henning Geinitz  wrote:
>> Hi everybody,
>>
>> as you may have noticed, the SANE webserver (www.sane-project.org) is has
>> been down since several days. The reason was a hard disc failure on the
>> server that hosts SANE (alioth.debian.org). More information:
>> http://lists.debian.org/debian-devel-announce/2013/11/msg3.html
>>
>> So today I copied all data on alioth.debian.org from /mnt/home/groups/sane
>> back to the groups directory. This includes htdocs so the website is running
>> again on http://sane.alioth.debian.org. Also other services like git may
>> work again.
>>
>> However, I did not test anything else but basic web functionality. Please
>> check and correct any scripts that may not be working and crontabs.
>>
>> The mailing list archive still does not seem to work (no recent articles
>> since Nov 24), I have no idea why not.
>>
>> I also updated the DNS A record of www.sane-project.org to the new IP
>> address of alioth.debin.org. DNS propagation may take some time.
>>
>> Some info bout DNS configuration for the records:
>> www.sane-project.org, www1.sane-project.org and sane-project.org all point
>> to the IP address of sane.alioth.debian.org (=alioth.debian.org). Originally
>> there were mirrors at www2 and www3 but www2 does not work and www3 id very
>> old. I try to update www3 in the next few days but no guarantees. New
>> mirrors would be nice.
>>
>> This is a one-time effort i.e. I can not handle more work on alioth. So
>> admins with ssh access to alioth are needed to do such work in future. As
>> I'm the owner of the domain name sane-project.org I'll handle request to
>> change the DNS records but I can't do more due to time constraints.
>>
>> Kind regards
>>
>> Henning Geinitz
>>
>> --
>> sane-devel mailing list: sane-devel at lists.alioth.debian.org
>> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
>> Unsubscribe: Send mail with subject "unsubscribe your_password"
>> to sane-devel-request at lists.alioth.debian.org
>
>




[sane-devel] SANE webserver up again

2013-11-28 Thread Rolf Bensch
My last commit isn't on the website (replacement of README.linux).

Cheers,
Rolf

Am 27.11.2013 21:37, schrieb m. allan noah:
> Thanks Henning. I was prepared to fix the website, I just needed you
> to change the dns records. But, you've done some of my work for me, so
> I won't complain :)
>
> allan
>
> On Wed, Nov 27, 2013 at 3:19 PM, Henning Geinitz  wrote:
>> Hi everybody,
>>
>> as you may have noticed, the SANE webserver (www.sane-project.org) is has
>> been down since several days. The reason was a hard disc failure on the
>> server that hosts SANE (alioth.debian.org). More information:
>> http://lists.debian.org/debian-devel-announce/2013/11/msg3.html
>>
>> So today I copied all data on alioth.debian.org from /mnt/home/groups/sane
>> back to the groups directory. This includes htdocs so the website is running
>> again on http://sane.alioth.debian.org. Also other services like git may
>> work again.
>>
>> However, I did not test anything else but basic web functionality. Please
>> check and correct any scripts that may not be working and crontabs.
>>
>> The mailing list archive still does not seem to work (no recent articles
>> since Nov 24), I have no idea why not.
>>
>> I also updated the DNS A record of www.sane-project.org to the new IP
>> address of alioth.debin.org. DNS propagation may take some time.
>>
>> Some info bout DNS configuration for the records:
>> www.sane-project.org, www1.sane-project.org and sane-project.org all point
>> to the IP address of sane.alioth.debian.org (=alioth.debian.org). Originally
>> there were mirrors at www2 and www3 but www2 does not work and www3 id very
>> old. I try to update www3 in the next few days but no guarantees. New
>> mirrors would be nice.
>>
>> This is a one-time effort i.e. I can not handle more work on alioth. So
>> admins with ssh access to alioth are needed to do such work in future. As
>> I'm the owner of the domain name sane-project.org I'll handle request to
>> change the DNS records but I can't do more due to time constraints.
>>
>> Kind regards
>>
>> Henning Geinitz
>>
>> --
>> sane-devel mailing list: sane-devel at lists.alioth.debian.org
>> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
>> Unsubscribe: Send mail with subject "unsubscribe your_password"
>> to sane-devel-request at lists.alioth.debian.org
>
>




[sane-devel] New hardware report, patches: Canon PIXMA MX920/MX922, pixma_mp150.c

2013-11-08 Thread Rolf Bensch
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

[sane-devel] New hardware report, patches: Canon PIXMA MX920/MX922, pixma_mp150.c

2013-10-28 Thread Rolf Bensch
Many thanks for your detailled test report!


Am 23.10.2013 21:04, schrieb human2013odd at icebubble.org:
> Scanning works and produces useful results which appear mostly correct.
> There appears to be some color bleeding in the vertical direction.  With
> a black letter on white paper, this generally consists of a magenta hue
> just above the letter and a cyan hue just below it.  Attached, for
> example, is a blue letter "E" scanned at 150 dpi.  This bleeding effect
> diminishes as resolution increases, and is barely noticeable at 600 dpi
> or higher.  At 2400 dpi, the bleeding isn't visible to the eye, but it
> is still present, and can be detected using image manipulation software.
> I tried modifying the subdriver code in backend/pixma_mp150.c to shift
> the R/G/B color planes up/down the page, but could not get the colors to
> align.  It looks like the sensor consists of three rows, with red toward
> the top of the page, green in the middle, and blue towards the bottom of
> the page, but that the R/G/B sensors aren't positioned over the same
> physical spot on the page; when straddling the boundary between two
> colors, a false color is produced.  In theory, one could realign the
> color planes by scanning at 3x the desired resolution, shifting the
> colors, and then downsampling the result.  However, the resolutions
> supported by the scanner are all 75 * 2^n dpi.  Because 2 and 3 are
> relatively prime, this method can't be used to produce scans at any of
> the resolutions that the scanner offers.  So, either the sensor data
> from the scanner isn't being read correctly, or the scanner was designed
> by a team of masturbuitng monkeys with associates' degrees in French
> poetry.  I mean, really, who else would design a color scanner that
> produces inaccurate colors?
> 

Please check scanner's raw data with this patch:

--- ./pixma_mp150.c 2013-10-28 15:34:55.0 +0100
+++ ../sane-backends/backend/pixma_mp150.c  2013-10-28 16:03:30.0
+0100
@@ -1124,14 +1125,16 @@
   /* Color plane and stripes shift needed by e.g. CCD */
   /*PDBG (pixma_dbg (4, "*post_process_image_data*
Processing with c=%u, n=%u, m=%u, w=%i, line_size=%u * \n",
c, n, m, s->param->wx, line_size));*/
-  if (s->cfg->pid != MG5300_PID && s->cfg->pid != MG6300_PID &&
c >= 3)
+  if (0)
+  /* if (s->cfg->pid != MG5300_PID && s->cfg->pid != MG6300_PID
&& c >= 3) */
 dptr = shift_colors (dptr, sptr,
  s->param->wx, s->param->xdpi,
s->cfg->pid, c,
  mp->shift, mp->stripe_shift);

   /* special image format for *most* devices at high dpi.
* MP220, MX360, MX370, MX890, MG5300 are exceptions */
-  if (n > 0
+  if (0)
+  /*  if (n > 0
   && s->cfg->pid != MP220_PID
   && s->cfg->pid != MX360_PID
   && s->cfg->pid != MX370_PID
@@ -1139,7 +1142,7 @@
   && s->cfg->pid != MG3100_PID
   && s->cfg->pid != MG2100_PID
   && s->cfg->pid != MG5300_PID
-  && s->cfg->pid != MG6300_PID)
+  && s->cfg->pid != MG6300_PID) */
   reorder_pixels (mp->linebuf, sptr, c, n, m, s->param->wx,
line_size);

   /* Crop line to selected borders */

With this patch you disable all post processing functions. Please check
vertical and horizontal colour shift. Maybe we'll need to add some
special shift handling for this scanner.


> 
> Scanning worked but produced images with vertical stripes.  Attached are
> examples of this phenomenon at 1200 and 2400 dpi.  This problem was
> eliminated by bypassing the call to reorder_pixels in the
> post_process_image_data function of backend/pixma_mp150.c.  This fix is
> included in the patches supplied at the end of this report.
> 

I'll commit your patch later.


> 
> At 75, 150, 300, and 600 dpi, scans from the ADF have the same maximum
> widths as on the flatbed (640px at 75dpi, scaled by 2^n).  The subdriver
> currently limits scans from the ADF to the same maximum height as scans
> from the flatbed.  The nominal maximum page height usable in the ADF is
> 14.0 inches.  That would be 1050px at 75dpi.  However, this scanner's ADF
> can actually scan, in simplex, pages that are physically up to 15.5
> inches long.  I've managed to scan 1155px at 75dpi.  That's 15.4 inches, or
> 39.12 cm.  Accordingly, I've increased the height limit in the subdriver
> code to 1155px at 75dpi.  This fix is included in the patches supplied at
> the end of this report.
> 

I'll commit your patch later.


> Multiple one-sided pages can be scanned using the scanadf tool (the top
> page is scanned first), but after the last page is scanned, the scanner
> becomes unresponsive and scanadf eventually times-out.  Performing a
> scan using the command-line tool scanimage makes the scanner accessible
> again.
> 
> A single page of up to 12 inches in

[sane-devel] Canon ImageClass MF3010

2013-10-28 Thread Rolf Bensch
Hi Matt,

MF3010 is supported since the last release 1.0.24.

If your distro doesn't have 1.0.24 packages yet and if you're using an
Ubuntu derivate, you can install SANE from my repro:
https://launchpad.net/~rolfbensch/+archive/sane-git. Otherwise you can
fetch the release from here:
https://alioth.debian.org/frs/?group_id=30186 or the latest version from
git: http://www.sane-project.org/snapshots/ and install the downloaded
sources as desribed in README.linux.

Cheers,
Rolf


Am 28.10.2013 05:16, schrieb Matt Jones:
> Rolf,
> Did you ever receive a follow up on this?  I also have a imageClass MF3010 
> and would love to see it added to SANE.  I'd be happy to send you any 
> supporting data you need if that would help it be added.
> Thanks,
> Matt 




[sane-devel] Fwd: Schedule for release of sane-backends 1.0.24

2013-09-30 Thread Rolf Bensch
Many thanks. I just committed the last patch.

Rolf


Am 23.09.2013 22:25, schrieb m. allan noah:
> Yes. But, I'm not fanatical about it. If you have something simple
> that you are sure won't break anything else, go ahead and commit it.
> 
> allan
> 
> On Mon, Sep 23, 2013 at 4:09 PM, Rolf Bensch  wrote:
>> Are we in code freeze now?
>>
>> Rolf
>>
>>>  Original-Nachricht 
>>> Betreff:  [sane-devel] Schedule for release of sane-backends 1.0.24
>>> Datum:Sat, 24 Aug 2013 13:16:08 -0400
>>> Von:  m. allan noah 
>>> An:   sane-devel 
>>>
>>>
>>>
>>> It has been 1 year since our last release, so here we go again:
>>>
>>> Timetable:
>>> Sept 15, 2013: Feature freeze (only bugs, translation and doc updates)
>>> Sept 22, 2013: Code freeze (only horrible bugs, translation and doc updates)
>>> Sept 29, 2013: Release
>>>
>>> Note, it is highly likely that there are patches from end users which
>>> we failed to apply. If you know of such a case, please speak up, so we
>>> can start a dialog about including them in the release.
>>>
>>> During the period leading up to the release, it would be helpful if we
>>> could get some builds on various platforms, and tests done with
>>> various scanners. The sooner we discover problems, the better.
>>>
>>> allan
>>> --
>>> "The truth is an offense, but not a sin"
>>>
>>>
>>>
>>>
> 
> 
> 



[sane-devel] New scanner Canon MF4770N Multi function

2013-09-24 Thread Rolf Bensch
Hi Ralph,

I just committed your patch to git. I also edited some doc files and set
the scanner to "status :good" due to buggy ADF.

Maybe you'll have access to the scanner again in future. Then we can fix
buggy ADF.

Many thanks for your help.

Cheers,
Rolf


Am 21.09.2013 17:24, schrieb littlesincanada:
> Hi,
> Final patch included.
> 
> The ADF "dirty fix" did the job for me: after the first scan subsequent
> pages are ejected from the ADF.
> I have not included it in the patch file though.
> 
> I wish I had the time to have a go at this, but I only have the scanner
> today and lots of other stuff to do :(
> 
> Anyway, apart from all that, it's great! Fully functional scanning and
> no errors.
> Contributing is cool.
> 
> BTW: udev rule (I don't know if this is supplied by sane or the distro,
> but here it is anyway):
> 
> # Canon imageCLASS MF4770N
> ATTRS{idVendor}=="04a9", ATTRS{idProduct}=="2774",
> ENV{libsane_matched}="yes"
> 
> Until next time!
> 
> Cheers,
> Ralph
> 
> 
> On 21/09/13 00:50, Rolf Bensch wrote:
>> Hi Ralph,
>>
>> Am 21.09.2013 07:39, schrieb littlesincanada:
>>> Hi Rolf,
>>> Enclosed is the output file for the ADF multi page issue.
>>> As before, I load up 2 pages into the ADF.
>>> On first scan with xsane, the first page is pulled through and scanned
>>> normally.
>>> As the first page is finishing, the ADF starts to draw through the
>>> second page (like a fax machine typically does), then waits with it
>>> after the first page is finished.
>>> The trace in the enclosed file acknowledges that the ADF still has some
>>> pages in it.
>>> The scanner Processing/Data light is flashing so the scanner thinks that
>>> a job is still in progress.
>>>
>>> When I try to scan the next sheet, the trace shows that xsane thinks the
>>> scanner is busy and cannot proceed.
>>>
>> Maybe attached dirty patch will help for this issue.
>>
>> The problem is that the backend doesn't recognize that a 2nd page starts
>> scanning. Therefore it starts with the start session command. Normally a
>> scan is closed with the abort session command, but not a multi page scan
>> session. It is waiting for the next page and sends the abort session
>> command after the last page has been scanned.
>>
>> But maybe it is too complicated and we should follow KISS: A complete
>> scan session for each single page. We can do this here because we don't
>> use gama tables and other calibration for the scanner. But maybe this
>> will cause other problems with the frontend (batch scan).
>>
>> The main control variables are in pixma.c in pixma_sane_t: idle and
>> page_cout.
>>
>>> =
>>>
>>> BTW, the flatbed will actually do the full  11.7" so please put the
>>> flatbed scan height back to 877:
>>>
>>> In iclass_check_param():
>>>  sp->h = MIN (sp->h, 877 * sp->xdpi / 75);
>>>
>>> The ADF will indeed scan legal up to 14" in length.
>>> Apart from that everything looks cool.
>>>
>> OK
>>
>>> It is a shame that we have dimension information hidden in the
>>> iclass_check_param() function.
>>> We could do with adding an extra entry in pixma_config_t for separate
>>> ADF/flatbed geometry.
>>>
>> Indeed. This was a quick paste and copy patch. I'll patch this later. I
>> did this before for e.g. adftpu_min_dpi.
>>
>>> On Sunday, I have to say bye-bye to the printer, so from then on, I
>>> cannot do anything further :(
>>> There might be some time for me to look at the ADF issue tomorrow
>>> (Saturday) and test any further patches.
>>>
>> Sorry, I have no time to create any further patches today.
>>
>> Maybe you can solve this by yorself. Please send your final patch, so
>> that I can add this to git.
>>
>> Many thanks for your help.
>>
>> Cheers,
>> Rolf
> 



[sane-devel] Fwd: Schedule for release of sane-backends 1.0.24

2013-09-23 Thread Rolf Bensch
Are we in code freeze now?

Rolf

>  Original-Nachricht 
> Betreff:  [sane-devel] Schedule for release of sane-backends 1.0.24
> Datum:Sat, 24 Aug 2013 13:16:08 -0400
> Von:  m. allan noah 
> An:   sane-devel 
> 
> 
> 
> It has been 1 year since our last release, so here we go again:
> 
> Timetable:
> Sept 15, 2013: Feature freeze (only bugs, translation and doc updates)
> Sept 22, 2013: Code freeze (only horrible bugs, translation and doc updates)
> Sept 29, 2013: Release
> 
> Note, it is highly likely that there are patches from end users which
> we failed to apply. If you know of such a case, please speak up, so we
> can start a dialog about including them in the release.
> 
> During the period leading up to the release, it would be helpful if we
> could get some builds on various platforms, and tests done with
> various scanners. The sooner we discover problems, the better.
> 
> allan
> -- 
> "The truth is an offense, but not a sin"
> 
> 
> 
> 



[sane-devel] New scanner Canon MF4770N Multi function

2013-09-20 Thread Rolf Bensch
Hi Ralph,

Please log the USB protocols of a multipage ADF scan with 'export
SANE_DEBUG_PIXMA=11' and 'xsane 2> pixma.log'. The log file will be too
big for the ml. Please send it off list to my email address.

Cheers,
Rolf

Am 20.09.2013 23:20, schrieb Ralph Little:
> Hi,
> Something else that didn't quite work during last night's testing was
> loading multiple pages into the ADF.
> Using xsane, the first scan works fine.
> However, the ADF starts to load the second page towards the end of the
> first scan (fax-style) and appears to be waiting for xsane to request it.
> xsane reckons that it is finished but the scanner is not. It ends up in
> a strange situation where the scanner and xsane are out of sync.
> 
> While in this state, xsane will not perform a scan because the scanner
> is busy.
> Everything is fine after the scan is cancelled on the scanner panel.
> xsane is not expecting to be doing multiple scans in this setup.
> Perhaps the pixma driver can detect this situation and issue a cancel to
> the scanner?
> It could perform the first scan, detect if there is paper still in the
> scanner and if so, send an abort to the scanner.
> 
> If I get time, I will play around with this tonight, but my time with
> the unit is running out.
> Shame, this is a lot of fun.
> 
> Cheers,
> Ralph
> 
> 
> 
> *From:* Rolf Bensch 
> *To:* littlesincanada 
> *Cc:* sane-devel at lists.alioth.debian.org
> *Sent:* Friday, September 20, 2013 1:14:14 PM
> *Subject:* Re: [sane-devel] New scanner Canon MF4770N Multi function
> 
> Hi Ralph,
> 
> I found a patch for different flatbed (platen) and ADF page length
> handling. I adapted this for your scanner. Your scanner supports 11" for
> flatbed (platen) and 14" for ADF.
> 
> Cheers,
> Rolf
> 
> 
> Am 20.09.2013 16:47, schrieb Rolf Bensch:
> > Hi Ralph,
> >
> > Am 20.09.2013 06:34, schrieb littlesincanada:
> >> Hi Rolf,
> >> OK, diff included for pixma-imageclass.c to git unstable.
> >>
> >> I figured out the issue with the underrun: when the printer is
> scanning
> >> with the ADF for Preview (full area scan), it auto detects the end of
> >> paper and terminates the scan earlier than the sane driver is
> expecting.
> >> It sees the end of the paper and knows to stop at that point (nothing
> >> left to scan).
> >>
> > Here the backend expects maximum paper length if you don't request a
> > smaller format from scanimage or xsane. The scanner stops scanning
> when
> > the paper went through the document feeder.
> >
> >> It cannot do this when scanning from the platen since it doesn't know
> >> where the end of the page is. Therefore, I don't get the warning when
> >> Previewing from the platen.
> >>
> > Sure, the scanner expects 11.7" paper length, but your scanner
> supports
> > only 11". Please replace the device define line with this one:
> >
> > DEV ("Canon imageCLASS MF4770n", "MF4770", MF4770_PID, 600, 640, 825,
> > PIXMA_CAP_ADF),
> >
> > This should fix this issue. Please report if this is successful. Then
> > I'll commit your patch to git.
> >
> > If you don't want to scan large documents above 11" on the document
> > feeder, I'll patch this later.
> >
> >> I couldn't really get any response from the buttons. My time with the
> >> printer is running out (I have to ship it to my daughter in Uni)
> so I'm
> >> going to have to call it a do at that.
> >>
> > You can check button support with scanimage. Please follow these items
> > for debugging:
> >
> > (1) Connect your scanner to the usb bus.
> > (2) 'export SANE_DEBUG_PIXMA=11' on the console.
> > (3) Press any button.
> > (4) 'scanimage -A' on the console.
> >
> > The response from scanimage should contain these lines:
> >
> >  Buttons:
> >--button-update
> >Update button state
> > [pixma] INTR T=1.655 len=32
> > [pixma]  :00 10 00 00 00 00 00 00  00 00 00 00 00 00 00 00
> > [pixma]  0010:00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
> > [pixma]
> >--button-1  [1] [read-only]
>  

[sane-devel] New scanner Canon MF4770N Multi function

2013-09-20 Thread Rolf Bensch
Hi Ralph,

I found a patch for different flatbed (platen) and ADF page length
handling. I adapted this for your scanner. Your scanner supports 11" for
flatbed (platen) and 14" for ADF.

Cheers,
Rolf


Am 20.09.2013 16:47, schrieb Rolf Bensch:
> Hi Ralph,
>
> Am 20.09.2013 06:34, schrieb littlesincanada:
>> Hi Rolf,
>> OK, diff included for pixma-imageclass.c to git unstable.
>>
>> I figured out the issue with the underrun: when the printer is scanning
>> with the ADF for Preview (full area scan), it auto detects the end of
>> paper and terminates the scan earlier than the sane driver is expecting.
>> It sees the end of the paper and knows to stop at that point (nothing
>> left to scan).
>>
> Here the backend expects maximum paper length if you don't request a
> smaller format from scanimage or xsane. The scanner stops scanning when
> the paper went through the document feeder.
>
>> It cannot do this when scanning from the platen since it doesn't know
>> where the end of the page is. Therefore, I don't get the warning when
>> Previewing from the platen.
>>
> Sure, the scanner expects 11.7" paper length, but your scanner supports
> only 11". Please replace the device define line with this one:
>
> DEV ("Canon imageCLASS MF4770n", "MF4770", MF4770_PID, 600, 640, 825,
> PIXMA_CAP_ADF),
>
> This should fix this issue. Please report if this is successful. Then
> I'll commit your patch to git.
>
> If you don't want to scan large documents above 11" on the document
> feeder, I'll patch this later.
>
>> I couldn't really get any response from the buttons. My time with the
>> printer is running out (I have to ship it to my daughter in Uni) so I'm
>> going to have to call it a do at that.
>>
> You can check button support with scanimage. Please follow these items
> for debugging:
>
> (1) Connect your scanner to the usb bus.
> (2) 'export SANE_DEBUG_PIXMA=11' on the console.
> (3) Press any button.
> (4) 'scanimage -A' on the console.
>
> The response from scanimage should contain these lines:
>
>   Buttons:
> --button-update
> Update button state
> [pixma] INTR T=1.655 len=32
> [pixma]  :00 10 00 00 00 00 00 00  00 00 00 00 00 00 00 00
> [pixma]  0010:00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
> [pixma]
> --button-1  [1] [read-only]
> Button 1
> --button-2  [0] [read-only]
> Button 2
> --original  [0] [read-only]
> Type of original to scan
> --target  [1] [read-only]
> Target operation type
> --scan-resolution  [0] [read-only]
> Scan resolution
>
> The [pixma] lines are from my scanner which is different from yours.
>
> (5) repeat from (3) for all other buttons.
>
> Please send me the [pixma] responses for all buttons. Then I can create
> a patch for this.
>
> If you won't get [pixma] debug lines SANE doesn't support the buttons
> from your scanner.
>
> Cheers,
> Rolf

-- next part --
--- ./pixma_imageclass.c2013-09-20 21:38:26.0 +0200
+++ ../sane-backends/backend/pixma_imageclass.c 2013-09-20 22:09:38.0 
+0200
@@ -510,6 +510,13 @@
 
   sp->depth = 8;
   sp->line_size = ALIGN_SUP (sp->w, 32) * sp->channels;
+
+  /* Some exceptions here for particular devices */
+  /* Those devices can scan up to 14" with ADF, but Letter 11" in flatbed */
+  if (sp->source == PIXMA_SOURCE_FLATBED
+  && ( s->cfg->pid == MF4770_PID ))
+sp->h = MIN (sp->h, 825 * sp->xdpi / 75);
+
   return 0;
 }
 
@@ -778,7 +785,7 @@
   DEV ("Canon imageCLASS MF4410", "MF4410", MF4410_PID, 600, 640, 877, 
PIXMA_CAP_ADF),
   DEV ("Canon i-SENSYS MF4550d", "MF4550", MF4550_PID, 600, 640, 877, 
PIXMA_CAP_ADF),
   DEV ("Canon i-SENSYS MF3010", "MF3010", MF3010_PID, 600, 640, 877, 0),
-  DEV ("Canon imageCLASS MF4770n", "MF4770", MF4770_PID, 600, 640, 825, 
PIXMA_CAP_ADF),
+  DEV ("Canon imageCLASS MF4770n", "MF4770", MF4770_PID, 600, 640, 1050, 
PIXMA_CAP_ADF),
   /* FIXME: the following capabilities all need updating/verifying */
   DEV ("Canon imageCLASS MF5630", "MF5630", MF5630_PID, 600, 640, 877, 
PIXMA_CAP_ADF),
   DEV ("Canon laserBase MF5650", "MF5650", MF5650_PID, 600, 640, 877, 
PIXMA_CAP_ADF),


[sane-devel] New scanner Canon MF4770N Multi function

2013-09-20 Thread Rolf Bensch
Hi Ralph,

Am 20.09.2013 06:34, schrieb littlesincanada:
> Hi Rolf,
> OK, diff included for pixma-imageclass.c to git unstable.
> 
> I figured out the issue with the underrun: when the printer is scanning
> with the ADF for Preview (full area scan), it auto detects the end of
> paper and terminates the scan earlier than the sane driver is expecting.
> It sees the end of the paper and knows to stop at that point (nothing
> left to scan).
> 

Here the backend expects maximum paper length if you don't request a
smaller format from scanimage or xsane. The scanner stops scanning when
the paper went through the document feeder.

> It cannot do this when scanning from the platen since it doesn't know
> where the end of the page is. Therefore, I don't get the warning when
> Previewing from the platen.
> 

Sure, the scanner expects 11.7" paper length, but your scanner supports
only 11". Please replace the device define line with this one:

DEV ("Canon imageCLASS MF4770n", "MF4770", MF4770_PID, 600, 640, 825,
PIXMA_CAP_ADF),

This should fix this issue. Please report if this is successful. Then
I'll commit your patch to git.

If you don't want to scan large documents above 11" on the document
feeder, I'll patch this later.

> I couldn't really get any response from the buttons. My time with the
> printer is running out (I have to ship it to my daughter in Uni) so I'm
> going to have to call it a do at that.
> 

You can check button support with scanimage. Please follow these items
for debugging:

(1) Connect your scanner to the usb bus.
(2) 'export SANE_DEBUG_PIXMA=11' on the console.
(3) Press any button.
(4) 'scanimage -A' on the console.

The response from scanimage should contain these lines:

  Buttons:
--button-update
Update button state
[pixma] INTR T=1.655 len=32
[pixma]  :00 10 00 00 00 00 00 00  00 00 00 00 00 00 00 00
[pixma]  0010:00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
[pixma]
--button-1  [1] [read-only]
Button 1
--button-2  [0] [read-only]
Button 2
--original  [0] [read-only]
Type of original to scan
--target  [1] [read-only]
Target operation type
--scan-resolution  [0] [read-only]
Scan resolution

The [pixma] lines are from my scanner which is different from yours.

(5) repeat from (3) for all other buttons.

Please send me the [pixma] responses for all buttons. Then I can create
a patch for this.

If you won't get [pixma] debug lines SANE doesn't support the buttons
from your scanner.

Cheers,
Rolf



[sane-devel] New scanner Canon MF4770N Multi function

2013-09-19 Thread Rolf Bensch
Hi Ralph,

Many thanks for your help adding a new scanner to SANE.

It seems that you're using the sources from the stable version. Please
use the daily git snapshot from here:
http://www.sane-project.org/snapshots/ or use git as described here:
http://www.sane-project.org/README.linux. I already fixed the '0x10
paper in ADF' issue before. Maybe the underrun issue has also been fixed
before.

Please check SANE version with 'scanimage -V'. This should report:
scanimage (sane-backends) 1.0.24git; backend version 1.0.24.

For debugging you can activate debug messages on the console with
'export SANE_DEBUG_PIXMA=4'. If you want to see the USB protocols use
'export SANE_DEBUG_PIXMA=11' or 'export SANE_DEBUG_PIXMA=21'. Then start
xsane or scanimage from the console.

Please read the pixma manpage (man sane-pixma) for more infos.

You can send your patch file to the ml or direct to my email address.
Then I can commit it to git.

Cheers,
Rolf



Am 19.09.2013 08:10, schrieb littlesincanada:
> Hi,
> OK further to this I have managed to get the ADF working.
> Can someone who knows about Canon pixma printers give me a little
> assistance?
>
> Firstly, the ADF:
> In pixma_imageclass.c
>
> I had to modify the has_paper() function to:
>
> static int
> has_paper (pixma_t * s)
> {
>   iclass_t *mf = (iclass_t *) s->subdriver;
>   return ((mf->current_status[1] == 0) ||
>  ((mf->current_status[1] == 0x10) && (s->cfg->pid ==
> MF4770_PID)));
> }
>
> The paper in the status byte alternates between 0x10 for "Paper in
> ADF" and 0x01 for (No paper in ADF). This is quite a bit different to
> the other printers which are looking for 0 when there is paper. Anyone
> know why this might be?
>
> Secondly, there seems to be a mismatch in the expected image size and
> that received:
>
> [pixma] WARNING:image size mismatches
> [pixma] 1683840 expected (877 lines) but 1614720 received (841 lines)
> [pixma] pixma_read_image(): completed (underrun detected)
>
> I'm also getting some of these:
>
> [pixma] *sane_read* Warning: padding may cause incomplete scan
> results
>
> I'm guessing there is a geometry calculation problem somewhere.
>
> The scan received looks fine so it is obviously overcoming whatever
> difficulty is being detected, however I would like to fix this.
> Any help with how I might resolve this?
>
> Cheers,
> Ralph
>
>
>
>  Original Message 
> Subject: New scanner Canon MF4770N Multi function
> Date: Mon, 16 Sep 2013 23:11:00 -0700
> From: littlesincanada 
> To: sane-devel at lists.alioth.debian.org
>
>
>
> Hi,
> I got one of these (Canon MF4770N) and managed to get it to pretty much
> work with the MF4410 driver.
> I rebuilt the pixma backend and substituted the 4770N pid (04A9-2774)
> and I can get scanning *mostly* working.
>
> 1) Preview/scan in 75/150/300/600 dpi works fine in both colour and b/w.
> I do rarely get an error on the printer and I have to switch it on and
> off again. This might be a timing issue I guess.
> Cancelling scans works OK.
>
> 2) xsane will not print using the ADF. xsane generates an error and
> reckons that there is nothing in the ADF.
>
> So, looking for a bit of advice. What can I do to track this down? In
> particular, I would like to get the ADF working.
>
> Cheers,
> Ralph
>
>
>
>
>




[sane-devel] Canon Pixma MP230

2013-09-11 Thread Rolf Bensch
Hi Marc,

Please follow the installation description in README.Linux from here:
http://www.sane-project.org/README.linux. Then you'll get latest SANE
code 1.0.24 which supports MP230.

Cheers,
Rolf


Am 11.09.2013 20:42, schrieb Marc Mar?:
> I forgot about the udev rules. I can't find the file in the original
> source, so I suppose is automatically generated somewhere. In any case,
> I only added this lines in libsane.rules:
> # Canon PIXMA MP230
> ATTRS{idVendor}=="04a9", ATTRS{idProduct}=="175f", MODE="0664",
> GROUP="scanner", ENV{libsane_matched}="yes"
> 
> 
> 2013/9/11 Marc Mar? <5.markmb.5 at gmail.com <mailto:5.markmb.5 at gmail.com>>
> 
> I can scan properly with all resolutions (75, 150, 300 and 600). If,
> while scanning I press the "cancel" button, it cancels properly in
> xsane. The data related to buttons with scanimage -A is (there's
> info about Scan Mode, Geometry, Gamma and Extras too):
> Buttons:
> --button-update
> Update button state
> --button-1  [0]
> Button 1
> --button-2  [0]
> Button 2
> 
> With debug mode 11, there's no extra information.
> 
>     I think that the diff format is the one that I attach.
> 
> Anything else you need, about commands or testing or something, tell me.
> 
> 
> 2013/9/11 Rolf Bensch  <mailto:rolf at bensch-online.de>>
> 
> Hi Marc,
> 
> Please test all scan options with all resolutions first. I
> assume that
> SANE can only support up to 600 dpi.
> 
> Also test button support. Press any button and send a status
> request to
> the scanner: 'scanimage -A'. The response should contain
> something like
> this:
> 
>   Buttons:
> --button-update
> Update button state
> --button-1  [0] [read-only]
> Button 1
> --button-2  [1] [read-only]
> Button 2
> --original  [0] [read-only]
> Type of original to scan
> --target  [5] [read-only]
> Target operation type
> --scan-resolution  [0] [read-only]
> Scan resolution
> 
> If no data will be shown, please enable debut output with: 'export
> SANE_DEBUG_PIXMA=11'. Then look for these lines:
> 
>   Buttons:
> --button-update
> Update button state
> [pixma] INTR T=1.663 len=32
> [pixma]  :00 20 00 00 00 00 00 00  00 00 00 00 00 00 00 00
> [pixma]  0010:00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
> [pixma]
> 
> (Shown data is from my scanner and may be different from your
> scanner's
> data.)
> 
> The received data is processed in function handle_interrupt(). For
> details please read the comments in the code and 'man
> sane-pixma'. If
> you'll have problems with this, you can also send the responses
> for all
> buttons to the mailing list. Then I can create the patch.
> 
> Then you can send the diff file to the mailing list. I'll commit
> it to
> SANE git.
> 
> Cheers,
> Rolf
> 
> 
> Am 10.09.2013 23:57, schrieb Marc Mar?:
> > The root problem is solved. I didn't put the scanner on udev
> rules.
> >
> > So now, how should I proceed to insert this scanner in sane
> scanner
> > database? What tests should I perform, how should I add it to
> the global
> > scanner list, etc. I'd like to contribute with this very small
> patch.
> >
> >
> > 2013/9/10 Marc Mar? <5.markmb.5 at gmail.com
> <mailto:5.markmb.5 at gmail.com> <mailto:5.markmb.5 at gmail.com
> <mailto:5.markmb.5 at gmail.com>>>
> >
> > It works!!
> >
> > I just compiled and installed, and it seems to work, but
> only on
> > root mode:
>     > sudo xsane -> works, detects and seems to scan properly
> > xsane -> [pixma] pixma_open(): Canon PIXMA MP230
> >   [pixma] pixma_connect() failed EACCES
> >   [pixma] pixma_open() failed EACCES
> >   [pixma] pixma_close(): Canon PIXMA MP230
> 

[sane-devel] Canon Pixma MP230

2013-09-11 Thread Rolf Bensch
Hi Marc,

Please test all scan options with all resolutions first. I assume that
SANE can only support up to 600 dpi.

Also test button support. Press any button and send a status request to
the scanner: 'scanimage -A'. The response should contain something like
this:

  Buttons:
--button-update
Update button state
--button-1  [0] [read-only]
Button 1
--button-2  [1] [read-only]
Button 2
--original  [0] [read-only]
Type of original to scan
--target  [5] [read-only]
Target operation type
--scan-resolution  [0] [read-only]
Scan resolution

If no data will be shown, please enable debut output with: 'export
SANE_DEBUG_PIXMA=11'. Then look for these lines:

  Buttons:
--button-update
Update button state
[pixma] INTR T=1.663 len=32
[pixma]  :00 20 00 00 00 00 00 00  00 00 00 00 00 00 00 00
[pixma]  0010:00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
[pixma]

(Shown data is from my scanner and may be different from your scanner's
data.)

The received data is processed in function handle_interrupt(). For
details please read the comments in the code and 'man sane-pixma'. If
you'll have problems with this, you can also send the responses for all
buttons to the mailing list. Then I can create the patch.

Then you can send the diff file to the mailing list. I'll commit it to
SANE git.

Cheers,
Rolf


Am 10.09.2013 23:57, schrieb Marc Mar?:
> The root problem is solved. I didn't put the scanner on udev rules.
> 
> So now, how should I proceed to insert this scanner in sane scanner
> database? What tests should I perform, how should I add it to the global
> scanner list, etc. I'd like to contribute with this very small patch.
> 
> 
> 2013/9/10 Marc Mar? <5.markmb.5 at gmail.com <mailto:5.markmb.5 at gmail.com>>
> 
> It works!!
> 
> I just compiled and installed, and it seems to work, but only on
> root mode:
> sudo xsane -> works, detects and seems to scan properly
> xsane -> [pixma] pixma_open(): Canon PIXMA MP230
>   [pixma] pixma_connect() failed EACCES
>   [pixma] pixma_open() failed EACCES
>   [pixma] pixma_close(): Canon PIXMA MP230
> 
> Do you have any idea of misconfiguration of my part, or I only found
> a half solution?
> 
> 
> 
> 2013/9/10 Rolf Bensch  <mailto:rolf at bensch-online.de>>
> 
> Hi Marc,
> 
> You need to compile and install SANE if you change something in
> the code. The installation is described in README.linux, which
> comes with the code or read here:
> http://www.sane-project.org/README.linux.
> 
> Additional to the install description you need to add your
> scanner to the udev.rules file.
> 
> You don't need to set PIXMA_EXPERIMENT=1.
> 
> If you want to see the debug output you need to set 'export
> SANE_DEBUG_PIXMA=4' and start xsane from the command line.
> 'export SANE_DEBUG_PIXMA=11' is useful if you want to see the
> usb protocols.
> 
> Don't hestitate to contact me if you have any problems.
> 
> Cheers,
> Rolf
> 
> 
> Am 09.09.2013 23:15, schrieb Marc Mar?:
>> I looked at the code, and I found the MP250 definitions. I
>> copied those lines, and changed the product_id to MP230, with
>> everything the same. Now, is there a way to generate the
>> libraries without downloading and compiling everything? I
>> suppose that, generating and replacing this files
>> /usr/lib/x86_64-linux-gnu/sane/{libsane-pixma.la
>> <http://libsane-pixma.la>,libsane-pixma.so.1,libsane-pixma.so.1.0.22}
>> should be enough to test the compatibility between 250 and 230?
>>
>> Help me a bit! I'm not new to code and Linux, but I'm new to
>> big Linux open-source codes.
>>
>> Thank you in advance
>>
>>
>> 2013/9/9 Marc Mar? <5.markmb.5 at gmail.com
>> <mailto:5.markmb.5 at gmail.com>>
>>
>> Hello everyone
>>
>> I just bought a Canon Pixma MP230. Unfortunately, there is
>> no good support. I tried the native drivers, and it
>> printed properly but not scanned. So I looked for other
>> solutions.
>>
>> I found that the MP250 driver is compatible for the MP230.
>> I removed the propietary drivers, and I tried configuring
>> CUPS with that driver. And it worked. Now, I

[sane-devel] Canon Pixma MP230

2013-09-10 Thread Rolf Bensch
Hi Marc,

You need to compile and install SANE if you change something in the
code. The installation is described in README.linux, which comes with
the code or read here: http://www.sane-project.org/README.linux.

Additional to the install description you need to add your scanner to
the udev.rules file.

You don't need to set PIXMA_EXPERIMENT=1.

If you want to see the debug output you need to set 'export
SANE_DEBUG_PIXMA=4' and start xsane from the command line. 'export
SANE_DEBUG_PIXMA=11' is useful if you want to see the usb protocols.

Don't hestitate to contact me if you have any problems.

Cheers,
Rolf


Am 09.09.2013 23:15, schrieb Marc Mar?:
> I looked at the code, and I found the MP250 definitions. I copied
> those lines, and changed the product_id to MP230, with everything the
> same. Now, is there a way to generate the libraries without
> downloading and compiling everything? I suppose that, generating and
> replacing this files /usr/lib/x86_64-linux-gnu/sane/{libsane-pixma.la
> ,libsane-pixma.so.1,libsane-pixma.so.1.0.22}
> should be enough to test the compatibility between 250 and 230?
>
> Help me a bit! I'm not new to code and Linux, but I'm new to big Linux
> open-source codes.
>
> Thank you in advance
>
>
> 2013/9/9 Marc Mar? <5.markmb.5 at gmail.com >
>
> Hello everyone
>
> I just bought a Canon Pixma MP230. Unfortunately, there is no good
> support. I tried the native drivers, and it printed properly but
> not scanned. So I looked for other solutions.
>
> I found that the MP250 driver is compatible for the MP230. I
> removed the propietary drivers, and I tried configuring CUPS with
> that driver. And it worked. Now, I'm wondering how can I force to
> load the MP250 driver.
>
> So, my question is: how can I force loading the MP250 driver for
> using with MP250 in sane?
>
> I have Crunchbang Waldorf (based on Debian 7), kernel 3.2.0-4 and
> 64 bits. I enabled the debug mode with SANE_DEBUG_PIXMA=11 and
> PIXMA_EXPERIMENT=1, and I use xsane 0.996
>
> Thank you in advance
>
>

-- next part --
An HTML attachment was scrubbed...
URL: 



[sane-devel] canoscan 9000f mark ii

2013-09-03 Thread Rolf Bensch
Hi Norayr,


Am 02.09.2013 14:17, schrieb Norayr Chilingarian:
>
> Hello,
>
> I need a scanner which can scan film (35 and 120) and has a free driver.
> I need it because I'd like to scan on x86, powerpc and arm
> architectures, I need to not depend on operating system version, I
> need driver continue to work with latest glibc.
>

You can compile SANE for every Linux platform from source.

> As far as I understand, the canoscan 9000f and 9000f mark ii is
> supported completely.
> http://www.sane-project.org/lists/sane-mfgs-cvs.html
>

Yes. Except for dust and scratch removal infrared channel is scanned as
separate image yet. You need to process this by external programs. This
issue affects all SANE backends with ir support.

> As I have read at the pixma driver page, it seems, the source is open
> and redistributable. So it fits my needs.
>
> Just to make sure, did I get it right?
> Is the pixma free software?

Yes, it is.

   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.

(from header of pixma_common.c).

> Is it usually included in GNU/Linux distributions?
>

We cannot say what software / driver the distros will include in future,
but today it should be.

> Will it work on later versions of operating systems? It's not binary
> only, right? So it should work?
>

You can download only source code from the SANE website. Binaries /
Packages are provided from the distros.

> Or you may suggest other photo film scanner which has the free driver.
>

If the hardware fits your needs, the Pixma backend is well supported. I
myself own a CS9000F and can debug any problem with SANE.

Cheers,
Rolf



[sane-devel] sane problems on Ubuntu 12.04

2013-09-02 Thread Rolf Bensch
Hi Pjotr,

For your CS9000F Mark II you need the developer version from SANE.

Please install SANE again as described in README.linux.

Please also check 'scanimage -V' and 'scanimage -A'.

If you still have problems please provide debug output messages enabled
with 'export SANE_DEBUG_PIXMA=4'.

Cheers,
Rolf


Am 31.08.2013 21:18, schrieb Pjotr LePetit:
>
> Hi.
>
>  
>
> I am trying to get CanoScan 9000F to work with sane on Kubuntu. It
> does not work out of the box as it is supposed to, so I have compiled
> and tried sane-backends-1.0.23,  sane-backends-1.0.24 and the
> developmentr version sane-backends-543393d: 
>
> $ sudo make uninstall
>
> $ ./configure BACKENDS="pixma" 
>
> $ make
>
> $ sudo make install
>
> In etc/udev/rules.d/10-local.rules: ATTRS{idVendor}=="04a9",
> ATTRS{idProduct}=="190d", MODE="0664", GROUP="scanner",
> ENV{libsane_matched}="yes"
>
> Some info:
>
> $ uname 
>
> Linux fourier 3.2.0-52-generic #78-Ubuntu SMP Fri Jul 26 16:21:44 UTC
> 2013 x86_64 x86_64 x86_64 GNU/Linux
>
> $ sudo scanimage -L
>
> $ device `pixma:04A9190D' is a CANON Canoscan 9000F Mark II
> multi-function peripheral
>
> $ sudo scanimage > out.ps
>
> $ scanimage: sane_read: Error during device I/O
>
> I get this response both with 1.0.24 and the dev version. 1.0.24 gives
> no output. 
>
>  
>
> Any idea what to try next? 
>
> Pjotr.
>
>  
>

-- next part --
An HTML attachment was scrubbed...
URL: 



[sane-devel] [sane-pixma] Canon MF4150 v. PIXMA_CAP_LINEART

2013-08-28 Thread Rolf Bensch
Hi Samuel,

Am 27.08.2013 13:05, schrieb Samuel Adam:
> clang had spit out a few warnings on pixma_imageclass.c; such were
> simple format string issues which seemed on a relevant codepath, and
> are fixed in the attached patch.  My trivial tweak did not fix the
> segfault (although uint64_t is indeed wider than %u on my machine).
> pixma_imageclass.c now compiles without warnings.

Many thanks for your patch.


Am 28.08.2013 08:55, schrieb Samuel Adam:
> Skimming the code, I am about 80% certain that:
> 
> (1) It is dying between these two points in the codepath:
> 
> (a) pixma_imageclass.c: iclass_check_param()
> (b) pixma.c: start_reader_task()
> 
> (Viz.:  Successfully completes the former; segfaults at an undetermined
> point before reaching or completing the latter.)
> 
> (2) Up to that point, the *only* substantive changes induced by the
> patch are alterations to the values of various data structures.
> 
> ===> Therefore:  Is there anything which jumps out to those familiar
> with the code between point (a) and point (b) which would or could choke
> upon a change in the size, shape, or contents of pixma_scan_param_t
> structure?  (There is one other blackmagic blob of bit-stuffing changed
> before that.  The change is only effective if the "--mode" is set to
> "Lineart", however; whereas the segfault occurs regardless.)
>

The segfault is produced inside iclass_check_param(). You can see in the
log that the segfault happens somewhere between the log output lines
"PDBG (pixma_dbg (4, "*iclass_check_param* Initially: ... ));"
and
"PDBG (pixma_dbg (4, "*iclass_check_param* Finally: ... ));"


The attached patch should fix this item.

Some background info how lineart scan is working (if you like to debug
this by yourself):
(1) The frontend requests a lineart scan with 1 bit per pixel.
(2) The backend scans a grayscale image with 8 bits per pixel.
(3) The backend converts 8 bits per pixel to 1 bit per pixel for each
single line.

If you need debug infos you only have to insert "PDBG (pixma_dbg (4, ...
));" with the needed data to the code.

If the code is still buggy, please send a log file offlist again.

Cheers,
Rolf


-- next part --
--- ./pixma_imageclass.c2013-08-28 21:57:59.0 +0200
+++ ../sane-backends/backend/pixma_imageclass.c 2013-08-28 21:58:03.0 
+0200
@@ -505,7 +505,7 @@
 
   sp->depth = 8;
   sp->software_lineart = 0;
-  if (sp->param->mode == PIXMA_SCAN_MODE_LINEART)
+  if (sp->mode == PIXMA_SCAN_MODE_LINEART)
   {
 sp->software_lineart = 1;
 sp->channels = 1;


[sane-devel] Canon 9000F with Ubuntu 12.04

2013-08-24 Thread Rolf Bensch
Hi Al,

Am 23.08.2013 17:47, schrieb ?l ??gn?r:
> Am Fr, 23 Aug 2013 17:17:33 CEST schrieb ?l ??gn?r:
>
>> With a fresh install of Xubuntu 12.04 I use
>>
>> sane 1.0.14-9
>> sane-utils 1.0.22-7ubuntu1
>>
>> As user root:
>>
>> ~# /usr/bin/sane-find-scanner
>> found USB scanner (vendor=04a9 [Canon], product=0x1908 [CanoScan])
>> at libusb:008:002
>>
>> ~# /usr/bin/scanimage  -L
>> No scanners were identified.
>>
>> ~# /usr/bin/scanimage  -V
>> scanimage (sane-backends) 1.0.22; backend version 1.0.22
>>
>> Should the Canon 9000F be supported by this sane-version or do I have
>> to compile it myself?
> In the meantime I compiled git and there is no change:
>
> usr/local/bin/sane-find-scanner 
> found USB scanner (vendor=04a9 [Canon], product=0x1908 [CanoScan]) at
> libusb:008:002
>
> /usr/local/bin/scanimage -V
> scanimage (sane-backends) 1.0.24git; backend version 1.0.22

Here you can see that the old SANE backend version 1.0.22 is used. You
need to register new SANE backend (library) as described in README.linux.

> /usr/local/bin/scanimage -L
> No scanners were identified.
>
> Maybe the old thing, that it suddenly works after hours or days without
> doing anything. I know, that this has been discussed before and I have
> no idea who can change this behaviour, but this should get better.
>
>

If you only need the latest git version and you don't want to patch any
code by yourself, you can use my Ubuntu ppa from Launchpad: 'sudo
add-apt-repository ppa:rolfbensch/sane-git'.

Cheers,
Rolf



[sane-devel] [sane-pixma] Canon MF4150 v. PIXMA_CAP_LINEART

2013-08-21 Thread Rolf Bensch
Hi Samuel,

I prepared a quick patch to implement lineart for imageclass scanners.

To use this patch you must install SANE from git, as described here:
http://www.sane-project.org/README.linux

and

patch pixma_imageclass.c with the attached file ('patch
pixma_imageclass.c pixma_imageclass.c.diff1').

If you only need the Pixma backend you can reduce compiling time with
'./configure BACKENDS=pixma'.

The patch can be buggy. If so, I need all debug output from scanimage
enabled with 'export SANE_DEBUG_PIXMA=4'.

Cheers,
Rolf


Am 20.08.2013 15:36, schrieb Samuel Adam:
> I know experientially that the Canon imageCLASS MF4150 is possessed of
> a 1-bpp lineart mode.  Pages fly through the automatic feeder, and
> text is accorded an OCR-friendly crispiness lacking in the greyscale
> mode.  The Canon-provided Windows-only software provides two modes it
> respectively terms "Black and White" (not too good) and "Black and
> White Text" (much better).[1]  I do not currently have a Windows
> machine available, and I need to make some scans *yesterday*.
>
> sane-pixma permits only --mode Color or --mode Gray with the MF4150,
> and `scanimage -A` shows only these options.
>
> What would happen if I simply ORed in PIXMA_CAP_LINEART at the
> appropriate line in pixma_imageclass.c?
>
> -   DEV ("Canon imageCLASS MF4150", "MF4100", MF4100_PID, 600, 640,
> 877, PIXMA_CAP_ADF),
> +   DEV ("Canon imageCLASS MF4150", "MF4100", MF4100_PID, 600, 640,
> 877, PIXMA_CAP_ADF | PIXMA_CAP_LINEART),
>
> I expect this would lead to Bad Things, what with all the moving parts
> I skimmed past.  But is any other way to make it work right quickly?
>
> Sorry to return ENOTIME on the project to actually familiarize myself
> with sane-pixma code, beyond a simple grep.  And thanks to the folks
> who reverse-engineered the Canon protocols, so I can use scanner at all.
>
> Samuel Adam
>
>
> [1] The idiot-friendly software has a checkbox captioned "Show Scanner
> Driver".  Check it, and options galore do arise.
>
>
>

-- next part --
--- ./pixma_imageclass.c2013-08-21 21:58:41.0 +0200
+++ ../sane-backends/backend/pixma_imageclass.c 2013-08-21 21:58:46.0 
+0200
@@ -247,7 +247,7 @@
   pixma_set_be32 (mf->raw_width, data + 0x10);
   pixma_set_be32 (s->param->h, data + 0x14);
   data[0x18] = (s->param->channels == 1) ? 0x04 : 0x08;
-  data[0x19] = s->param->channels * s->param->depth;   /* bits per pixel */
+  data[0x19] = s->param->channels * ((s->param->software_lineart) ? 8 : 
s->param->depth);  /* bits per pixel */
   data[0x1f] = 0x7f;
   data[0x20] = 0xff;
   data[0x23] = 0x81;
@@ -499,8 +499,36 @@
 {
   UNUSED (s);
 
+  PDBG (pixma_dbg (4, "*iclass_check_param* Initially: channels=%u, 
depth=%u, x=%u, y=%u, w=%u, line_size=%u , h=%u*\n",
+   sp->channels, sp->depth, sp->x, sp->y, sp->w, 
sp->line_size, sp->h));
+
   sp->depth = 8;
+  sp->software_lineart = 0;
+  if (s->param->mode == PIXMA_SCAN_MODE_LINEART)
+  {
+sp->software_lineart = 1;
+sp->channels = 1;
+sp->depth = 1;
+  }
+
+  /* for software lineart w must be a multiple of 8 */
+  if (sp->software_lineart == 1 && sp->w % 8)
+  {
+unsigned w_max;
+
+sp->w += 8 - (sp->w % 8);
+
+/* do not exceed the scanner capability */
+w_max = s->cfg->width * s->cfg->xdpi / 75;
+w_max -= w_max % 8;
+if (sp->w > w_max)
+  sp->w = w_max;
+  }
   sp->line_size = ALIGN_SUP (sp->w, 32) * sp->channels;
+
+  PDBG (pixma_dbg (4, "*iclass_check_param* Finally: channels=%u, 
depth=%u, x=%u, y=%u, w=%u, line_size=%u , h=%u*\n",
+   sp->channels, sp->depth, sp->x, sp->y, sp->w, 
sp->line_size, sp->h));
+
   return 0;
 }
 
@@ -634,7 +662,23 @@
   n = mf->blk_len / s->param->line_size;
   if (n != 0)
 {
-  if (s->param->channels != 1 &&
+  PDBG (pixma_dbg (4, "*iclass_fill_buffer* Processing with n=%u, 
w=%i, line_size=%u, raw_width=%u * \n",
+   n, s->param->w, s->param->line_size, 
mf->raw_width));
+
+  /* gray to lineart convert */
+  if (s->param->mode == PIXMA_SCAN_MODE_LINEART)
+  {
+int i;
+uint8_t *sptr, *dptr;
+
+sptr = mf->blkptr;
+dptr = mf->lineptr;
+
+/* process ALL lines */
+for (i = 0; i < n; i++, sptr += s->param->line_size, dptr += 
(s->param->line_size / 8))
+  pixma_binarize_line (s->param, dptr, sptr, s->param->line_size, 
1);
+  }
+  else if (s->param->channels != 1 &&
   s->cfg->pid != MF3010_PID &&
   s->cfg->pid != MF4410_PID &&
  s->cfg->pid != MF4550_PID &&
@@ -752,6 +796,7 @@
 0, 0, /* adftpu_min_dpi & adftpu_max_dpi not 
used in this subdriver */ \
 0, 0, /* tpuir_min_dpi & tpuir_max_dpi not 
used in this subdriver */   \
 w, h,   

[sane-devel] pthread support

2013-08-09 Thread Rolf Bensch
Hi List,

Why is pthread disabled by default for Linux?

I'm just busy implementing SANE_STATUS_NO_DOCS for sane_read() in the
Pixma backend.

By default sane_start() forks a child process which handles the scan
procedure. So there is no chance for sane_read() to fetch the device
status without additional overhead for shared memory, pipes, etc.  With
enabled pthread sane_read() can fetch the device status.

Many thanks for your help in advance.

Cheers,
Rolf



[sane-devel] Canon pixma mg3120

2013-07-30 Thread Rolf Bensch
Hi Stephen,

Your scanner is supported from the SANE git version.

You can install latest git version as described here:
http://www.sane-project.org/README.linux.

If you are using Ubuntu, you can install the latest git version from
launchpad: ppa:rolfbensch/sane-git.

Cheers,
Rolf




Am 29.07.2013 17:41, schrieb Stephen Bond:
> I volunteer as a tester. Pls provide latest driver. Link from website appears 
> to go to an old copy.
> Thank you
> Stephen 
>
>
>
> Forwarded Message
> From: sane-devel-request at lists.alioth.debian.org
> To: stephen.cbond at yahoo.com
> Sent: Mon, Jul 29, 2013 4:45 AM PDT
> Subject: Welcome to the "sane-devel" mailing list
> :
>
>  
>
>  
>
>




[sane-devel] Canon Pixma MG8250 - color scan, vertical misalignment

2013-07-30 Thread Rolf Bensch
Hi Per,

Recently I committed a fix for this scanner.

You need to install latest SANE version from git as desribed here:
http://www.sane-project.org/README.linux.

Cheers,
Rolf




Am 30.07.2013 10:43, schrieb Per Andersson:
> I use a Canon Pixma MG8250 as home printer and scanner for my Gentoo
> Linux system. I never got the printer to work correctly via USB using
> only CUPS+Gutenprint drivers (no Canon proprietary software), so I
> switched to connecting the device via Ethernet to my router (lpd
> protocol). This works very well.
>
> The scanner device (pixma) is detected by sane and I can read images
> using scanimage.
>
> When scanning color images in higher resolutions (>75 dpi) the colors
> are misaligned in the output file, only in the vertical direction. I
> found a bug report of a similar issue (concerning another Canon Pixma
> model) here:
> https://alioth.debian.org/tracker/index.php?func=detail&aid=312022&group_id=30186&atid=410366
>
>
> This seems to throw some light on the problem, but I don't dare open
> the source files and hack them myself...
>
> Per G. Andersson
>




[sane-devel] Problems with MX712 via Network

2013-07-18 Thread Rolf Bensch
Hi Greg,

I know about the paper empty bug and I'm struggling to forward the paper
empty (or finish scan) status to the frontend (scanimage) for multi page
scan jobs. If I won't find a solution soon, I'll ask the mailing list
with a more detailed description.

On the other hand please test all scan resolutions. I guess that your
scanner is working fine for resoltions <= 600 dpi and will produce
double and/or quad images above 600 dpi. If so I can provide a patch.

Cheers,
Rolf


Am 17.07.2013 22:30, schrieb warnes:
> Hi Louis,
>
> I've connected via the USB, and the problem persists when scanning
> using the ADF.  It looks like the driver isn't recognizing when the
> last page has been scanned, and keeps waiting for data (see logs
> attached, one for simple-scan and one for scanimage), eventually
> timing out after 8+7+6+5+4+3+2+1=36 seconds.
>
> Once the ADF scan has timed-out waiting for a new page, all future
> scan requests fail (see scanimage-T.log), eventually timing out.
>
> Disconnecting and reconnecting the USB cable, as recommended by the
> log message, resolves the problem (on USB)
>
> -Greg
>
> *scanimage-T.log* (3K) Download Attachment
> 
> *scanimage.batch.log* (4K) Download Attachment
> 
> *simple-scan-batch.log* (7K) Download Attachment
> 
>
> 
> View this message in context: Re: Problems with MX712 via Network
> 
> Sent from the SANE - Dev mailing list archive
>  at Nabble.com.

-- next part --
An HTML attachment was scrubbed...
URL: 



[sane-devel] genesys backend update

2013-07-18 Thread Rolf Bensch
Hi Albert,

Please be patient 'til tomorrow. My ppa uses the daily git snapshot file
from the sane website. Stef's commits will be available with the next
snapshot.

Cheers,
Rolf

Am 18.07.2013 10:20, schrieb Albert ARIBAUD:
> Le 18/07/2013 08:50, Stef a ?crit :
>>  Hello,
>>
>>  thanks for an hardware donation from Dany Qumsieh, I have been able
>> to work on better support for the LiDE 210. I have improved scanning
>> speed at resolution below 600 (saving about 8s), and in the process
>> improved darkness issue with this scanner (#313886).
>>  Incorrect gray scans geometry has also been fixed. However, since
>> the motor of the LiDE 100 and 210 can't work at very low resolution, the
>> gray scans show some "staircase effect" due to the fact that scan is
>> done at a higher resolution, and lines discarded to match the real
>> target. I hope to alleviate this by enabling true gray on these sensors.
>>
>> Regards,
>>  Stef
>
> Thanks a lot, Stef!
>
> Darkness is the essential reason I don't use my 210 with Sane right
> now, so it's great to know the situation has improved, and I would
> love to see how much it has.
>
> I see your changes are in the git repo, but is there a package
> available somewhere? I've found
> , but even though
> it packages daily snapshots, it is not daily itself, and it currently
> doesn't contain your changes.
>
> Amicalement,




[sane-devel] Canon Pixma MX892 "Testers needed!"

2013-07-13 Thread Rolf Bensch
Hi,

MX892 is fully supported by the git version of SANE:
http://www.sane-project.org/lists/sane-backends-cvs.html#S-PIXMA.

If you are using Ubuntu, you can install the latest git version from
launchpad: ppa:rolfbensch/sane-git.

Otherwise you need to install SANE from git as described here:
http://www.sane-project.org/README.linux.

This mailing list is the right place to post any question about your
scanner.

A bug tracker is available here:
https://alioth.debian.org/tracker/?atid=410366&group_id=30186&func=browse.

Many thanks for your report.

Cheers,
Rolf


Am 12.07.2013 15:15, schrieb stonefoz at myfastmail.com:
> Canon Pixma mx892.
>
> It is listed as "Testers needed!" on 
> "http://www.sane-project.org/sane-mfgs.html#Z-CANON"; for the MX890 series.  
>
> I got one, it's been tested. Using "PIXMA_EXPERIMENT=1" on 
> SANE-Backends-1.0.23 it successfully scans at 300 dpi and 600 dpi. Higher 
> resolution segfaults and I would like to know where is the most appropriate 
> place to post them, if they could be helpful.
>
> Either way, I was surprised to find that it is usable already. Let me if I 
> could be helpful.
>
>




[sane-devel] Canon MG5250 report: SUCCESS!!!

2013-07-03 Thread Rolf Bensch
Hi Dimitri,

Many thanks for your report.

I just updated scanners doc files in git.

Cheers,
Rolf


Am 02.07.2013 19:02, schrieb Dimitri Fellous:
> Hi!
>
> Just to let you know that my printer/scanner is working very well on
> Fedora 18 :)
> I've tried a few days ago to use my scanner on Debian wheezy, so I had
> to copy the backends file, and then it worked also very well :)
>
> Thank you!!
>
> Dimitri




[sane-devel] Dust removal inSANE ?

2013-06-25 Thread Rolf Bensch
Hi Michael,

I found this thread in the SANE mailing list archive.

I already implemented ir scan for my CS9000F (pixma backend).

Now I'm searching an open source program and/or lib for processing ir data 
against the rgb scan. Fortunately my scanner provides pure dust images without
any shadows from the negatives/slides.

Did you started with implementing your code in sanei and/or can I reuse your
code from /http://wwwuser.gwdg.de/~mrickma/sane-proscan-7200/status-110711/ 
/
and/or do you have newer code and/or can you please provide your experiences
with dust removing?

Many thanks for your help in advance.

Cheers,
Rolf




Am 11.07.2011 17:03, schrieb m. allan noah:
> Excellent description of both the problem, and the solution. I wrote
> sanei_magic to contain exactly these sort of routines. Though, you
> could also add a sanei_ir or some such, if you want a more 'private'
> playground :)
>
> allan
>
> On Mon, Jul 11, 2011 at 12:54 PM, Michael Rickmann  > wrote:
> >/ I learned from other posts in this list that SANE does not provide much
> />/ support for infrared. In sane.h some related definitions are even 
> commented
> />/ out. Only in coolscan.c I have found some RGBIfix routines by Andreas Rick
> />/ which must be related to what he describes on his page at
> />/ http://andreas.rick.free.fr/sane/dustremove.html. With my attempts to
> />/ support PIE film scanners in the pie backend I have reached a stage where 
> I
> />/ can receive R, G, B and I color planes at resolutions from 300 to 3600 dpi
> />/ at 16 bit color depth. I wish to use the infrared channel for dirt removal
> />/ without touching current SANE specifications. Essentially three things 
> have
> />/ to be done:
> />/ 1) reduce red spectral overlap from the infrared (ired) plane
> />/ 2) find the dirt
> />/ 3) replace the dirt
> />/ Everything beyond depends on the kind of film and taste. If you are
> />/ interested in quick results skip down to the last paragraphs of this post.
> />/ I rolled up my sleeves though in a different way than suggested on this 
> list
> />/ and made a small program ircleanest.c in which I tried to implement above
> />/ three steps. For trying image calculations before programming "ImageJ"
> />/ (http://rsbweb.nih.gov/ij/)  has been great help.
> />/
> />/ Ad 1) Quite often the ired image looks like a greyscale image with dirt
> />/ emphasized. Something similar was reported for the Epson V700 scanner in (
> />/ 
> http://lists.alioth.debian.org/pipermail/sane-devel/2011-February/028149.html
> />/ ). The ired plane of negative films usually only contains slight shades of
> />/ the image but slide films may show a considerable amount of it. I tried
> />/ something with gamma and linear operations what Andreas Rick describes for
> />/ the Coolscan. I could not get it to work and I do not wish to craft
> />/ parameters by hand for every slide.
> />/ When plotting the ired value of 1000 randomly chosen pixels against the 
> red
> />/ value the relation ired = b + a * ln (red) always gave a good fit. So
> />/ calculating an ired' = ired - a  * ln (red) should clean the ired plane. 
> It
> />/ works. I randomly sample 2000 pixels, calculate the parameter "a" by 
> linear
> />/ regression from the ln (red) and ired values, produce an ired' plane and
> />/ scale it between 0 and 65535. I also tried to include green and blue 
> planes
> />/ but there is a lot of calculation and no real benefit. A similar cleaning
> />/ effect one gets with the relations ired = b * red ^ a and ired' = ired / 
> red
> />/ ^ a. This comes closer Andreas Rick's suggestion of applying a gamma, and
> />/ the coefficients can also be determined by linear regression.
> />/
> />/ Ad 2) First I tried static thresholds to find the dirt. I still use two of
> />/ them, Otsu's and Yen's in M. Emre Celebi's implementation in the FOURIER 
> 0.8
> />/ project ( http://sourceforge.net/projects/fourier-ipal ). Yen's threshold 
> in
> />/ this implementation assumes a bimodal distribution and was the best of the
> />/ static thresholds I tried in detecting only dirt. I still use it to add
> />/ large dirty areas. But soon I gave up detecting smaller dirt with static
> />/ thresholding without user intervention. On my search for an adaptive
> />/ threshold I stumbled over the MAD (median of the absolute deviations from
> />/ the median) filter (Crnojevic V. (2005) "Impulse Noise Filter with 
> Adaptive
> />/ Mad-Based Threshold. Proc. of the IEEE Int. Conf. on Image Processing, 3:
> />/ 337-340). It is an understandable paper describing an algorithm of rather
> />/ low complexity. Median filtering, however, is rather slow. First,  I
> />/ replaced the first median filter step of the original paper with a maximum
> />/ filter because the dirty pixels are always darker than the real signal. 
> Then
> />/ I managed to ge

[sane-devel] canon pixma MX890 ADF empty test OK

2013-06-21 Thread Rolf Bensch
Hi Henry,

If possilble please log the usb protocols of a multi page scan on a
windows machine. Please scan a small area of approx. 5mm x 5mm @ 75 dpi
to reduce log file size.

You can use one of these programs: snoopypro, usbsnoop
(http://benoit.papillault.free.fr/usbsnoop/) or wireshark.

Then we can have a look what commands are used to perform and finish a
multi page scan process without leaving the printer in a confused state.

The ml rejects emails larger than 100 kB. Please send the log file
directly to my email address.

Cheers,
Rolf


Am 21.06.2013 00:58, schrieb Henry Ptasinski:
> The mp150_scan() function issues a scan request to the printer before
> checking the paper status, which ends up leaving the printer in a
> confused state.  So the first attempt at scanning with an empty ADF
> properly returns an error, but then the printer doesn't respond to any
> future scan attempts without rebooting.
>
> I moved the ADF empty check earlier in the function, and now can run
> scanimage numerous times with an empty ADF and the printer seems to be
> left in a sane state.
>
> Multiple page scanning with ADF simplex also seems to work fine using
> scanimage, as long as I use the -b option with the correct number of
> pages.
>
> If the ADF goes empty during a scan (i.e. less pages in ADF than
> specified with -b option), the printer stops responding at the end of
> the scan, and stays unresponsive until a reboot.
>
> One thing I noticed is that, even when the number of pages scanned
> match (actual pages in ADF vs. -b flag), abort_session() is being
> called and suspect this might be causing some trouble.  I haven't
> found where that's happening yet.  It doesn't appear to be from inside
> mp150_scan().
>
> ---
> Henry Ptasinski
> henry at logout.com
>
> On 05/24/2013 08:55 AM, Rolf Bensch wrote:
>> Hi Tim,
>>
>> seeing an "error" while adf is impty is normal behaviour.
>>
>> What's about running an adf batch scan job empty? Can you start a new
>> (single) scan job afterwards?
>>
>> Please use only usb connection while testing. On a 2nd step we can
>> switch to LAN.
>>
>> Please be patient if you'll see some errors and it may seem that we are
>> on the wrong way. We'll find a patch for this scanner.
>>
>> Cheers,
>> Rolf
>>
>> p.s. please answer with my email as cc. I'm not checking the ml digest
>> frequently.
>>
>>
>>
>> Am 22.05.2013 05:56, schrieb Tim:
>>> Canon MX892 (US model)
>>>
>>> tested:
>>> Loaded and unloaded ADF tray
>>>
>>> backend:
>>> git clone as of 16 May, no changes
>>>
>>> rerelated software:
>>> xsane 0.998
>>> cnijfilter-mx890series-3.70-1.x86_64 from canon-asia
>>> cnijfilter-common-3.70-1.x86_64 from canon-asia
>>> cups-bjnp-1.2.1-x86_64-1_SBo from slackbuilds.org
>>> 2.6.37.6c (tim at hp_lap) (gcc version 4.5.2 (GCC) ) #8 SMP
>>> Slackware 13.37, x86_64
>>>
>>> environment:
>>> SANE_DEBUG_PIXMA=11
>>>
>>> results:
>>> loaded ADF tray works as expected, empty ADF tray gives appropriate
>>> error (see attached log)
>>>
>>> Cheers,
>>
>>
>




[sane-devel] Device report: Canon MG3150

2013-06-21 Thread Rolf Bensch
Hi Torben,

Many thanks for your report.

I just updated the device description in git. For the git version you
can see the list of supported devices here:
http://www.sane-project.org/lists/sane-backends-cvs.html#S-PIXMA.

Cheers,
Rolf

Am 19.06.2013 22:19, schrieb Torben H. Nielsen:
> Hi
>
> Just wanted to say that sane git20120825 works perfectly with my Canon
> MG3150 (both usb and wifi
>
> Regards,
> Torben
>
>




[sane-devel] Button support for Canon PIXMA MG6250 and MG6350

2013-06-21 Thread Rolf Bensch
Hi,

Based on the latest git version I added a new parameter to button
support: --scan-resolution.

Please patch all files from the archive file and test button support
with 'scanimage -A'. Now you should be able to get the dpi info from
your scanner.

If you like you can also patch doc/sane-pixma.man and check if the
description of the button parameters are ok your scanner.

Please report if the patch is working. Then I can commit this into git.

Many thanks for your help,
Rolf


Am 25.03.2013 10:35, schrieb Rolf Bensch:
> Hi Theo,
>
> I just committed button support patch to git.
>
> Sorry, I have no idea about the usb interface. Maybe somebody else can
> help with this issue.
>
> Many thanks for your help.
>
> Cheers,
> Rolf
>
>
>
> Am 24.03.2013 21:45, schrieb Theo:
>> Hi Rolf,
>>
>> regarding the scanner buttons: the MG6300 matches the MG6200. This would
>> make the patch as simple as this:
>>
>> diff --git a/backend/pixma_mp150.c b/backend/pixma_mp150.c
>> index 494c23e..febd06c 100644
>> --- a/backend/pixma_mp150.c
>> +++ b/backend/pixma_mp150.c
>> @@ -918,7 +918,7 @@ handle_interrupt (pixma_t * s, int timeout)
>> * oo: original
>> * tt: target
>> * poll event with 'scanimage -A' */
>> -  if (s->cfg->pid == MG6200_PID)
>> +  if (s->cfg->pid == MG6200_PID || s->cfg->pid == MG6300_PID)
>>/* button no. in buf[7]
>> * size in buf[10] 01=A4; 02=Letter; 08=10x15; 09=13x18; 0b=auto
>> * format in buf[11] 01=JPEG; 02=TIFF; 03=PDF; 04=Kompakt-PDF
>>
>>
>> Regarding the USB connectivity error: it occurred again today and I sort
>> of believe it was caused by a xsane. I did noticed the USB connection
>> name changed when the issue occurred. When it works, the name is
>> 'pixma:04A91765_20A814', when there are issues the name changes to
>> 'pixma:04A91765':
>>
>> With the connection issue:
>>   $ scanimage -L
>>   device `v4l:/dev/video0' is a Noname UVC Camera (046d:0825) virtual device
>>   device `pixma:MG6300_canon-printer' is a CANON Canon PIXMA MG6300
>> multi-function peripheral
>>   device `pixma:04A91765' is a CANON Canon PIXMA MG6300 multi-function
>> peripheral
>>
>> Without the connection issue:
>>   $ scanimage -L
>>   device `v4l:/dev/video0' is a Noname UVC Camera (046d:0825) virtual device
>>   device `pixma:MG6300_canon-printer' is a CANON Canon PIXMA MG6300
>> multi-function peripheral
>>   device `pixma:04A91765_20A814' is a CANON Canon PIXMA MG6300
>> multi-function peripheral
>>
>> Can you tell where this name is created?
>>
>> Thanks again, Theo

-- next part --
A non-text attachment was scrubbed...
Name: pixma_mp150.c.diff.tar.gz
Type: application/x-gzip
Size: 1780 bytes
Desc: not available
URL: 
<http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20130621/c607e092/attachment.bin>
-- next part --
A non-text attachment was scrubbed...
Name: sane-pixma.man.diff
Type: text/x-patch
Size: 1939 bytes
Desc: not available
URL: 
<http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20130621/c607e092/attachment-0001.bin>


[sane-devel] Sane genesys Backend 1.0.24 CanoScan LiDE 210 and tiff scan format

2013-06-20 Thread Rolf Bensch
Hello,

Am 19.06.2013 17:35, schrieb Stef:
> On 19/06/2013 16:41, Thorsten M?ller wrote:
>>
>> This seems to solve the problem. Now scanimage does tiff scans again and
>> includes the icc profile.
>>
>> Thanks
>> Thorsten

Yesterday's version of my Ubuntu ppa (ppa:rolfbensch/sane-git) has been
built with this patch.

> OK,
> 
> thanks for the test. I have updated scanimage to protect itself from
> these incorrect options. I have also updated tstbackend to test this case.
> 
> Regards,
> Stef
> 

Today's version of my Ubuntu ppa is waiting to build with the latest patch.

Many thanks for the bugfix,
Rolf



[sane-devel] TPU negatives scan for Canon CS8800F and CS9000F

2013-06-14 Thread Rolf Bensch
Hi list,

I disabled TPU negatives scan for Canon for CS8800F and CS9000F with my
last commit.

I received some feedback, that negatives scan confuses the users.

The only difference between positives and negatives scan is one byte in
the protocol. I didn't found any visual difference between the scanned
images.

Anyway, converting negatives is part of the frontend (e.g. xsane) or
another external application.

Cheers,
Rolf



[sane-devel] Sane genesys Backend 1.0.24 CanoScan LiDE 210 and tiff scan format

2013-06-14 Thread Rolf Bensch
Hello,

Am 13.06.2013 20:45, schrieb Stef:
> On 13/06/2013 12:26, Thorsten M?ller wrote:
>> Hello,
>>
>> I've got a problem with the 1.0.24 genesys backend. I need to use 1.0.24
>> since the 5 front panel buttons of my CanScan LidE 210 are not fully
>> supported in earlier versions.
>>
>> When I try to scan in tiff format, this it what happens:
>>
>> | tm at dungeonmaster:~ $ scanimage --format=tiff > /tmp/test.tiff
>> | scanimage: unrecognized option '--format=tiff'
>>
>> It works with earlier versions of sane (tested with 1.0.22 and 1.0.23).
>>
>> I use Kubuntu Linux 12.04 Precise Pangolin x86_64 and the 1.0.24git
>> packages from this ppa:
>> http://ppa.launchpad.net/rolfbensch/sane-git/ubuntu
>>
>> scanimage --format=tiff works with the oroginal packages from the distro
>> (Version 1.0.22-7ubuntu1) and from this ppa:
>> http://ppa.launchpad.net/nathan-renniewaldock/sane/ubuntu/ (Version
>> 1.0.23-0ubuntu1~ppa1~precise)
>>
>> I tried building from the daily 1.0.24 snapshot sources myself, it gives
>> the same results:
>>
>> | tm at dungeonmaster:~ $ scanimage --format=tiff > /tmp/test.tiff
>> | scanimage: unrecognized option '--format=tiff'
>>
>> Perhaps someone can shed some light on this. And BTW, there are some
>> more long options that don't work any longer:
>> --icc-profile, --batch-*
>>
>> TIA for any help
>> Greetings
>> Thosten
>>
> Hello,
>
> I have ran into similar issue. The following patch fixes for me:
>
> diff --git a/frontend/scanimage.c b/frontend/scanimage.c
> index ce958df..49030a3 100644
> --- a/frontend/scanimage.c
> +++ b/frontend/scanimage.c
> @@ -2091,7 +2091,7 @@ Parameters are separated by a blank from
> single-character options (e.g.\n\
>
>/* re-run argument processing with backend-specific options
> included
> * this time, enable error printing and arg permutation */
> -  optind = 0;
> +  /* optind = 0; */
>opterr = 1;
>while ((ch = getopt_long (argc, argv, full_optstring, all_options,
> &index)) != EOF)
>
> Since the current has been correct for years,  maybe there is a
> regression in glibc ?
>
> Regards,
> Stef
>
>

The Pixma backend is running with and without this patch on my 64-bit
Ubuntu 12.04. I have no problems with any linux kernel (tested with
kernel version 3.2.0 and 3.8.0) without this patch.

'cause my ppa is affected, I would like to have an official patch for
this issue.

Somebody who is involved in coding scanimage should tell something about
this. I have no idea about the usage/need of the optind parameter in the
getopt library.

Cheers,
Rolf





[sane-devel] Canon Pixma MX895

2013-06-07 Thread Rolf Bensch
Hi Gerard,

MX890 series is fully supported by the development (git) SANE version.
Please install latest SANE as desribed here:
http://www.sane-project.org/README.linux. You can see the supported
scanners status of the git version here:
http://www.sane-project.org/lists/sane-backends-cvs.html#S-PIXMA

There are some minor bugs in your scanner's driver. If you like you can
help debugging button and ADF empty support.

Cheers,
Rolf


Am 06.06.2013 22:42, schrieb Gerard Thornley:
> Hello,
>
> I have this scanner and would like to use sane to drive it. I see from
> the status page that testers are required, and would like to help to
> the extent I can. Unfortunately, I haven't used sane on any other
> device previously, so don't have a reference point for testing.
>
> I terms of environment, I have sane running on a raspberry pi (i.e.
> ARM) and am using the arch installation. So far, I have only got as far
> as:
>
> [gerard at i fwknop]$ scanimage -V
> scanimage (sane-backends) 1.0.23; backend version 1.0.23
>
> [gerard at i fwknop]$ scanimage --list-devices
> device `pixma:MX890_p' is a CANON Canon PIXMA MX890 Series
> multi-function peripheral 
>
> [gerard at i fwknop]$ scanimage
> scanimage: open of device pixma:MX890_p failed: Operation not supported
>
> If someone can direct me, I'm willing to do what I can to get this
> working.
>
> With regards,
> Gerard Thornley
>
>




[sane-devel] Canon Pixma MX925

2013-06-05 Thread Rolf Bensch
Hi Hans,

Am 05.06.2013 00:46, schrieb Hans Pirnay:
> Hi Rolf,
> 
> I will get back to you with the scanning tests as soon as I can. For
> now, I just tried the button tests on a PIXMA MX895 (over wifi), and I'm
> not quite sure if I'm doing what you asked me to, so here's what I did:
> 
> $ export SANE_DEBUG_PIXMA=11
> $ scanimage -A
> 
> press any button
> 
> $ scanimage -A
> 
> no result. However, if I actually listen for buttons I get this:
> 
> $ scanimage -d pixma:MX890_192.168.2.102 --button-controlled=yes > output
> [sanei_debug] Setting debug level of pixma to 11.
> [pixma] pixma is compiled without pthread support.
> [pixma] pixma version 0.17.2
> [pixma] Scanner model found: Name MX890(Canon PIXMA MX890 Series)
> matches MX890 series
> [pixma] pixma_collect_devices() found Canon PIXMA MX890 Series at
> bjnp://192.168.2.102:8612 
> [pixma] pixma_open(): Canon PIXMA MX890 Series
> [pixma] Reader task id=16613 (forked)
> [pixma] Reader task started
> [pixma]  Button-controlled scan mode is enabled.
> [pixma]  To proceed, press 'SCAN' or 'COLOR' button. To cancel,
> press 'GRAY' or 'END' button.
> [pixma] INTR T=54.760 len=64
> [pixma]  :00 00 00 00 01 01 01 01  02 01 01 03 03 01 01 02 
> [pixma]  0010:01 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 
> [pixma]  0020:00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 
> [pixma]  0030:00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 
> [pixma] 
> [pixma] INTR T=100.088 len=64
> [pixma]  :00 00 00 00 01 01 01 02  02 01 01 03 03 01 01 02 
> [pixma]  0010:01 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 
> [pixma]  0020:00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 
> [pixma]  0030:00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 
> [pixma] 
> ... here I quit with CTRL-C
> 
> The first button is "Color", the second "Black". After I hit these
> buttons the printer sits there for a while, seemingly not doing
> anything; no scanning noise/movements, and the scanner's screen shows
> "Processing. Please wait momentarily". 
> 
> Is this what you are looking for?
> 

That looks good.

Please try the attached patch. This should enable button support for
your scanner.

Save the attached file to the folder '[sane source/]backend' and patch
pixma_mp150.c with 'patch pixma_mp150.c pixma_mp150.c.diff1'.

Now you can test with 'scanimage -d pixma:MX890_192.168.2.102 -A'.
Button-1 is your color button and button-2 is your black button.
Original contains the image size (01=A4; 02=Letter; 08=10x15; 09=13x18;
0b=auto) and target contains the scan format (01=JPEG; 02=TIFF; 03=PDF;
04=Kompakt-PDF). If your scanner shows other or more parameters, please
report them.

Cheers,
Rolf
-- next part --
--- ./pixma_mp150.c 2013-06-05 10:51:39.0 +0200
+++ ../sane-backends/backend/pixma_mp150.c  2013-06-05 10:52:57.0 
+0200
@@ -932,7 +932,8 @@
* tt: target
* poll event with 'scanimage -A' */
   if (s->cfg->pid == MG6200_PID
-  || s->cfg->pid == MG6300_PID)
+  || s->cfg->pid == MG6300_PID
+  || s->cfg->pid == MX920_PID)
   /* button no. in buf[7]
* size in buf[10] 01=A4; 02=Letter; 08=10x15; 09=13x18; 0b=auto
* format in buf[11] 01=JPEG; 02=TIFF; 03=PDF; 04=Kompakt-PDF


[sane-devel] Canon Pixma MX925

2013-06-04 Thread Rolf Bensch
Hi Hans,

Many thanks reporting ADF duplex on MX920.

Please try to scan a color image with *all* resolutions from 75 dpi up
to 2400 dpi and report if *all* are OK. To reduce scan time you can scan
a small area. If you might see problems you can send the pnm files
directly to my email address. The ml rejects large emails.

Please also check button support on the command line with 'export
SANE_DEBUG_PIXMA=11' and 'scanimage -A':
- 'export SANE_DEBUG_PIXMA=11'
- press one button
- check the output from 'scanimage -A'
- press the next button and again check the output from 'scanimage -A'
- repeat until all buttons have been tested

I'm interested in the debug output from each button which looks similar
to this:

  Buttons:
--button-update
Update button state
[pixma] INTR T=1.656 len=32
[pixma]  :00 20 00 00 00 00 00 00  00 00 00 00 00 00 00 00
[pixma]  0010:00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
[pixma]
--button-1  [1] [read-only]
Button 1
--button-2  [0] [read-only]
Button 2
--original  [0] [read-only]
Type of original to scan
--target  [2] [read-only]
Target operation type

Many thanks for your help.

Cheers,
Rolf



Am 04.06.2013 00:21, schrieb Hans Pirnay:
> Hi everyone, 
>
> I just noticed that the current git HEAD version of the pixma backend
> does not register the PIXMA MX920 series as Duplex scanners, although
> they are.
>
> After changing pixma_mp150.c:1741 to
>
>   DEVICE ("Canon PIXMA MX920 Series", "MX920", MX920_PID, 2400, 0, 0,
> 638, 877, PIXMA_CAP_CIS | PIXMA_CAP_ADFDUP),
>
> it works perfectly.
>
> best
> Hans




[sane-devel] canon pixma MX890 ADF empty test issues

2013-05-28 Thread Rolf Bensch
Hi Henry,

Please create usb log files, from scanimage and from Canon's scangearmp.

scanimage:
Set 'export SANE_DEBUG_PIXMA=11' and from scanimage redirect stderr to
sane.log while adding '2> logfile' to the command line.

Canon's scangearmp:
Use wireshark to sniff the usb protocol and save the log to a file.
Maybe you need to enable usb support for wireshark:
http://wiki.wireshark.org/CaptureSetup/USB.

Please try a single page scan and a multi page scan (single side and
duplex) from ADF with both scanner drivers.

To reduce file size please scan a small area of approx. 5mm x 5mm.

Please create one log file for each single test.

Cheers,
Rolf


Am 27.05.2013 20:28, schrieb Henry Ptasinski:
> Thanks, somehow missed that in the man page.  I must be low on
> caffeine today ...
>
> A simple ADF test works fine over USB:
>
> scanimage -b --mode Gray --source "Automatic Document Feeder"
> --batch-count 2
> Scanning 2 pages, incrementing by 1, numbering from 1
> Scanning page 1
> Scanned page 1. (scanner status = 5)
> Scanning page 2
> Scanned page 2. (scanner status = 5)
>
> (I've also successfully scanned a few pages with the duplexer.)
>
> Empty ADF appears fine at first:
>
> scanimage -b --mode Gray --source "Automatic Document Feeder"
> --batch-count 1
> Scanning 1 pages, incrementing by 1, numbering from 1
> Scanning page 1
> scanimage: sane_read: Document feeder out of documents
> Scanned page 1. (scanner status = 7)
>
> but the scanner is left in an unusable state.  The display continues
> to say "Scanning document" until I run scanimage again, at which point
> the scanner display resets to the main menu, but scanimage is not happy:
>
> scanimage -b --mode Gray --source "Automatic Document Feeder"
> --batch-count 1
> Scanning 1 pages, incrementing by 1, numbering from 1
> Scanning page 1
> scanimage: sane_read: Error during device I/O
> Scanned page 1. (scanner status = 9)
>
> Any further attempts to run scanimage fail, with scanimage just
> hanging waiting for the printer.  The only way I've found to recover
> after and ADF empty is to reboot the printer.
>
> I'm using:
>
> scanimage (sane-backends) 1.0.24git; backend version 1.0.24
>
> with sources from today.
>
> For comparison, Canon's scangearmp v2.10.33 doesn't seem to have
> issues with empty ADF on this scanner.
>
> ---
> Henry Ptasinski
> henry at logout.com
>
> On 05/27/2013 09:37 AM, m. allan noah wrote:
>> Add the -b argument to scanimage. It will make multiple images in
>> current directory.
>>
>> allan
>>
>> On Mon, May 27, 2013 at 11:27 AM, Henry Ptasinski 
>> wrote:
>>> What's the correct syntax for scanning multipage documents using
>>> scanimage?
>>>
>>> I'm trying to test ADF operation on my MX892 using scanimage, but
>>> I'm not
>>> sure about the correct syntax.  I've tried this with two sheets
>>> loaded in
>>> the ADF:
>>>
>>>  scanimage --mode Gray --source "ADF Duplex" >
>>> scanimage_test.pnm
>>>
>>> I get a file with the first page of the scan (front side only),
>>> scanimage
>>> quits with status 0, and then the printer hangs waiting for
>>> something.  Is
>>> it possible to scan multiple pages with scanimage, or do I need to use
>>> xsane?
>>>
>>> Thanks,
>>> ---
>>> Henry Ptasinski
>>> henry at logout.com
>>>
>>>
>>> On 05/24/2013 08:55 AM, Rolf Bensch wrote:
>>>>
>>>> Hi Tim,
>>>>
>>>> seeing an "error" while adf is impty is normal behaviour.
>>>>
>>>> What's about running an adf batch scan job empty? Can you start a new
>>>> (single) scan job afterwards?
>>>>
>>>> Please use only usb connection while testing. On a 2nd step we can
>>>> switch to LAN.
>>>>
>>>> Please be patient if you'll see some errors and it may seem that we
>>>> are
>>>> on the wrong way. We'll find a patch for this scanner.
>>>>
>>>> Cheers,
>>>> Rolf
>>>>
>>>> p.s. please answer with my email as cc. I'm not checking the ml digest
>>>> frequently.
>>>>
>>>>
>>>>
>>>> Am 22.05.2013 05:56, schrieb Tim:
>>>>>
>>>>> Canon MX892 (US model)
>>>>>
>>>>> tested:
>>>>> Loaded and unloaded ADF tray
>>>>>
>>>>> backend:
>>>>> git clone as of 16 May, no changes
>>>>>
>>>>> rerelated software:
>>>>> xsane 0.998
>>>>> cnijfilter-mx890series-3.70-1.x86_64 from canon-asia
>>>>> cnijfilter-common-3.70-1.x86_64 from canon-asia
>>>>> cups-bjnp-1.2.1-x86_64-1_SBo from slackbuilds.org
>>>>> 2.6.37.6c (tim at hp_lap) (gcc version 4.5.2 (GCC) ) #8 SMP
>>>>> Slackware 13.37, x86_64
>>>>>
>>>>> environment:
>>>>> SANE_DEBUG_PIXMA=11
>>>>>
>>>>> results:
>>>>> loaded ADF tray works as expected, empty ADF tray gives appropriate
>>>>> error (see attached log)
>>>>>
>>>>> Cheers,
>>>>
>>>>
>>>>
>>>
>>>
>>> -- 
>>> sane-devel mailing list: sane-devel at lists.alioth.debian.org
>>> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
>>> Unsubscribe: Send mail with subject "unsubscribe your_password"
>>>  to sane-devel-request at lists.alioth.debian.org
>>
>>
>>
>
>
>




[sane-devel] canon pixma MX890 ADF empty test OK

2013-05-24 Thread Rolf Bensch
Hi Tim,

please first test via usb only. The LAN interface (bjnb) could have a bug.

If you still have this scanner we should fix the bugs and you don't need
to send the scanner back.

Cheers,
Rolf

Am 22.05.2013 23:53, schrieb Tim:
> Unfortunately my report was premature.  The backend did successfully
> manage a 1 page ADF scan followed by an ADF empty test, but more
> normal use profile failed as:
>
> o Placed 9 sheets in ADF
>
> o launched xsane w ADF/multipage=9
>
> o ask for and received preview, adjusted color with white eyedropper
>
> o ask for scan, failed
>
> After this, the MX892 was locked out regardless of several
> retries/variations including power cycling MX892, removing ~/.sane,
> removing cnijfilter and rebuild/reinstall 16 May git.  All variations
> error as follows:
>
>> [sanei_debug] Setting debug level of pixma to 11.
>> [pixma] pixma is compiled without pthread support.
>> [pixma] pixma version 0.17.2
>> [pixma] Scanner model found: Name MX890(Canon PIXMA MX890 Series)
>> matches MX890 series
>> [pixma] pixma_collect_devices() found Canon PIXMA MX890 Series at
>> bjnp://canon:8612
>> [pixma] pixma_find_scanners() found 1 devices
>> [pixma] Scanner model found: Name MX890(Canon PIXMA MX890 Series)
>> matches MX890 series
>> [pixma] pixma_collect_devices() found Canon PIXMA MX890 Series at
>> bjnp://canon:8612
>> [pixma] pixma_open(): Canon PIXMA MX890 Series
>> [bjnp] bjnp_open_tcp: Can not connect to scanner: Connection refused
>> [pixma] pixma_connect() failed EINVAL
>> [pixma] pixma_open() failed EINVAL
>> [pixma] pixma_close(): Canon PIXMA MX890 Series
>> /tmp$ exit
>> exit
>> Script done, file is mx892.log
>
> Unfortunately this means the MX892 is unreliable and will be returned
> to Amazon.  I'll do my backend homework better next time.
>
> Cheers,
>
>
> Tim wrote:
>> Canon MX892 (US model)
>>
>> tested:
>> Loaded and unloaded ADF tray
>>
>> backend:
>> git clone as of 16 May, no changes
>>
>> rerelated software:
>> xsane 0.998
>> cnijfilter-mx890series-3.70-1.x86_64 from canon-asia
>> cnijfilter-common-3.70-1.x86_64 from canon-asia
>> cups-bjnp-1.2.1-x86_64-1_SBo from slackbuilds.org
>> 2.6.37.6c (tim at hp_lap) (gcc version 4.5.2 (GCC) ) #8 SMP
>> Slackware 13.37, x86_64
>>
>> environment:
>> SANE_DEBUG_PIXMA=11
>>
>> results:
>> loaded ADF tray works as expected, empty ADF tray gives appropriate
>> error (see attached log)
>>
>> Cheers,
>
>




[sane-devel] canon pixma MX890 ADF empty test OK

2013-05-24 Thread Rolf Bensch
Hi Tim,

seeing an "error" while adf is impty is normal behaviour.

What's about running an adf batch scan job empty? Can you start a new
(single) scan job afterwards?

Please use only usb connection while testing. On a 2nd step we can
switch to LAN.

Please be patient if you'll see some errors and it may seem that we are
on the wrong way. We'll find a patch for this scanner.

Cheers,
Rolf

p.s. please answer with my email as cc. I'm not checking the ml digest
frequently.



Am 22.05.2013 05:56, schrieb Tim:
> Canon MX892 (US model)
>
> tested:
> Loaded and unloaded ADF tray
>
> backend:
> git clone as of 16 May, no changes
>
> rerelated software:
> xsane 0.998
> cnijfilter-mx890series-3.70-1.x86_64 from canon-asia
> cnijfilter-common-3.70-1.x86_64 from canon-asia
> cups-bjnp-1.2.1-x86_64-1_SBo from slackbuilds.org
> 2.6.37.6c (tim at hp_lap) (gcc version 4.5.2 (GCC) ) #8 SMP
> Slackware 13.37, x86_64
>
> environment:
> SANE_DEBUG_PIXMA=11
>
> results:
> loaded ADF tray works as expected, empty ADF tray gives appropriate
> error (see attached log)
>
> Cheers,




[sane-devel] canon MX892 scan test OK

2013-05-21 Thread Rolf Bensch
Hi Tim,

Many thanks for your report.

As I can see on the supported scanners site
(http://www.sane-project.org/lists/sane-backends-cvs.html#S-PIXMA), your
scanner is completely supported by the SANE Development Version.

So, with the SANE git version you don't need to use 'PIXMA_EXPERIMENT=1'
anymore.

But it seems that there still is a problem with 'ADF empty'.

If you can reproduce this problem, please provide some debug infos
created with 'export SANE_DEBUG_PIXMA=11' and 'xsane &> pixma.log' from
the command line.

If 'ADF empty' is OK, I can remove this comment from the supported
scanners site.

Cheers,
Rolf


Am 16.05.2013 22:25, schrieb Tim:
> Canon MX892 (US model), works
>
> tested:
> 150/300/600 dpi scans of an IT8 camera target using xsane front end
> over 802.11g, auto discovery
>
> not tested:
> USB / Ethernet
>
> backend:
> git clone as of today (16 May), no changes.
>
> related software:
> xsane 0.998
> cnijfilter-mx890series-3.70-1.x86_64 from canon-asia
> cnijfilter-common-3.70-1.x86_64 from canon-asia
> cups-bjnp-1.2.1-x86_64-1_SBo from slackbuilds.org
> 2.6.37.6c (tim at hp_lap) (gcc version 4.5.2 (GCC) ) #8 SMP
> Slackware 13.37, x86_64
>
> environment:
> PIXMA_EXPERIMENT=1
> SANE_DEBUG_PIXMA=11
>
> scanimage -L:
>> [sanei_debug] Setting debug level of pixma to 11.
>> [pixma] pixma is compiled without pthread support.
>> [pixma] pixma version 0.17.2
>> [pixma] Scanner model found: Name MX890(Canon PIXMA MX890 Series)
>> matches MX890 series
>> [pixma] pixma_collect_devices() found Canon PIXMA MX890 Series at
>> bjnp://canon:8612
>> [pixma] pixma_find_scanners() found 1 devices
>> device `pixma:MX890_canon' is a CANON Canon PIXMA MX890 Series
>> multi-function peripheral
>
> Let me know if different information would be useful.
>
> Cheers,
>
>
>
>




[sane-devel] Problems with Canon MX715

2013-05-13 Thread Rolf Bensch
Hi Stephan,

I found no error in the logfile. Please try to reproduce the error and
log it.

I read from another post that you both enabled USB and ethernet. Please
check that only one interface is enabled at once.

On the other hand please test scanning with all resolutions. To reduce
scan time small scan areas of approx. 5mm x 5mm are ok. You don't need
to create logfiles.

Cheers,
Rolf


Am 11.05.2013 12:09, schrieb stephan_t:
> Hi Rolf,
>
> I'm ataching pixma.log here. The Image is scanned well
> I'm using a almost up-to-date archlinux 64-bit. I', having problems to
> create a logfile with isbnoop on Win7/64-bit. I get a bluescreen if I plug
> in my scanner  :(
>
> Hoefully this log file is enough.
>
> Regards,
> Stephan T.
>
>
>
>
> pixma.log   
>
>
>
>
>
> --
> View this message in context: 
> http://sane.10972.n7.nabble.com/Problems-with-Canon-MX715-tp5795p17547.html
> Sent from the SANE - Dev mailing list archive at Nabble.com.
>
>




[sane-devel] Problems with Canon MX715

2013-05-10 Thread Rolf Bensch
Hi Stephan,

Please create a logfile with 'export SANE_DEBUG_PIXMA=1', 'export
SANE_DEBUG_PIXMA=11' and 'scanimage 2>pixma.log >image.pnm'.

What Distribution (Name + 32/64 bits) are you using?

I also need an usb sniff file from a Windows machine of an approx. 5mm x
5mm area color scan @ 75 dpi using
http://benoit.papillault.free.fr/usbsnoop/.

In the meantime you can install SANE from git as described in
README.linux (http://www.sane-project.org/README.linux). I'll create
some patches for testing.

Cheers,
Rolf



Am 10.05.2013 13:22, schrieb stephan_t:
> Hello,
>
> as this is a older post and nothing new is comming up here, I would like to
> give some informations about the MX 715 with sane-1.0.23
>
> If I set the variable I'm getting this output:
>
> [sanei_debug] Setting debug level of pixma to 3.
> [pixma] pixma is compiled with pthread support.
> [pixma] pixma version 0.17.0
> [pixma] pixma_collect_devices() found Canon PIXMA MX710 Series at
> libusb:001:004
> [pixma] sanei_bjnp_find_devices:
> [pixma] eno1 is IPv4 capable, sending broadcast..
> [pixma] eno1 is IPv4 capable, sending broadcast..
> [pixma] eno1 is IPv4 capable, sending broadcast..
> [pixma] eno1 is IPv4 capable, sending broadcast..
> [pixma] eno1 is IPv4 capable, sending broadcast..
> [pixma] pixma_find_scanners() found 1 devices
> [pixma] pixma_collect_devices() found Canon PIXMA MX710 Series at
> libusb:001:004
> [pixma] sanei_bjnp_find_devices:
> [pixma] eno1 is IPv4 capable, sending broadcast..
> [pixma] eno1 is IPv4 capable, sending broadcast..
> [pixma] eno1 is IPv4 capable, sending broadcast..
> [pixma] eno1 is IPv4 capable, sending broadcast..
> [pixma] eno1 is IPv4 capable, sending broadcast..
> [pixma] WARNING:Experimental backend CAN DAMAGE your hardware!
> [pixma] pixma_open(): Canon PIXMA MX710 Series
> [pixma] Reader task started
> [pixma] Reader task id=140009308874496 (threaded)
> [pixma] 
> [pixma] pixma_scan(): start
> [pixma]   line_size=1914 image_size=1678578 channels=3 depth=8
> [pixma]   dpi=75x75 offset=(0,0) dimension=638x877
> [pixma]   gamma_table=0x1884b98 source=0
> [pixma]   threshold=127 threshold_curve=0
> [pixma] WARNING:Timed out in wait_until_ready()
> [pixma] Current status: paper=1 cal=0 lamp=0 busy=0
> [pixma] pixma_read_image() failed ETIMEDOUT
> [pixma] Reader task terminated: ETIMEDOUT
> [pixma] read_image():reader task closed the pipe:0 bytes received, 1678578
> bytes expected
> scanimage: sane_read: Error during device I/O
> [pixma] pixma_close(): Canon PIXMA MX710 Series
>
>
> Hope this helps. If more informations are needed I can provide them.
>
> Regards
> Stephan T.
>
>
>
> --
> View this message in context: 
> http://sane.10972.n7.nabble.com/Problems-with-Canon-MX715-tp5795p17542.html
> Sent from the SANE - Dev mailing list archive at Nabble.com.
>
>




[sane-devel] Testing Sane + Canon MG6250

2013-04-23 Thread Rolf Bensch
Hi Ashley,

Am 22.04.2013 15:04, schrieb Ashley Arnold:
> Hi,
>
> I'm not really sure how to do this, but the
> http://www.sane-project.org/sane-mfgs.html page said "Testers needed",
> so here is what I did to get my Canon MG6250 scanner going.
>
> This is on xubuntu 12.10 64-bit with all current updates as at 13th
> Apr 2013. Here is my xsane version info:
>
> $ xsane --version
> xsane-0.998 (c) 1998-2010 Oliver Rauch
>   E-mail: Oliver.Rauch at xsane.org 
>   package xsane-0.996
>   compiled with GTK-2.24.12
>   with color management function
>   with GIMP support, compiled with GIMP-2.8.0
>   XSane output formats: jpeg, pdf(compr.), png, pnm, ps(compr.), tiff, txt
>
> After installing xsane, initially it wouldn't detect the MG6250 (which
> was on the network via wireless connection). It would look for devices
> and then the process would end.
>
> After reading the man docs and finding the "backend name" for my
> printer is "pixma", I did:
>
>   * man sane-pixma (seems to be a man entry for each backend) tells
> you to that network scanners should normally be detected, but if
> not, add them directly to /etc/sane.d/pixma.conf
>   * Edited /etc/sane.d/pixma.conf and added:
> bjnp://
>   * The sane daemon wasn't running, so I started it manually (a friend
> of mine running Arch said it was for him...):
>   o Edited /etc/default/saned and set RUN=yes.
>   o Then started the sane service: service saned start
>   * Run xsane, it discovered the scanner and worked perfectly.
>
> The only issue I had is for multi-page documents, it didn't wait
> between pages, but scanned the same page over and over. This might be
> user error and nothing to do with xsane though.
>
If you want to process multi-page documents you should use scanbd to do
button controlled scans (http://sourceforge.net/projects/scanbd/). You
can search the SANE devel archive and ask this mailing list about scanbd.

You need to use latest SANE from git to enable full button support for
your scanner. You can use my Ubuntu PPA to upgrade libsane
(http://lists.alioth.debian.org/pipermail/sane-devel/2013-April/031177.html).

Cheers,
Rolf

-- next part --
An HTML attachment was scrubbed...
URL: 



[sane-devel] Canon ImageClass MF3010

2013-04-19 Thread Rolf Bensch
Hi Nathan,

I just committed the patch to git.

If you like you can add my PPA to apt:
http://lists.alioth.debian.org/pipermail/sane-devel/2013-April/031177.html

Many thanks for your help.

Cheers,
Rolf


Am 19.04.2013 22:04, schrieb Nathan Stewart:
> Thank you. Works beautifully - once I realized libsane is a separate
> package from the sane core deb that ubuntu installs and I was able to
> overwrite the stock 1.0.23. The other gotcha was that, being an
> all-in-one, it's matched by the printer rules first. I see /dev/usb/lp1,
> owned by group lp. But no scanner related devices.
> 
> 
> 
> On Thu, Apr 18, 2013 at 4:28 PM, Rolf Bensch  <mailto:rolf at bensch-online.de>> wrote:
> 
> Hi Nathan,
> 
> Please use the attached patch files.
> 
> You already started with pixma_imageclass.c. Newer devices needed more
> changes than simply adding the device as you did.
> 
> You also should patch tools/udev/libsane.rules and then copy this file
> to /etc/udev/rules.d. Your user must be a member of group scanner. Then
> you should have access to your scanner (after logoff/logon and reconnect
> your scanner). You can read README.linux for more infos about this
> issue.
> 
> Cheers,
> Rolf
> 
> Am 18.04.2013 15:31, schrieb Nathan Stewart:
> > OK - I added the device ID and capabilities:
> > index 419d09d..bb38d76 100644
> > --- a/backend/pixma_imageclass.c
> > +++ b/backend/pixma_imageclass.c
> > @@ -88,7 +88,7 @@
> >  #define MF6680_PID 0x26fa
> >  #define MF8030_PID 0x2707
> >  #define MF4550_PID 0x2736
> > -
> > +#define MF3010_PID 0x2759
> >
> >  enum iclass_state_t
> >  {
> > @@ -769,5 +769,6 @@ const pixma_config_t pixma_iclass_devices[] = {
> >DEV ("Canon imageClass MF8030", "MF8030", MF8030_PID, 600, 640,
> 877,
> > PIXMA_CAP_ADF),
> >DEV ("Canon i-SENSYS MF5880dn", "MF5880", MF5880_PID, 600, 640,
> 877,
> > PIXMA_CAP_ADFDUP),
> >DEV ("Canon i-SENSYS MF6680dn", "MF6680", MF6680_PID, 600, 640,
> 877,
> > PIXMA_CAP_ADFDUP),
> > +  DEV ("Canon imageCLASS MF3010", "MF3010", MF3010_PID, 600, 640,
> 877, 0),
> >DEV (NULL, NULL, 0, 0, 0, 0, 0)
> >  };
> >
> > (I understood the last field in DEV to be capabilities, those listed
> > specifically about feeders)
> >
> > However, sane-find-scanners finds it, but scanimage -L does not. I dug
> > down the path of scanimage -L until I got to pixma_collect_devices(),
> > but apparently I've not done enough to see that pixma_collect_devices
> > considers it a pixma scannner.
> >
> >
> > On Thu, Apr 18, 2013 at 8:53 AM, Nathan Stewart
> >  <mailto:therealnathanstewart at gmail.com>
> <mailto:therealnathanstewart at gmail.com
> <mailto:therealnathanstewart at gmail.com>>>
> > wrote:
> >
> > I'm willing to help. I may still have an XP image somewhere, but
> > trial and error may be faster.
> >
> > (We have a 3 month old baby. I can steal a few minutes at the
> > keyboard, one hand it,  or remote from work, but time to go
> > physically scrounging through old computer stuff is extremely
> limited)
> >
> > I also have sane-backends already checked out and built. I just
> > haven't dug in very far yet because I thought it was covered
> already
> > by the pixma driver.
> >
> >
> 
> 



[sane-devel] Canon ImageClass MF3010

2013-04-18 Thread Rolf Bensch
Hi Nathan,

If you are willing to do some beta testing, we can try to implement your
scanner into SANE.

If possible we need a reference scan logfile from Windows. Please use
usbsnoop (http://benoit.papillault.free.fr/usbsnoop/) to sniff a
complete color sample scan of approx. 5mm x 5mm @ 75 dpi from Windows XP.

If you cannot create the reference scan logfile from Windows, I can
implement your scanner similar to existing ones next to your scanner's
usb product id. Then we'll need some patch iterations while testing.

Cheers,
Rolf


Am 13.04.2013 04:17, schrieb Nathan Stewart:
> I have a Canon ImageClass MF3010 (all in one laser/scanner), trying to
> get the scanner portion working. I believe it's supposed to be
> supported under the pixma backend. It wasn't detected at all with
> sane-backend 1.0.23, once I added the product id to udev rules,
> sane-find-scanner will detect it, but scanimage -L does not.
>
> dmesg
> [ 8764.657596] usb 1-3: new high-speed USB device number 10 using ehci_hcd
> [ 8764.813796] usb 1-3: New USB device found, idVendor=04a9,
> idProduct=2759
> [ 8764.813810] usb 1-3: New USB device strings: Mfr=1, Product=2,
> SerialNumber=3
> [ 8764.813819] usb 1-3: Product: MF3010
> [ 8764.813826] usb 1-3: Manufacturer: Canon Inc
> [ 8764.813831] usb 1-3: SerialNumber: 112130031CCB
> [ 8764.822501] usblp 1-3:1.1: usblp1: USB Bidirectional printer dev 10
> if 1 alt 0 proto 2 vid 0x04A9 pid 0x2759
>
> sane-find-scanner
> found USB scanner (vendor=0x04a9 [Canon Inc], product=0x2759 [MF3010])
> at libusb:001:010
> found USB scanner (vendor=0x0403, product=0x6001) at libusb:001:007
>
> but still no joy. Does anyone have any info on this scanner?
>
>




[sane-devel] Ubuntu PPA for SANE daily git snapshots

2013-04-12 Thread Rolf Bensch
Hi List,

Recently I created an Ubuntu PPA for SANE daily git snapshots at
Launchpad: https://launchpad.net/~rolfbensch/+archive/sane-git.

I'm running a daily script to update the PPA.

You can add this PPA on your Ubuntu system with: 'sudo
add-apt-repository ppa:rolfbensch/sane-git**'.

Cheers,
Rolf
-- next part --
An HTML attachment was scrubbed...
URL: 



[sane-devel] SANE backend for Canon PIXMA MG8250

2013-04-12 Thread Rolf Bensch
Hi Volker,

If you want to read the program and backend version use: 'scanimage -V'.

You can do a test scan with 'scanimage > test.pnm'.

But it's easier to use a graphic frontend like xsane.

If your scanner still won't work, I need a log file from scanning a
small area of approx. 5mm x 5mm @ 75dpi with: 'SANE_DEBUG_PIXMA=11
scanimage -x 5 -y5 2> pixma.log > test.pnm'.

Cheers,
Rolf



Am 11.04.2013 18:58, schrieb Volker Lenhardt:
> Hi, I'm new here. My work environment is openSUSE 12.3, KDE 4.10,
> sane-backends 1.0.23.
>
> It happens that there is a SANE driver for my new printer-scanner
> Canon PIXMA MG8250:
>
> /usr/share/sane/descriptions/pixma.desc:
> model "PIXMA MG8200 Series"
> :interface "USB"
> :usbid "0x04a9" "0x1756"
> :status :untested
> :comment "Testers needed!"
>
> But it doesn't work. Test output from Yast:
>
> Fehler
> Test mit 'scanimage -d pixma:04A91756_20D0DE -v' ist fehlgeschlagen.
> Ergebnis:
> scanimage: scanning image of size 638x877 pixels at 24 bits/pixel
> scanimage: acquiring RGB frame
> scanimage: min/max graylevel value = 34/242
> scanimage: sane_read: Error during device I/O
>
> I have no idea how a scanner works and how a driver communicates with
> it. But if I can be of any help, though, I'm ready to do my best
> testing my scanner hoping to get it to work somehow.
>
> What can I do?
>
> Greetings
> Volker
>
>




[sane-devel] Fail to build sane-backends ( PIXMA 3100 Series )

2013-04-08 Thread Rolf Bensch
Hi Matt,

Am 08.04.2013 18:10, schrieb Matt Fields:
> Hi guys.
>
> I'm trying to build sane-backends to get my Canon PIXMA 3100 series
> working. I am able to use Canon's included scanner program, but it's
> not the greatest. Would like to get xsane / gscan working.
>
> I am unable to build sane-backends successfully. 
>
> Here's the log from the configure step / make-file: 
>
> I'm new to building/compiling.  Any help? Thanks.
>
>
>  $ ./configure --prefix=/usr BACKENDS=PIXMA --sysconfdir=/etc
> --localstatedir=/var

PIXMA must be lower-case.

I usually use this command:

$ BACKENDS="pixma" ./configure

and do a parallel installation to the system's sane-backend as described
in README.linux.

Cheers,
Rolf



[sane-devel] Canon PIXMA MG6350

2013-03-25 Thread Rolf Bensch
Hi Theo,

I just committed button support patch to git.

Sorry, I have no idea about the usb interface. Maybe somebody else can
help with this issue.

Many thanks for your help.

Cheers,
Rolf



Am 24.03.2013 21:45, schrieb Theo:
> Hi Rolf,
> 
> regarding the scanner buttons: the MG6300 matches the MG6200. This would
> make the patch as simple as this:
> 
> diff --git a/backend/pixma_mp150.c b/backend/pixma_mp150.c
> index 494c23e..febd06c 100644
> --- a/backend/pixma_mp150.c
> +++ b/backend/pixma_mp150.c
> @@ -918,7 +918,7 @@ handle_interrupt (pixma_t * s, int timeout)
> * oo: original
> * tt: target
> * poll event with 'scanimage -A' */
> -  if (s->cfg->pid == MG6200_PID)
> +  if (s->cfg->pid == MG6200_PID || s->cfg->pid == MG6300_PID)
>/* button no. in buf[7]
> * size in buf[10] 01=A4; 02=Letter; 08=10x15; 09=13x18; 0b=auto
> * format in buf[11] 01=JPEG; 02=TIFF; 03=PDF; 04=Kompakt-PDF
> 
> 
> Regarding the USB connectivity error: it occurred again today and I sort
> of believe it was caused by a xsane. I did noticed the USB connection
> name changed when the issue occurred. When it works, the name is
> 'pixma:04A91765_20A814', when there are issues the name changes to
> 'pixma:04A91765':
> 
> With the connection issue:
>   $ scanimage -L
>   device `v4l:/dev/video0' is a Noname UVC Camera (046d:0825) virtual device
>   device `pixma:MG6300_canon-printer' is a CANON Canon PIXMA MG6300
> multi-function peripheral
>   device `pixma:04A91765' is a CANON Canon PIXMA MG6300 multi-function
> peripheral
> 
> Without the connection issue:
>   $ scanimage -L
>   device `v4l:/dev/video0' is a Noname UVC Camera (046d:0825) virtual device
>   device `pixma:MG6300_canon-printer' is a CANON Canon PIXMA MG6300
> multi-function peripheral
>   device `pixma:04A91765_20A814' is a CANON Canon PIXMA MG6300
> multi-function peripheral
> 
> Can you tell where this name is created?
> 
> Thanks again, Theo



[sane-devel] Canon PIXMA MP230

2013-03-21 Thread Rolf Bensch
Hi Petar,

Many thanks for reporting new Canon Pixma MP230.

I just committed the patch to git.

Please checkout the latest version from git or download daily git
snapshot tomorrow from the SANE website and test again. You don't need
to respond if everything is working.

Cheers,
Rolf



Am 21.03.2013 12:38, schrieb Petar Dodev:
> Hi!
>
> I recently bought a MP230 and I mounted it on my home Linux  server.
> The model wasn't supported by SANE yet, so I dug around and found how
> to add it in the supported devices:
>
> diff --git a/backend/pixma_mp150.c b/backend/pixma_mp150.c
> index 494c23e..08edc45 100644
> --- a/backend/pixma_mp150.c
> +++ b/backend/pixma_mp150.c
> @@ -185,6 +185,7 @@
>  #define MX890_PID 0x175E
>  #define E600_PID 0x175A
>  #define MG4200_PID 0x1763
> +#define MP230_PID 0x175F
>  
>  /* 2013 new devices (untested) */
>  #define MG6300_PID 0x1765
> @@ -1711,6 +1712,7 @@ const pixma_config_t pixma_mp150_devices[] = {
>DEVICE ("Canon PIXMA MX890 Series", "MX890", MX890_PID, 2400, 0, 0,
> 638, 877, PIXMA_CAP_CIS | PIXMA_CAP_ADFDUP),
>DEVICE ("Canon PIXMA E600 Series",  "E600",  E600_PID,  1200, 0, 0,
> 638, 877, PIXMA_CAP_CIS | PIXMA_CAP_ADF),
>DEVICE ("Canon PIXMA MG4200", "MG4200", MG4200_PID, 1200, 0, 0,
> 638, 877, PIXMA_CAP_CIS),
> +  DEVICE ("Canon PIXMA MP230", "MP230", MP230_PID, 600, 0, 0, 638,
> 877, PIXMA_CAP_CIS),
>  
>/* Latest devices (2013) Generation 4 CIS */
>DEVICE ("Canon PIXMA MG6300", "MG6300", MG6300_PID, 2400, 0, 0,
> 638, 877, PIXMA_CAP_CIS),
>
>
> I compiled the patched git source and now it works perfectly:
> $ scanimage -L
> device `pixma:04A9175F_027A7C' is a CANON Canon PIXMA MP230
> multi-function peripheral
>
> I've scanned color and BW up to 600dpi without a problem.
>
> The only thing I'm not sure about is the max resolution - the official
> site says "600x1200dpi" so I wrote 600 in the backend.
>
> I hope my experience will be helpful.
>
> Cheers,
> Petar




[sane-devel] Canon PIXMA MG6350

2013-03-20 Thread Rolf Bensch
Hi Theo,

Please check the other bytes. Here is an example from MG6200:

/* button no. in buf[7]
 * size in buf[10] 01=A4; 02=Letter; 08=10x15; 09=13x18; 0b=auto
 * format in buf[11] 01=JPEG; 02=TIFF; 03=PDF; 04=Kompakt-PDF
 * dpi in buf[12] 01=75; 02=150; 03=300; 04=600
 * target = format; original = size */

If you like, you can try to implement the byte settings by yourself and
provide the diff to the ml. This must be implemented in file
pixma_mp150.c in function handle_interrupt(). You can use the if
statement for MG6200 as template.

On the other hand you can send the byte settings to me and I'll
implement it.

Cheers,
Rolf



Am 19.03.2013 22:39, schrieb Theo:
> Hi again Rolf,
> 
> I cannot reproduce the error right now; scanning works fine both via
> both USB and network. I'm testing with scanimage going forward :-)
> Whenever the problem re-occurs, I'll try to gather the debug info per
> your instructions.
> 
> I'll also look into the scanner daemon; this is the debug output when I
> use the button Scan --> Black
> 
> ...
>   Buttons:
> --button-update
> Update button state
> [pixma] INTR T=1.045 len=32
> [pixma]  :00 00 00 00 01 01 03 02  01 00 00 00 00 00 00 00
> [pixma]  0010:00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
> [pixma]
> --button-1  [0] [read-only]
> Button 1
> ...
> 
> With Scan --> Color byte 7 changes from '02' to '01'
> 
> I hope this is helpful.
> 



[sane-devel] Canon PIXMA MG6350

2013-03-19 Thread Rolf Bensch
Hi Theo,

Please test the same issue with scanimage.

(1) search your scanner: 'scanimage -L'
(2) scan via each interface with option '-d', e.g. 'scanimage -d
"pixma:04A91908" > test.pnm' (this is my scanner's usb-id, replace it
with one by one you found in (1)).

If you'll find problems with scanimage, these come from SANE. Please
mention that XSANE is 3rd party software and report problems there.

You can also check the behaviour of your scanner's push buttons with (1)
push any button and (2) 'scanimage -A'.

If you'll have problems here, please enable debug output with 'export
SANE_DEBUG_PIXMA=11' and provide the output here. The debug output can
look like this, inlined in the respond from scanimage:

  Buttons:
--button-update
Update button state
[pixma] INTR T=1.661 len=32
[pixma]  :00 20 00 00 00 00 00 00  00 00 00 00 00 00 00 00
[pixma]  0010:00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
[pixma]
--button-1  [1] [read-only]
Button 1
--button-2  [0] [read-only]
Button 2
--original  [0] [read-only]
Type of original to scan
--target  [2] [read-only]
Target operation type

If your push buttons are detected by SANE, you can also use scanbd:
http://lists.alioth.debian.org/pipermail/sane-devel/2013-January/030828.html.

Cheers,
Rolf



Am 18.03.2013 23:20, schrieb Theo:
> Hi Rolf,
> 
> I assumed xsane keeps an 'open connection' once the device is selected.
> To get the scanner to work I:
> 1 stopped xsane
> 2 unplugged the network cable from the scanner
> 3 tried to scan via USB without result
> 4 turned the scanner off and on again
> 5 did a successful scan via USB
> 
> After this I plugged in the network cable, stopped & started xsane and
> was still able to scan via USB.
> 
> I then rebooted my PC (while the scanner had both USB & network
> connected) and the scan via USB failed again.
> 
> For some reason, right now, both scanning via USB and the network work fine.
> 
> Do you know if there is an open bug for this issue?
> 
> 
> -- 
> Kind regards, /Theo van Rijn/



[sane-devel] Canon PIXMA MG6350

2013-03-18 Thread Rolf Bensch
Hi Theo,

xsane only looks for connected devices at program start. If you
disconnect the device while xsane is running, this breaks the connection
and you must restart xsane.

Cheers,
Rolf

Am 18.03.2013 00:21, schrieb Theo:
> Hi Rolf,
> 
> you are right; after I disconnected (and power cycled) the device, USB
> scanning worked again. It continued to work, also after I reconnected
> the network and restarted xsane. Can you tell if this is a bug or a
> feature?
> 



[sane-devel] Canon PIXMA MG6350

2013-03-17 Thread Rolf Bensch
Hi Theo,

Maybe you need to disconnect your device from ethernet before you can
scan at usb.

Cheers,
Rolf


Am 17.03.2013 11:02, schrieb Theo:
> Hi Rolf,
> 
> I did a fresh install from GIT again and the scanning does work. I did
> find an issue: scanning over ethernet (bjnp://) works fine but over USB
> doesn't. This is the debug output when I select the USB connection:
> 
> $ xsane
> [sanei_debug] Setting debug level of pixma to 3.
> [pixma] pixma is compiled without pthread support.
> [pixma] pixma version 0.17.2
> [pixma] pixma_collect_devices() found Canon PIXMA MG6300 at libusb:001:007
> [pixma] Scanner model found: Name MG6300(Canon PIXMA MG6300) matches
> MG6300 series
> [pixma] pixma_collect_devices() found Canon PIXMA MG6300 at
> bjnp://canon-printer.x.x:8612
> [pixma] pixma_find_scanners() found 2 devices
> [pixma] pixma_collect_devices() found Canon PIXMA MG6300 at libusb:001:007
> [pixma] Scanner model found: Name MG6300(Canon PIXMA MG6300) matches
> MG6300 series
> [pixma] pixma_collect_devices() found Canon PIXMA MG6300 at
> bjnp://canon-printer.x.x:8612
> [pixma] pixma_open(): Canon PIXMA MG6300
> [pixma] Sending time: '13/03/17 10:45'
> [pixma] No response yet. Timed out in 8 sec.
> [pixma] No response yet. Timed out in 7 sec.
> [pixma] No response yet. Timed out in 6 sec.
> [pixma] No response yet. Timed out in 5 sec.
> [pixma] No response yet. Timed out in 4 sec.
> [pixma] No response yet. Timed out in 3 sec.
> [pixma] No response yet. Timed out in 2 sec.
> [pixma] No response yet. Timed out in 1 sec.
> [pixma] WARNING: Error in response phase. cmd:eb80
> [pixma]   If the scanner hangs, reset it and/or unplug the USB cable.
> 
> 
> I'll be doing some more debugging on this later today.
> 
> BTW: printing over USB works fine; it? apparently not the USB stack that
> gives issues.
> 



[sane-devel] Canon PIXMA MG6350

2013-03-15 Thread Rolf Bensch
Hi Theo,

I just committed the complete patch to git.

Please checkout the latest version from git or download daily git
snapshot tomorrow and test again.

Many thanks for your help.

Cheers,
Rolf


Am 15.03.2013 21:22, schrieb Theo:
> Hi Rolf,
> 
> The your patch works like a charm. I don't know if a status change is
> only depending on my testing but this patch summarizes my results:
> 
> diff --git a/doc/descriptions/pixma.desc b/doc/descriptions/pixma.desc
> index 3f0ba3e..dc3f3cc 100644
> --- a/doc/descriptions/pixma.desc
> +++ b/doc/descriptions/pixma.desc
> @@ -90,6 +90,12 @@
>  :status :complete
>  :comment "All resolutions supported (up to 4800 DPI)"
>  
> +:model "PIXMA MG6300 Series"
> +:interface "USB Ethernet"
> +:usbid "0x04a9" "0x1765"
> +:status :complete
> +:comment "All resolutions supported (up to 2400DPI)."
> +
>  :model "PIXMA MG8100 Series"
>  :interface "USB"
>  :usbid "0x04a9" "0x174b"
> 
> Thanks a lot for your help!
> 
> Op 15-03-13 17:05, Rolf Bensch schreef:
>> Hi Theo,
>>
>> Many thanks for reporting new Canon Pixma MG6350.
>>
>> I added 2 patch files:
>>
>> (1) pixma_mp150.c.diff0: This is your patch. Please note that the
>> MG6350 scans up to 2400 x 4800 dpi. SANE supports only symmetric scan
>> resolutions. So the MG6350 should support up to 2400 x 2400 dpi.
>>
>> (2) pixma_mp150.c.diff1: This should fix scan problems for 1200 dpi
>> and 2400 dpi. I assume that the MG6350 has the same behaviour as the
>> MG5350.
>>
>> Please report if patch (2) fixes your scan problems.
>>
>> Cheers,
>> Rolf
>>
>>
>> Am 15.03.2013 00:13, schrieb Theo:
>>> I have a Canon PIXMA MG6350 connected via USB and Ethernet. This model is 
>>> not yet listed in the supported devices and I gladly help to promote it to 
>>> status complete.
>>>
>>> This is the info I have so far:
>>>
>>> $ scanimage -L
>>> device `pixma:MG6300_192.168.1.4' is a CANON Canon PIXMA MG6300 
>>> multi-function peripheral
>>> device `pixma:04A91765_20A814' is a CANON Canon PIXMA MG6300 multi-function 
>>> peripheral
>>>
>>> $ lsusb
>>> Bus 001 Device 005: ID 04a9:1765 Canon, Inc. 
>>>
>>> I did a beginners attempt to patch the pixma backend by copying these lines 
>>> of the MG4200:
>>>
>>> diff --git a/backend/pixma_mp150.c b/backend/pixma_mp150.c
>>> index 376623c..14e9433 100644
>>> --- a/backend/pixma_mp150.c
>>> +++ b/backend/pixma_mp150.c
>>> @@ -185,6 +185,7 @@
>>>  #define MX890_PID 0x175E
>>>  #define E600_PID 0x175A
>>>  #define MG4200_PID 0x1763
>>> +#define MG6300_PID 0x1765
>>>  
>>>  
>>>  /* Generation 4 XML messages that encapsulates the Pixma protocol messages 
>>> */
>>> @@ -1707,6 +1708,7 @@ const pixma_config_t pixma_mp150_devices[] = {
>>>DEVICE ("Canon PIXMA MX890 Series", "MX890", MX890_PID, 2400, 0, 0, 638, 
>>> 877, PIXMA_CAP_CIS | PIXMA_CAP_ADFDUP),
>>>DEVICE ("Canon PIXMA E600 Series",  "E600",  E600_PID,  1200, 0, 0, 638, 
>>> 877, PIXMA_CAP_CIS | PIXMA_CAP_ADF),
>>>DEVICE ("Canon PIXMA MG4200", "MG4200", MG4200_PID, 1200, 0, 0, 638, 
>>> 877, PIXMA_CAP_CIS),
>>> +  DEVICE ("Canon PIXMA MG6300", "MG6300", MG6300_PID, 1200, 0, 0, 638, 
>>> 877, PIXMA_CAP_CIS),
>>>  
>>>END_OF_DEVICE_LIST
>>>  };
>>>
>>> With this update, I can scan images up to 600 dpi OK, at 1200 pdi, the 
>>> resulting image is distorted.
>>>
>>> I hope this is helpful. 
>>> -- 
>>> Kind regards, /Theo van Rijn/
>>
> -- 
> Met een vriendelijke groet, /Theo van Rijn/



[sane-devel] Canon PIXMA MG6350

2013-03-15 Thread Rolf Bensch
Hi Theo,

Many thanks for reporting new Canon Pixma MG6350.

I added 2 patch files:

(1) pixma_mp150.c.diff0: This is your patch. Please note that the MG6350
scans up to 2400 x 4800 dpi. SANE supports only symmetric scan
resolutions. So the MG6350 should support up to 2400 x 2400 dpi.

(2) pixma_mp150.c.diff1: This should fix scan problems for 1200 dpi and
2400 dpi. I assume that the MG6350 has the same behaviour as the MG5350.

Please report if patch (2) fixes your scan problems.

Cheers,
Rolf


Am 15.03.2013 00:13, schrieb Theo:
> I have a Canon PIXMA MG6350 connected via USB and Ethernet. This model is not 
> yet listed in the supported devices and I gladly help to promote it to status 
> complete.
>
> This is the info I have so far:
>
> $ scanimage -L
> device `pixma:MG6300_192.168.1.4' is a CANON Canon PIXMA MG6300 
> multi-function peripheral
> device `pixma:04A91765_20A814' is a CANON Canon PIXMA MG6300 multi-function 
> peripheral
>
> $ lsusb
> Bus 001 Device 005: ID 04a9:1765 Canon, Inc. 
>
> I did a beginners attempt to patch the pixma backend by copying these lines 
> of the MG4200:
>
> diff --git a/backend/pixma_mp150.c b/backend/pixma_mp150.c
> index 376623c..14e9433 100644
> --- a/backend/pixma_mp150.c
> +++ b/backend/pixma_mp150.c
> @@ -185,6 +185,7 @@
>  #define MX890_PID 0x175E
>  #define E600_PID 0x175A
>  #define MG4200_PID 0x1763
> +#define MG6300_PID 0x1765
>  
>  
>  /* Generation 4 XML messages that encapsulates the Pixma protocol messages */
> @@ -1707,6 +1708,7 @@ const pixma_config_t pixma_mp150_devices[] = {
>DEVICE ("Canon PIXMA MX890 Series", "MX890", MX890_PID, 2400, 0, 0, 638, 
> 877, PIXMA_CAP_CIS | PIXMA_CAP_ADFDUP),
>DEVICE ("Canon PIXMA E600 Series",  "E600",  E600_PID,  1200, 0, 0, 638, 
> 877, PIXMA_CAP_CIS | PIXMA_CAP_ADF),
>DEVICE ("Canon PIXMA MG4200", "MG4200", MG4200_PID, 1200, 0, 0, 638, 877, 
> PIXMA_CAP_CIS),
> +  DEVICE ("Canon PIXMA MG6300", "MG6300", MG6300_PID, 1200, 0, 0, 638, 877, 
> PIXMA_CAP_CIS),
>  
>END_OF_DEVICE_LIST
>  };
>
> With this update, I can scan images up to 600 dpi OK, at 1200 pdi, the 
> resulting image is distorted.
>
> I hope this is helpful. 
> -- 
> Kind regards, /Theo van Rijn/

-- next part --
An HTML attachment was scrubbed...
URL: 

-- next part --
--- ./pixma_mp150.c 2013-03-15 16:39:01.0 +0100
+++ ../sane-backends/backend/pixma_mp150.c  2013-03-15 16:51:43.0 
+0100
@@ -186,6 +186,9 @@
 #define E600_PID 0x175A
 #define MG4200_PID 0x1763
 
+/* 2013 new devices (untested) */
+#define MG6300_PID 0x1765
+
 
 /* Generation 4 XML messages that encapsulates the Pixma protocol messages */
 #define XML_START_1   \
@@ -1708,5 +1711,8 @@
   DEVICE ("Canon PIXMA E600 Series",  "E600",  E600_PID,  1200, 0, 0, 638, 
877, PIXMA_CAP_CIS | PIXMA_CAP_ADF),
   DEVICE ("Canon PIXMA MG4200", "MG4200", MG4200_PID, 1200, 0, 0, 638, 877, 
PIXMA_CAP_CIS),
 
+  /* Latest devices (2013) Generation 4 CIS */
+  DEVICE ("Canon PIXMA MG6300", "MG6300", MG6300_PID, 2400, 0, 0, 638, 877, 
PIXMA_CAP_CIS),
+
   END_OF_DEVICE_LIST
 };
-- next part --
--- ./pixma_mp150.c 2013-03-15 16:55:21.0 +0100
+++ ../sane-backends/backend/pixma_mp150.c  2013-03-15 16:55:34.0 
+0100
@@ -1102,7 +1102,7 @@
   /* Color plane and stripes shift needed by e.g. CCD */
   /*PDBG (pixma_dbg (4, "*post_process_image_data* Processing with 
c=%u, n=%u, m=%u, w=%i, line_size=%u * \n",
c, n, m, s->param->wx, line_size));*/
-  if (s->cfg->pid != MG5300_PID && c >= 3)
+  if (s->cfg->pid != MG5300_PID && s->cfg->pid != MG6300_PID && c >= 3)
 dptr = shift_colors (dptr, sptr, 
  s->param->wx, s->param->xdpi, s->cfg->pid, c,
  mp->shift, mp->stripe_shift);
@@ -1116,7 +1116,8 @@
   && s->cfg->pid != MX890_PID
   && s->cfg->pid != MG3100_PID
   && s->cfg->pid != MG2100_PID
-  && s->cfg->pid != MG5300_PID)
+  && s->cfg->pid != MG5300_PID
+  && s->cfg->pid != MG6300_PID)
   reorder_pixels (mp->linebuf, sptr, c, n, m, s->param->wx, 
line_size);
   
   /* Crop line to selected borders */


[sane-devel] Reflecta ProScan / Crystalscan 7200 PIE film scanner update

2013-03-12 Thread Rolf Bensch
Hi,

Am 11.03.2013 15:16, schrieb Paul Menzel:
> Dear Klaus,
>
>
> Am Freitag, den 08.03.2013, 17:10 +0100 schrieb Klaus Kaempf:
>
>> * Paul Menzel  [Mar 04. 2013 10:34]:
>>> In my opinion, before committing this upstream you could squash several
>>> commits into the original one (as it is not upstream yet). That will
>>> keep the commit log cleaner.
>> sure, no problem. What's the usual process for getting code upstream ?
> I am also new to SANE. But sending your patches to the list for review
> and providing a branch to pull from is good way I think.
>
>> Are there any coding style guidelines for SANE ?
> They are not documented I think. At least I have not found them. You can
> only look at already existing files.

Please have a look here: http://www.sane-project.org/backend-writing.txt.

I found this link here: http://www.sane-project.org/contrib.html.

>
>>> If you have even more time and as you found some small errors already
>>> and fixed them, you could run Cppcheck and splint on your code (and
>>> mention that in the commit message).
>> My primary goal, besides getting running code, is to make the code
>> clean and maintanable. These tools will certainly help, thanks !
> Awesome!
>
>
> Thanks,
>
> Paul

Cheers,
Rolf



[sane-devel] Need Help with PIXMA MX432

2013-03-04 Thread Rolf Bensch
Hi Charles,

First you need to install a recent copy of SANE. You can find a
step-by-step install description in README.linux:
http://www.sane-project.org/README.linux.

In (3.) you can reduce compiling time with: 'BACKENDS="pixma" ./configure'.

If you like to use a gui, you can install and use xsane.

Then start with test scans. I guess that your scanner should scan all
resolutions up to 600dpi out of the box with the recent copy of SANE.
1200dpi scans might be buggy.

Cheers,
Rolf


Am 04.03.2013 06:11, schrieb Charles Reese:
> I have a Canon PIXMA MX432 connected via USB. The man page says
> untested. I'm willing to test if you all help me out.
> 
> $ scanimage -L
> 
> device `v4l:/dev/video0' is a Noname Built-in iSight virtual device
> device `pixma:04A9175B_200E26' is a CANON Canon PIXMA MX430 Series
> multi-function peripheral
> 
> $ scanimage -d pixma:04A9175B_200E26 --format=tiff > test.tiff
> 
> scanimage: open of device pixma:04A9175B_200E26 failed: Operation not
> supported
> 
> That's as far as I got.
> 
> I'm running Arch Linux on a MacBook 5,1.



[sane-devel] SANE installation description

2013-03-01 Thread Rolf Bensch
The file was updated.

Rolf


Am 01.03.2013 14:45, schrieb m. allan noah:
> I ran the website update script. Please verify that it was updated.
> Previously, the webserver and the git server were the same machine, so
> this process was automatic. Then the server was split. I am not sure
> what the current status is, but I will look into it.
> 
> allan
> 
> On Thu, Feb 28, 2013 at 1:42 PM, Rolf Bensch  wrote:
>> Hi List,
>>
>> I just eased the SANE installation description in README.linux.
>>
>> There was a problem with the created symbolic links. A distribution
>> upgrade could reset them to the original values.
>>
>> Now I described how to use ldconfig to set /usr/local/lib as preferred
>> libs folder.
>>
>> Cheers,
>> Rolf
>>
>> --
>> sane-devel mailing list: sane-devel at lists.alioth.debian.org
>> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
>> Unsubscribe: Send mail with subject "unsubscribe your_password"
>>  to sane-devel-request at lists.alioth.debian.org
> 
> 
> 



<    1   2   3   4   5   >