SCM

[#313674] Canon i-Sensys 4550d unsupported

View Trackers | Bugs | Export CSV

Date:
2012-06-09 05:48
Priority:
3
State:
Closed
Submitted by:
Alex Gousev (exalax-guest)
Assigned to:
Rolf Bensch (roben-guest)
Category:
backends (drivers)
Group:
wishlist
Resolution:
None
Summary:
Canon i-Sensys 4550d unsupported

Detailed description
root@srv:~# sane-find-scanner

# sane-find-scanner will now attempt to detect your scanner. If the
# result is different from what you expected, first make sure your
# scanner is powered up and properly connected to your computer.

# No SCSI scanners found. If you expected something different, make sure that
# you have loaded a kernel SCSI driver for your SCSI adapter.

found USB scanner (vendor=0x04a9 [Canon Inc], product=0x2736 [MF4550d]) at libusb:001:003
# Your USB scanner was (probably) detected. It may or may not be supported by
# SANE. Try scanimage -L and read the backend's manpage.

# Not checking for parallel port scanners.

# Most Scanners connected to the parallel port or other proprietary ports
# can't be detected by this program.



root@srv:~# scanimage -L

No scanners were identified. If you were expecting something different,
check that the scanner is plugged in, turned on and detected by the
sane-find-scanner tool (if appropriate). Please read the documentation
which came with this software (README, FAQ, manpages).

Followups: Sort comments antichronologically

Message
Date: 2012-06-15 07:14
Sender: Rolf Bensch

Can you sniff a 5mm x 5mm scan on a Windows machine?
Date: 2012-06-15 07:36
Sender: Alex Gousev

I am sorry, what do you mean "sniff": image or usb "traffic".

Please tell me how can I do that.
Date: 2012-06-16 12:03
Sender: Rolf Bensch

Please sniff the usb traffic on a Windows machine. To reduce the log file size scan a small area of approx. 5 x 5 mm. Usually I am using wireshark for such jobs.
Date: 2012-07-24 14:22
Sender: Alex Gousev

I'm sorry for delay.

I install winxp in virtualbox and run snoopypro.

Thank you for your patience.
Date: 2012-10-13 15:03
Sender: Rolf Bensch

I am sorry for the delay. I didn't recognized that you already uploaded a log file.

Are you sure that you logged a complete scan? Please start logging before you start the windows scanner app, setup and scan a 5mm x 5mm image and stop the log after viewing the scanned image in any windows app.

If possible please use this software on your windows vm: http://benoit.papillault.free.fr/usbsnoop/. We have a parser for analysing the logfile from this usb sniffer.

Thanks.
Date: 2012-11-15 10:57
Sender: Vasyĺ Vercynśkyj

What's news? I have got this device and could provide anybody with a bunch of sniffs (if this help to resolve the bug).
Date: 2012-11-16 15:39
Sender: Rolf Bensch

Hi Vasyĺ, No news yet.

Please sniff the complete usb protocol from a 5 mm x 5 mm scan on a windows machine with usbsnoop.
Date: 2012-11-17 17:05
Sender: Vasyĺ Vercynśkyj

I've made some sniffs, but I could not find a way to attach them
Date: 2012-11-17 18:52
Sender: Rolf Bensch

(1) Write your comment, e.g. some short description of your files.
(2) Select the tab "Attachments" and then attach your files.
(3) Save your comment and upload your files with the button "Save Changes".
Date: 2012-11-18 13:03
Sender: Vasyĺ Vercynśkyj

That is the problem. There are now any boxes, buttons or something else to put pathname of uploading file on the tab "Attachments". Just "mf4550d.usblog" there. (I've tried from different web-browsers.)
Date: 2012-11-18 18:09
Sender: Rolf Bensch

Please see the attached screenshots.
Date: 2012-11-18 18:50
Sender: Vasyĺ Vercynśkyj

http://i.imgur.com/G71cs.jpg
Date: 2012-11-18 19:18
Sender: Rolf Bensch

Sorry, you need to google your problem.

In the meantime you can provide the log files on your own website, if you like.
Date: 2012-11-18 19:23
Sender: Rolf Bensch

Or you can send them to my email address: roben-guest at alioth.debian.org
Date: 2012-11-23 12:58
Sender: Rolf Bensch

I added a patch (pixma_imageclass.c.diff.1) for imageclass.c based on the latest git version.

Please patch imageclass.c with this command:

patch imageclass.c pixma_imageclass.c.diff.1

and try to scan.

If the first scan works, please also try all other of the available scan options (b/w, colour, ADF).

The code may be buggy. If so, please provide some debug info from the console enabled by: 'export SANE_DEBUG_PIXMA=11'.
Date: 2012-11-23 23:20
Sender: Rolf Bensch

Sorry, please patch pixma_imageclass.c with this command:

patch pixma_imageclass.c pixma_imageclass.c.diff.1
Date: 2012-11-30 12:39
Sender: Vasyĺ Vercynśkyj

It works but with some issues:

1. Permissions problems. Thinks this lines should be added to /lib/udev/rules.d/40-libsane.rules:
# Canon imageCLASS MF4550
ATTRS{idVendor}=="04a9", ATTRS{idProduct}=="2736", ENV{libsane_matched}="yes"

2. Scanning a A4 format documents gives “white” borders on top and left sides and bottom (document placed between A4 markers).

3. First attempt to scan from Automatic document feeder return “no paper” error (ENO_PAPER). And after successful scanning from flatbed, batch scanning from ADF gives only first page, (returns EBUSY error).

Rolf, due to the bug with adding of attachments, I've send examples of scanned documents and logs on your email.
Date: 2012-12-03 20:17
Sender: Rolf Bensch

OK, you needed to add the scanner to 40-libsane.rules.

Before we need to look for borders and the ADF, does the Scanner scan images in all resolutions from 75 dpi to 600 dpi, in color and grayscale?

Maybe you can reduce the borders by changing the 'w' and 'h' parameters in the device definition: 'DEV ("Canon i-SENSYS MF4550d", "MF4550", MF4550_PID, 600, 640, 877, PIXMA_CAP_ADF),'. The used settings are 'w = 640 pixels' and 'h = 877 pixels'.

Sorry, but I cannot help with the ADF problem. I haven't any imageCLASS scanner with ADF.
Date: 2013-01-07 20:56
Sender: Vasyĺ Vercynśkyj

> Before we need to look for borders and the ADF, does the Scanner scan
> images in all resolutions from 75 dpi to 600 dpi, in color and grayscale?
Yes, it does, but with the same borders.

> Maybe you can reduce the borders by changing the 'w' and 'h' parameters
> in the device definition: 'DEV ("Canon i-SENSYS MF4550d", "MF4550",
> MF4550_PID, 600, 640, 877, PIXMA_CAP_ADF),'. The used settings are 'w > = 640 pixels' and 'h = 877 pixels'.
If you explain me what these parameters mean…

> Sorry, but I cannot help with the ADF problem. I haven't any imageCLASS
> scanner with ADF.
Very bad news! Batch scanning is the main purpose of buying of the device. And his predecessor (MF4350d) did this perfectly.
I've sent you sniff of batch scanning from ADF, maybe it will help you to find the problem out.
Date: 2013-01-11 16:34
Sender: Rolf Bensch

Do you still see the borders if you scan a small area from an image?

The scan area is defined inside pixma_imageclass.c with this definition:
'DEV ("Canon i-SENSYS MF4550d", "MF4550", MF4550_PID, 600, 640, 877, PIXMA_CAP_ADF),'
with scan area width = 640 px
and scan area height = 877 lines.
Both values are calculated for 75 dpi!

If you want e.g. to change the width to 639 px and the height to 876 lines the definition must look like:
'DEV ("Canon i-SENSYS MF4550d", "MF4550", MF4550_PID, 600, 639, 876, PIXMA_CAP_ADF),'

I'll check the log file for the ADF problem later.
Date: 2013-01-15 12:32
Sender: Rolf Bensch

Please fetch the latest sane version from git and patch pixma_imageclass.c with pixma_imageclass.c.diff2.

This patch should fix the ADF bug.

Please try following scans:
- single sheet from flatbed
- single sheet from adf, no sheet inserted
- single sheet from adf
- 2+ sheets from adf

If some of the scans are still buggy, please create logfiles with 'export SANE_DEBUG_PIXMA=11'. If possible please reduce the size of the logfiles by scanning a small area of approx. 5mm x 5mm.
Date: 2013-01-21 11:32
Sender: Rolf Bensch

Please patch existing pixma_imgaclass.c with pixma_imgaclass.c.diff3 and existing pixma_common.c with pixma_common.c.diff3 and try to scan 2 pages from adf again.

If this is working, please try to scan single / multiple pages from ADF and flatbed in changing order.

If some of the scans are still buggy, please create logfiles with 'export SANE_DEBUG_PIXMA=11'. If possible please reduce the size of the logfiles by scanning a small area of approx. 5mm x 5mm.
Date: 2013-01-22 18:18
Sender: Rolf Bensch

Patched pixma_imageclass.c is OK. Please patch pixma_common.c with pixma_common.c.diff3!

Then try scanning again. There is an unknown paper status (16) (jam?). It must be (0) for adf paper empty and (1) for adf paper ok. Maybe you need to insert and remove a sheet of paper from adf to reset this status.
Date: 2013-01-22 21:22
Sender: Rolf Bensch

Please patch existing pixma_imageclass.c with pixma_imageclass.c.diff4.

This patch handles unknown adf paper error (16) as adf paper OK (0).
Date: 2013-02-08 17:35
Sender: Rolf Bensch

Any report on testing?

If everything is working now, I can close this bug report *and* commit the patch to git.
Date: 2013-02-11 07:31
Sender: Vasyĺ Vercynśkyj

Sorry for delay. I got a lot of work to do.
ADF scanning issue is solved, but issue with adjusting of scan area is not. I need a little more time to define it. Hope to finish it this week.
Date: 2013-02-11 19:23
Sender: Rolf Bensch

I just committed the ADF empty patch to git.
Date: 2013-03-03 15:11
Sender: Vasyĺ Vercynśkyj

According to 'scanimage --help -d' the device has the next geometry:
Geometry:
-l auto|0..216.747mm [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.747mm [216.747]
Width of scan-area.
-y auto|0..297.011mm [297.011]
Height of scan-area.
But:
1. Full area scanning gives two 2mm white stripes on top and bottom of the image.
2. A4 document scanning (-x 210 -y 297) is shifted at 3 mm along X-axis,
AND if you try to fix it using '-l 3' option, you got the device crashed (device asks for rebooting and console debug shows endless scanning).
Until you decrease width of scan area to 206 mm. But in this way 4 mm of scan area is lost.

Rolf, I've send examples of scanned documents on your email.
Date: 2013-03-03 18:30
Sender: Rolf Bensch

Please create some log files from test scans on a Linux (SANE) machine and on a Windows machine:
(1) whole scan area
(2) a4 size at position 0,0
(3) small area anywhere in the scan area, but at the same position for SANE and Windows.

I'm primary interested in the command which starts with 'de20' (scan parameters), but you can send the complete log files.

Please enable debug output for SANE with: 'export SANE_DEBUG_PIXMA=11'.
Date: 2013-03-09 19:15
Sender: Vasyĺ Vercynśkyj

Where are Windows there are troubles! I'd spent many hours just to find gui o cli application for scanning with parameters I need. And I didn't find :)
That's why small area in Windows is scanned with 5 mm 'x' an 'y' shift a little roughly.
As it has appeared Windows scanning gives white stripes.

I've send scans and logs to your mail.
Date: 2013-03-15 16:26
Sender: Rolf Bensch

I found a difference between Windows and SANE scans for A4: Windows crops 9 pixels of the x-coordinate.

Please try to define your own A4 source in xsane. You can find some predefined image sizes in a drop down menu in the prescan window.

I think we shouldn't crop the white lines on top and bottom of the image.

But we can do. Then please determine the number of pixel lines to crop on top and bottom of the image @ 75 dpi. You can simply count them in a PNM image. And please check if the number of while lines is exact multiplied for higher resolutions, eg. x2 for 150 dpi and x8 for 600 dpi. Otherwise we'll crop real image data.

Date: 2013-03-16 14:23
Sender: Vasyĺ Vercynśkyj

> Please try to define your own A4 source in xsane. You can find some predefined image sizes in a drop down menu in the prescan window.
>
What do you mean?
If I select predefine A4 scan size in prescan window, I get the same result as from command line (scanimage -x 210 -y 297) with the wrong shift.

> I think we shouldn't crop the white lines on top and bottom of the image.
>
These white lines are trouble me less then the device is crushing after attempt to scan the custom area more then 206 mm wide (when the x limit is 216 mm).
And I think if Windows has the same white lines, this is the bug of the device's firmware, while crushing is sane's bug.

> But we can do. Then please determine the number of pixel lines to crop on top and bottom of the image @ 75 dpi. You can simply count them in a PNM image. And please check if the number of while lines is exact multiplied for higher resolutions, eg. x2 for 150 dpi and x8 for 600 dpi. Otherwise we'll crop real image data.
>
75 dpi -- 4 pixels
150 dpi -- 9 pixels
300 dpi -- 18 pixels
600 dpi -- 36 pixels
Date: 2013-03-18 09:59
Sender: Rolf Bensch

> If I select predefine A4 scan size in prescan window, I get the same result as from command line (scanimage -x 210 -y 297) with the wrong shift.

SANE and xsane define top left of an image at (0,0). Your scanner centers the images. So you must define your own image size templates in xsane: (1) scan an image with full scan area, (2) mark your image size and (3) open drop down menu for pre defined image sizes and add your image size define with right mouse button.

> the device is crushing after attempt to scan the custom area more then 206 mm wide (when the x limit is 216 mm)

I'll send a patch later.
Date: 2013-03-18 11:14
Sender: Rolf Bensch

Please patch pixma_imageclass.c with pixma_imageclass.c.diff5. The patch is based on the recent SANE git version.

I added an offset to the x coordinate, so that the scan line won't exceed the scan area any more. The scan line size is a multiple of 32 pixels.

And I cleaned up some parameter calculations. This is for code sanity.
Date: 2013-03-18 20:49
Sender: Vasyĺ Vercynśkyj

This is bad patch :)

The real (physical) scan area size is 216 x 297 mm
And it must be possible to scan any size area wherever within this scan area.
To scan the A4-size (210 x 297 mm) the 3 mm axis shift should be used:
scanimage -l 3 -x 210 -y 297
But this options make device crushed (patch4), if 'x' + 'l' > 206 (limit [216mm] _is_not_exceeded!!).

Patch5 make impossible to adjust scan area by millimeters (or even centimeters when 75dpi is using), though device stop crushing.
Date: 2013-03-19 07:25
Sender: Vasyĺ Vercynśkyj

Sorry, 'x' + 'l' > 206 -- is wrong equation
'x' - 'l' ≤ 216 -- is right one,
but actually:
scanimage -l 3 -x [207-213] -y 297 -- device crushing
scanimage -l 3 -x 206 -y 297 -- successful scaning
scanimage -l 4 -x [208-212] -y 297 -- device crushing
scanimage -l 4 -x 207 -y 297 -- successful scaning
scanimage -l 5 -x [209-211] -y 297 -- device crushing
scanimage -l 5 -x 208 -y 297 -- successful scaning
and so on

So the widest possible scan area, when 'l' (Top-left x position of scan area) option is specified is 'x' - 'l' = 203 mm (instead of 216 mm)
This was issue
Date: 2013-03-19 15:37
Sender: Rolf Bensch

> Patch5 make impossible to adjust scan area by millimeters (or even centimeters when 75dpi is using), though device stop crushing.

Good news! Sorry, yesterday I forgot to send Patch6 to 'crop lines to selected borders'. Hopefully I haven't messed up the image buffers.

Patch7 should crop the white top and bottom lines.

Patch6 is based on Patch5 and Patch7 is based on Patch6.
Date: 2013-03-27 19:47
Sender: Vasyĺ Vercynśkyj

We are on the wrong way.
Only full scan area can be successfully scanned.

We mustn't crop these lines, because they are allocated within the real scan area. Scanimage "told" about this cropping:
scanimage: rounded value of br-y from 297 to 295.656
Furthermore Windows has the same lines, so this is rather firmware bug then driver.

Please, let's back to the patch4 and try to fix device crushing that is expounded in my previous messages.
Date: 2013-03-28 09:40
Sender: Rolf Bensch

Then please ignore Patch7 and try Patch5 and Patch6.

Patch5 fixes device crushing and
Patch6 crops lines to selected borders.
Date: 2013-05-04 07:25
Sender: Rolf Bensch

Any news on testing?
Date: 2013-05-11 13:18
Sender: Vasyĺ Vercynśkyj

We sold the device and bought Brother..
Date: 2014-08-15 20:20
Sender: Rolf Bensch

Please reopen the bug report, if needed.

Attached Files:

Attachments:
Size Name Date By Download
282 KiBmf4550d.usblog2012-07-24 14:22exalax-guestmf4550d.usblog
109 KiBfollowups.png2012-11-18 18:09roben-guestfollowups.png
82 KiBattachments.png2012-11-18 18:09roben-guestattachments.png
39 KiBsavechanges.png2012-11-18 18:09roben-guestsavechanges.png
97 KiBCANON_i-SENSYS_MF4550d_sniffs.tar.gz2012-11-23 12:58roben-guestCANON_i-SENSYS_MF4550d_sniffs.tar.gz
3 KiBpixma_imageclass.c.diff.12012-11-23 12:58roben-guestpixma_imageclass.c.diff.1
1.48 MiBCANON-MF4550_-_batch_scan_A4_colour_300dpi_25.4x25.4mm_usbsnoop.log.gz2013-01-11 16:34roben-guestCANON-MF4550_-_batch_scan_A4_colour_300dpi_25.4x25.4mm_usbsnoop.log.gz
3 KiBpixma_imageclass.c.diff22013-01-15 12:32roben-guestpixma_imageclass.c.diff2
42 KiBMF4550d_sniffs.tar.gz2013-01-21 11:32roben-guestMF4550d_sniffs.tar.gz
473 bytespixma_common.c.diff32013-01-21 11:32roben-guestpixma_common.c.diff3
1 KiBpixma_imageclass.c.diff32013-01-21 11:32roben-guestpixma_imageclass.c.diff3
385 bytespixma_imageclass.c.diff42013-01-22 21:22roben-guestpixma_imageclass.c.diff4
7 KiBCANON-MF4550_-_[diff3].gz2013-01-22 21:22roben-guestCANON-MF4550_-_[diff3].gz
224 KiBCANON-MF4550_-_full-scan-area_75dpi.jpg2013-03-15 16:12roben-guestCANON-MF4550_-_full-scan-area_75dpi.jpg
212 KiBCANON-MF4550_-_A4(210x297)_75dpi.jpg2013-03-15 16:12roben-guestCANON-MF4550_-_A4(210x297)_75dpi.jpg
413 bytesCANON-MF4550_-_5x5+t5+l5_75dpi.jpg2013-03-15 16:12roben-guestCANON-MF4550_-_5x5+t5+l5_75dpi.jpg
2 KiBCANON-MF4550_-_5x5+t5+l5_75dpi.log.gz2013-03-15 16:12roben-guestCANON-MF4550_-_5x5+t5+l5_75dpi.log.gz
133 KiBCANON-MF4550_-_A4_75dpi.jpg2013-03-15 16:12roben-guestCANON-MF4550_-_A4_75dpi.jpg
28 KiBCANON-MF4550_-_A4_75dpi.log.gz2013-03-15 16:13roben-guestCANON-MF4550_-_A4_75dpi.log.gz
137 KiBCANON-MF4550_-_full-scan-area_75dpi.jpg2013-03-15 16:13roben-guestCANON-MF4550_-_full-scan-area_75dpi.jpg
28 KiBCANON-MF4550_-_full-scan-area_75dpi.log.gz2013-03-15 16:13roben-guestCANON-MF4550_-_full-scan-area_75dpi.log.gz
738 byteswinCANON-MF4550_-_5x5+t5+l5_75dpi.jpg2013-03-15 16:13roben-guestwinCANON-MF4550_-_5x5+t5+l5_75dpi.jpg
73 KiBwinCANON-MF4550_-_5x5+t5+l5_75dpi.log.gz2013-03-15 16:13roben-guestwinCANON-MF4550_-_5x5+t5+l5_75dpi.log.gz
175 KiBwinCANON-MF4550_-_A4_75dpi.jpg2013-03-15 16:14roben-guestwinCANON-MF4550_-_A4_75dpi.jpg
162 KiBwinCANON-MF4550_-_full-scan-area_75dpi.jpg2013-03-15 16:14roben-guestwinCANON-MF4550_-_full-scan-area_75dpi.jpg
2 KiBpixma_imageclass.c.diff52013-03-18 11:14roben-guestpixma_imageclass.c.diff5
1 KiBpixma_imageclass.c.diff62013-03-19 15:37roben-guestpixma_imageclass.c.diff6
1 KiBpixma_imageclass.c.diff72013-03-19 15:37roben-guestpixma_imageclass.c.diff7

Changes:

Field Old Value Date By
ResolutionLater2014-08-15 20:27roben-guest
status_idOpen2014-08-15 20:20roben-guest
close_dateNone2014-08-15 20:20roben-guest
ResolutionNone2014-08-15 20:20roben-guest
File Added5613: pixma_imageclass.c.diff62013-03-19 15:37roben-guest
File Added5614: pixma_imageclass.c.diff72013-03-19 15:37roben-guest
File Added5606: pixma_imageclass.c.diff52013-03-18 11:14roben-guest
File Added5603: winCANON-MF4550_-_full-scan-area_75dpi.jpg2013-03-15 16:14roben-guest
File Added5602: winCANON-MF4550_-_A4_75dpi.jpg2013-03-15 16:14roben-guest
File Added5597: CANON-MF4550_-_A4_75dpi.log.gz2013-03-15 16:13roben-guest
File Added5598: CANON-MF4550_-_full-scan-area_75dpi.jpg2013-03-15 16:13roben-guest
File Added5599: CANON-MF4550_-_full-scan-area_75dpi.log.gz2013-03-15 16:13roben-guest
File Added5600: winCANON-MF4550_-_5x5+t5+l5_75dpi.jpg2013-03-15 16:13roben-guest
File Added5601: winCANON-MF4550_-_5x5+t5+l5_75dpi.log.gz2013-03-15 16:13roben-guest
File Added5596: CANON-MF4550_-_A4_75dpi.jpg2013-03-15 16:12roben-guest
File Added5592: CANON-MF4550_-_A4(210x297)_75dpi.jpg2013-03-15 16:12roben-guest
File Added5593: CANON-MF4550_-_full-scan-area_75dpi.jpg2013-03-15 16:12roben-guest
File Added5594: CANON-MF4550_-_5x5+t5+l5_75dpi.jpg2013-03-15 16:12roben-guest
File Added5595: CANON-MF4550_-_5x5+t5+l5_75dpi.log.gz2013-03-15 16:12roben-guest
File Added5332: CANON-MF4550_-_[diff3].gz2013-01-22 21:22roben-guest
File Added5333: pixma_imageclass.c.diff42013-01-22 21:22roben-guest
File Added5327: MF4550d_sniffs.tar.gz2013-01-21 11:32roben-guest
File Added5328: pixma_common.c.diff32013-01-21 11:32roben-guest
File Added5329: pixma_imageclass.c.diff32013-01-21 11:32roben-guest
File Added5256: pixma_imageclass.c.diff22013-01-15 12:32roben-guest
File Added5252: CANON-MF4550_-_batch_scan_A4_colour_300dpi_25.4x25.4mm_usbsnoop.log.gz2013-01-11 16:34roben-guest
File Added5210: pixma_imageclass.c.diff.12012-11-23 12:58roben-guest
File Added5209: CANON_i-SENSYS_MF4550d_sniffs.tar.gz2012-11-23 12:58roben-guest
File Added5200: followups.png2012-11-18 18:09roben-guest
File Added5201: attachments.png2012-11-18 18:09roben-guest
File Added5202: savechanges.png2012-11-18 18:09roben-guest
File Added4903: mf4550d.usblog2012-07-24 14:22exalax-guest
assigned_tonone2012-06-15 07:14roben-guest
Powered By FusionForge