[sane-devel] canon pixma MX890 ADF empty test OK
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] canon pixma MX890 ADF empty test OK
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, -- next part -- A non-text attachment was scrubbed... Name: pixma_mp150.c.diff Type: text/x-patch Size: 2334 bytes Desc: not available URL: http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20130620/68bfde6c/attachment.bin
[sane-devel] canon pixma MX890 ADF empty test issues
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 henry at logout.com 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
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] canon pixma MX890 ADF empty test OK
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 henry at logout.com 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 -- The truth is an offense, but not a sin
[sane-devel] canon pixma MX890 ADF empty test issues
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 henry at logout.com 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
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 pixma MX890 ADF empty test OK
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
On Wed, 2013-05-22 at 14:53 -0700, Tim wrote: 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 Ar you scanning over the network. It would be worth testing the USB interface first. And if you can get Rolf the logfiles of a Windows scan and the Linux scan I am sure that he will be abler to get this sorted out. This is definitely worth spending some effort for. The logfile you show here may be pointing to a bug in the network code. In other cases I have seen a faiure to open a tcp connection, this was a bug in the network code. Did you test with the latest code from git? Could you please try the same procedure over USB (disconnect the network connection for the time being) Louis
[sane-devel] canon pixma MX890 ADF empty test OK
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, -- next part -- A non-text attachment was scrubbed... Name: pixma_ADF_empty_MX890.log Type: text/x-log Size: 6312 bytes Desc: not available URL: http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20130521/4f09dd4b/attachment.bin
[sane-devel] Canon PIXMA MX890
Hi Henry, The sense of sniffing some windows usb protocols is that we catch running protocols. With them we can walk through the source code to find the problem. It's not a problem for me to wait until you are ready. Cheers, Rolf Am 13.12.2012 21:07, schrieb Henry Ptasinski: Rolf, I don't have an XP machine up and running at the moment. I may have one in a while, but not sure when. I believe the problem occurs via both USB and network, so could this be debugged by sniffing network traffic instead (and preferably using a different OS than XP). --- Henry Ptasinski henry at logout.com On 12/07/2012 10:57 AM, Rolf Bensch wrote: Hi Henry, The backend has an ADF paper empty bug. You can try to debug this issue, if you like. The first step could be to sniff the complete usb protocol from a 5mm x 5mm ADF scan on a windows machine with usbsnoop (http://benoit.papillault.free.fr/usbsnoop/). This program is old and runs with xp only, but we have a parser for the log files (spike4.pl). Cheers, Rolf Am 05.12.2012 00:57, schrieb Henry Ptasinski: Rolf, The ADF partially works. I've been able to get simplex scans occasionally. Duplex scans so far have only yielded the front page, and some errors such as: ... [pixma] bjnp_write_bulk(0, bufferptr, 0x10 = 16) [pixma] bjnp_set_timeout to 2 [pixma] bjnp_read_bulk(0, bufferptr, 0x200 = 512) [pixma] bjnp_set_timeout to 2 [pixma] bjnp_write_bulk(0, bufferptr, 0x10 = 16) [pixma] bjnp_set_timeout to 2 [pixma] bjnp_read_bulk(0, bufferptr, 0x200 = 512) [pixma] bjnp_set_timeout to 2 [pixma] bjnp_write_bulk(0, bufferptr, 0x10 = 16) [pixma] bjnp_set_timeout to 2 [pixma] bjnp_read_bulk(0, bufferptr, 0x200 = 512) [pixma] bjnp_set_timeout to 2 [pixma] bjnp_write_bulk(0, bufferptr, 0x10 = 16) [pixma] bjnp_set_timeout to 2 [pixma] bjnp_read_bulk(0, bufferptr, 0x200 = 512) [pixma] WARNING:image size mismatches [pixma] 1678578 expected (877 lines) but 1556082 received (813 lines) [pixma] pixma_read_image(): completed (underrun detected) [pixma] sanei_bjnp_deactivate (0) [pixma] Reader task terminated [pixma] pixma_close(): Canon PIXMA MX890 Series [pixma] sanei_bjnp_close(0): [pixma] sanei_bjnp_deactivate (0) When this happens, the display on the printer continues to say Scanning document, and I'm not able to cancel out of the scan. My recent tests were via network. I'll attach the scanner via USB and try to collect some debug info. --- Henry Ptasinski henry at logout.com
[sane-devel] Canon PIXMA MX890
Rolf, I don't have an XP machine up and running at the moment. I may have one in a while, but not sure when. I believe the problem occurs via both USB and network, so could this be debugged by sniffing network traffic instead (and preferably using a different OS than XP). --- Henry Ptasinski henry at logout.com On 12/07/2012 10:57 AM, Rolf Bensch wrote: Hi Henry, The backend has an ADF paper empty bug. You can try to debug this issue, if you like. The first step could be to sniff the complete usb protocol from a 5mm x 5mm ADF scan on a windows machine with usbsnoop (http://benoit.papillault.free.fr/usbsnoop/). This program is old and runs with xp only, but we have a parser for the log files (spike4.pl). Cheers, Rolf Am 05.12.2012 00:57, schrieb Henry Ptasinski: Rolf, The ADF partially works. I've been able to get simplex scans occasionally. Duplex scans so far have only yielded the front page, and some errors such as: ... [pixma] bjnp_write_bulk(0, bufferptr, 0x10 = 16) [pixma] bjnp_set_timeout to 2 [pixma] bjnp_read_bulk(0, bufferptr, 0x200 = 512) [pixma] bjnp_set_timeout to 2 [pixma] bjnp_write_bulk(0, bufferptr, 0x10 = 16) [pixma] bjnp_set_timeout to 2 [pixma] bjnp_read_bulk(0, bufferptr, 0x200 = 512) [pixma] bjnp_set_timeout to 2 [pixma] bjnp_write_bulk(0, bufferptr, 0x10 = 16) [pixma] bjnp_set_timeout to 2 [pixma] bjnp_read_bulk(0, bufferptr, 0x200 = 512) [pixma] bjnp_set_timeout to 2 [pixma] bjnp_write_bulk(0, bufferptr, 0x10 = 16) [pixma] bjnp_set_timeout to 2 [pixma] bjnp_read_bulk(0, bufferptr, 0x200 = 512) [pixma] WARNING:image size mismatches [pixma] 1678578 expected (877 lines) but 1556082 received (813 lines) [pixma] pixma_read_image(): completed (underrun detected) [pixma] sanei_bjnp_deactivate (0) [pixma] Reader task terminated [pixma] pixma_close(): Canon PIXMA MX890 Series [pixma] sanei_bjnp_close(0): [pixma] sanei_bjnp_deactivate (0) When this happens, the display on the printer continues to say Scanning document, and I'm not able to cancel out of the scan. My recent tests were via network. I'll attach the scanner via USB and try to collect some debug info. --- Henry Ptasinski henry at logout.com
[sane-devel] Canon PIXMA MX890
Hi Henry, The backend has an ADF paper empty bug. You can try to debug this issue, if you like. The first step could be to sniff the complete usb protocol from a 5mm x 5mm ADF scan on a windows machine with usbsnoop (http://benoit.papillault.free.fr/usbsnoop/). This program is old and runs with xp only, but we have a parser for the log files (spike4.pl). Cheers, Rolf Am 05.12.2012 00:57, schrieb Henry Ptasinski: Rolf, The ADF partially works. I've been able to get simplex scans occasionally. Duplex scans so far have only yielded the front page, and some errors such as: ... [pixma] bjnp_write_bulk(0, bufferptr, 0x10 = 16) [pixma] bjnp_set_timeout to 2 [pixma] bjnp_read_bulk(0, bufferptr, 0x200 = 512) [pixma] bjnp_set_timeout to 2 [pixma] bjnp_write_bulk(0, bufferptr, 0x10 = 16) [pixma] bjnp_set_timeout to 2 [pixma] bjnp_read_bulk(0, bufferptr, 0x200 = 512) [pixma] bjnp_set_timeout to 2 [pixma] bjnp_write_bulk(0, bufferptr, 0x10 = 16) [pixma] bjnp_set_timeout to 2 [pixma] bjnp_read_bulk(0, bufferptr, 0x200 = 512) [pixma] bjnp_set_timeout to 2 [pixma] bjnp_write_bulk(0, bufferptr, 0x10 = 16) [pixma] bjnp_set_timeout to 2 [pixma] bjnp_read_bulk(0, bufferptr, 0x200 = 512) [pixma] WARNING:image size mismatches [pixma] 1678578 expected (877 lines) but 1556082 received (813 lines) [pixma] pixma_read_image(): completed (underrun detected) [pixma] sanei_bjnp_deactivate (0) [pixma] Reader task terminated [pixma] pixma_close(): Canon PIXMA MX890 Series [pixma] sanei_bjnp_close(0): [pixma] sanei_bjnp_deactivate (0) When this happens, the display on the printer continues to say Scanning document, and I'm not able to cancel out of the scan. My recent tests were via network. I'll attach the scanner via USB and try to collect some debug info. --- Henry Ptasinski henry at logout.com
[sane-devel] Canon PIXMA MX890
On 12/03/2012 08:26 AM, Rolf Bensch wrote: Hi Henry, Many thanks for reporting MX890 as working. Before I will commit your patch, please test the ADF. The MX890 should support normal and duplex ADF. Cheers, Rolf Rolf, The ADF partially works. I've been able to get simplex scans occasionally. Duplex scans so far have only yielded the front page, and some errors such as: ... [pixma] bjnp_write_bulk(0, bufferptr, 0x10 = 16) [pixma] bjnp_set_timeout to 2 [pixma] bjnp_read_bulk(0, bufferptr, 0x200 = 512) [pixma] bjnp_set_timeout to 2 [pixma] bjnp_write_bulk(0, bufferptr, 0x10 = 16) [pixma] bjnp_set_timeout to 2 [pixma] bjnp_read_bulk(0, bufferptr, 0x200 = 512) [pixma] bjnp_set_timeout to 2 [pixma] bjnp_write_bulk(0, bufferptr, 0x10 = 16) [pixma] bjnp_set_timeout to 2 [pixma] bjnp_read_bulk(0, bufferptr, 0x200 = 512) [pixma] bjnp_set_timeout to 2 [pixma] bjnp_write_bulk(0, bufferptr, 0x10 = 16) [pixma] bjnp_set_timeout to 2 [pixma] bjnp_read_bulk(0, bufferptr, 0x200 = 512) [pixma] WARNING:image size mismatches [pixma] 1678578 expected (877 lines) but 1556082 received (813 lines) [pixma] pixma_read_image(): completed (underrun detected) [pixma] sanei_bjnp_deactivate (0) [pixma] Reader task terminated [pixma] pixma_close(): Canon PIXMA MX890 Series [pixma] sanei_bjnp_close(0): [pixma] sanei_bjnp_deactivate (0) When this happens, the display on the printer continues to say Scanning document, and I'm not able to cancel out of the scan. My recent tests were via network. I'll attach the scanner via USB and try to collect some debug info. --- Henry Ptasinski henry at logout.com
[sane-devel] Canon PIXMA MX890
Hi Henry, Many thanks for reporting MX890 as working. Before I will commit your patch, please test the ADF. The MX890 should support normal and duplex ADF. Cheers, Rolf Am 29.11.2012 03:34, schrieb Gernot Hassenpflug: On Thu, Nov 29, 2012 at 2:43 AM, Henry Ptasinski henry at logout.com wrote: On 11/28/2012 09:38 AM, Henry Ptasinski wrote: Flatbed scans with resolutions up to 600 dpi all seem to be working fine. At 1200 and 2400 dpi, the images are mangled. Columns appear to be interleaved at both resolutions. I assume the problem is due to a missing check in pixma_mp150.c:post_process_image_data(). Any suggestions for how to start fixing this issue? Hello Henry, Yes, that is the correct solution. We know by now that many newer devices require this exception, but we will only add the exception when someone reports it, as that is the only sure way to tell. Thank you for bringing this to our attention. Nice to know that both 1200 and 2400 work without extra image data manipulation necessary too. Regards, Gernot Hassenpflug With a little poking around, I found that this change fixes the 1200 and 2400 dpi scanning problem: --- a/backend/pixma_mp150.c +++ b/backend/pixma_mp150.c @@ -1081,6 +1081,7 @@ post_process_image_data (pixma_t * s, pixma_imagebuf_t * i /* special image format for *most* devices at high dpi. * MP220, MX360, MX370, MG5300 are exceptions */ if (s-cfg-pid != MP220_PID s-cfg-pid != MX360_PID + s-cfg-pid != MX890_PID s-cfg-pid != MX370_PID s-cfg-pid != MG5300_PID n 0 reorder_pixels (mp-linebuf, sptr, c, n, m, s-param-wx, line_si For people more familiar with the pixma code, does this seem like the right approach? Thanks, --- Henry Ptasinski henry at logout.com -- 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
On Thu, Nov 29, 2012 at 2:43 AM, Henry Ptasinski henry at logout.com wrote: On 11/28/2012 09:38 AM, Henry Ptasinski wrote: Flatbed scans with resolutions up to 600 dpi all seem to be working fine. At 1200 and 2400 dpi, the images are mangled. Columns appear to be interleaved at both resolutions. I assume the problem is due to a missing check in pixma_mp150.c:post_process_image_data(). Any suggestions for how to start fixing this issue? Hello Henry, Yes, that is the correct solution. We know by now that many newer devices require this exception, but we will only add the exception when someone reports it, as that is the only sure way to tell. Thank you for bringing this to our attention. Nice to know that both 1200 and 2400 work without extra image data manipulation necessary too. Regards, Gernot Hassenpflug With a little poking around, I found that this change fixes the 1200 and 2400 dpi scanning problem: --- a/backend/pixma_mp150.c +++ b/backend/pixma_mp150.c @@ -1081,6 +1081,7 @@ post_process_image_data (pixma_t * s, pixma_imagebuf_t * i /* special image format for *most* devices at high dpi. * MP220, MX360, MX370, MG5300 are exceptions */ if (s-cfg-pid != MP220_PID s-cfg-pid != MX360_PID + s-cfg-pid != MX890_PID s-cfg-pid != MX370_PID s-cfg-pid != MG5300_PID n 0 reorder_pixels (mp-linebuf, sptr, c, n, m, s-param-wx, line_si For people more familiar with the pixma code, does this seem like the right approach? Thanks, --- Henry Ptasinski henry at logout.com -- 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
On Thu, Nov 29, 2012 at 11:34:08AM +0900, Gernot Hassenpflug wrote: On Thu, Nov 29, 2012 at 2:43 AM, Henry Ptasinski henry at logout.com wrote: On 11/28/2012 09:38 AM, Henry Ptasinski wrote: Flatbed scans with resolutions up to 600 dpi all seem to be working fine. At 1200 and 2400 dpi, the images are mangled. Columns appear to be interleaved at both resolutions. I assume the problem is due to a missing check in pixma_mp150.c:post_process_image_data(). Any suggestions for how to start fixing this issue? Hello Henry, Yes, that is the correct solution. We know by now that many newer devices require this exception, but we will only add the exception when someone reports it, as that is the only sure way to tell. Thank you for bringing this to our attention. Nice to know that both 1200 and 2400 work without extra image data manipulation necessary too. I've sent a patch for this issue to the list, so hopefully that can be included shortly. Any thoughts on the timeout issue? Simply changing the timeout value in wait_until_ready() seems like a hack. Also, it doesn't solve all of the starup issues - if the printer has been sitting for quite a while unused, other errors show up: [sanei_debug] Setting debug level of pixma to 3. [pixma] pixma is compiled without pthread support. [pixma] Could not read pixma configuration file: pixma.conf [pixma] pixma version 0.17.0 [pixma] pixma_collect_devices() found Canon PIXMA MX890 Series at libusb:003:002 [pixma] sanei_bjnp_find_devices: [pixma] wlan1 is IPv4 capable, sending broadcast, socket = 3 [pixma] wlan1 is IPv6 capable, sending broadcast, socket = 4 [pixma] pixma_open(): Canon PIXMA MX890 Series [pixma] Reader task id=2867 (forked) [pixma] Reader task started [pixma] [pixma] pixma_scan(): start [pixma] line_size=1329 image_size=588747 channels=3 depth=8 [pixma] dpi=150x150 offset=(0,0) dimension=443x443 [pixma] gamma_table=0x25a90b8 source=0 [pixma] threshold=127 threshold_curve=0 [pixma] pixma_scan() failed EPROTO [pixma] Reader task terminated: EPROTO [pixma] read_image():reader task closed the pipe:0 bytes received, 588747 bytes expected scanimage: sane_read: Error during device I/O [pixma] pixma_close(): Canon PIXMA MX890 Series This proto failure seems to go away after the printer has some time to wake up, at which point the wait_until_ready() value seems to come into play. Likely unrelated, I'm using the -d flag to scanimage, so why is sanei_bjnp_find_devices() still sending out discovery messages over the network? Thanks, --- Henry Ptasinski henry at logout.com
[sane-devel] Canon PIXMA MX890
On 11/28/2012 09:38 AM, Henry Ptasinski wrote: Flatbed scans with resolutions up to 600 dpi all seem to be working fine. At 1200 and 2400 dpi, the images are mangled. Columns appear to be interleaved at both resolutions. I assume the problem is due to a missing check in pixma_mp150.c:post_process_image_data(). Any suggestions for how to start fixing this issue? With a little poking around, I found that this change fixes the 1200 and 2400 dpi scanning problem: --- a/backend/pixma_mp150.c +++ b/backend/pixma_mp150.c @@ -1081,6 +1081,7 @@ post_process_image_data (pixma_t * s, pixma_imagebuf_t * i /* special image format for *most* devices at high dpi. * MP220, MX360, MX370, MG5300 are exceptions */ if (s-cfg-pid != MP220_PID s-cfg-pid != MX360_PID + s-cfg-pid != MX890_PID s-cfg-pid != MX370_PID s-cfg-pid != MG5300_PID n 0 reorder_pixels (mp-linebuf, sptr, c, n, m, s-param-wx, line_si For people more familiar with the pixma code, does this seem like the right approach? Thanks, --- Henry Ptasinski henry at logout.com
[sane-devel] Canon PIXMA MX890
On 10/03/2012 03:31 PM, Louis Lagendijk wrote: On Wed, 2012-10-03 at 12:55 +0900, Gernot Hassenpflug wrote: 3) the network backend part probably requires more work, and further debug. I'm not familiar with it though. I can take that as I wrote it. But lets first see if you can get it working over USB. My experience so far is that most if not all issues with the network part are the result of more high level issues that also show up over USB. The BJNP protocol is just USB over IP (partly UDP and partly TCP). The scanner does in many cases not react over IP anymore when the USB protocol is not exactly what it wants. Please see the man page for the debug settings and get me a logfile so we can check what is happening. Kind regards, Louis Sorry it tooke me so long to get back to this, but I've now had a chance to dig a little deeper into the problems with the MX890. The debug info showed that it was hitting the timeout in pixma_mp150.c:wait_until_ready(). A quick hack was to increase the timeout value by a factor of 10, e.g.: diff --git a/backend/pixma_mp150.c b/backend/pixma_mp150.c index 473234b..3a8f514 100644 --- a/backend/pixma_mp150.c +++ b/backend/pixma_mp150.c @@ -951,7 +951,7 @@ static int wait_until_ready (pixma_t * s) { mp150_t *mp = (mp150_t *) s-subdriver; - int error, tmo = 60; + int error, tmo = 600; RET_IF_ERR ((mp-generation = 3) ? query_status_3 (s) : query_status (s)); With the change, I've done a handful of scans via both USB and network without any failures. I'll do more extensive testing with various scan settings and see if it continues to behave properly. There may be an underlying timing issue somewhere, as the original value of 60 seemed to correlate to about 3 seconds of real time (and setting tmo to 120 mapped to 6 seconds of real time). I haven't traced back through the code to see what the intended resolution is for tmo, but a 50 msec resolution seems odd. --- Henry Ptasinski henry at logout.com
[sane-devel] Canon PIXMA MX890
On Tue, Oct 2, 2012 at 11:50 PM, Henry Ptasinski henry at logout.com wrote: With the latest sane-backends sources from the git repo, my MX890 is partially functional. Using scanimage to scan documents on the flatbed works some of the time. Some of the issues I'm seeing: Hi, Could you ensure that the pixma driver backend works properly for all resolutions and also ADF, by attaching via USB. If the backend is shown to work properly (some resolutions might need to be programmed specifically for this device), then after that it will be simpler to try and debug the network backend separately from the driver backend. If you read the pixma backend man page (man sane-pixma) there are instructions for seeing debug output. Regards, Gernot Hassenpflug
[sane-devel] Canon PIXMA MX890
With the latest sane-backends sources from the git repo, my MX890 is partially functional. Using scanimage to scan documents on the flatbed works some of the time. Some of the issues I'm seeing: 1. I often get these errors: [pixma] bjnp_open_tcp: Can not connect to scanner: Connection refused The scanner seems to sort itself out if I wait a while, or if I run scangearmp (I haven't seen any errors with scangearmp, however I very often get a popup that says the scanner is warming up.) 2. On one scan pass, I got this collection of errors: [pixma] bjnp_recv_header: could not read response header (select timed out)! [pixma] bjnp_recv_header: could not read response header (select timed out)! [pixma] bjnp_recv_header: could not read response header (select timed out)! [pixma] Could not read response to command! [pixma] bjnp_recv_header: could not read response header (select timed out)! [pixma] Could not read response to command! [pixma] udp_command: no data received scanimage: sane_read: Error during device I/O [pixma] udp_command: no data received but that problem has not shown up again. 3. The --resolution and --mode options sometimes work, but sometimes they seem to be ignored. I think in those cases the scan is performed using whatever settings were used on the previous scan, but I'm not sure of that yet. I haven't tried the ADF yet with sane, since basic scanning from the flatbed is still somewhat unreliable. --- Henry Ptasinski henry at logout.com
[sane-devel] Canon PIXMA MX890
On 10/02/2012 10:22 AM, Gernot Hassenpflug wrote: On Tue, Oct 2, 2012 at 11:50 PM, Henry Ptasinski henry at logout.com wrote: With the latest sane-backends sources from the git repo, my MX890 is partially functional. Using scanimage to scan documents on the flatbed works some of the time. Some of the issues I'm seeing: Hi, Could you ensure that the pixma driver backend works properly for all resolutions and also ADF, by attaching via USB. If the backend is shown to work properly (some resolutions might need to be programmed specifically for this device), then after that it will be simpler to try and debug the network backend separately from the driver backend. If you read the pixma backend man page (man sane-pixma) there are instructions for seeing debug output. Regards, Gernot Hassenpflug Over USB, I see plenty of issues. Out of 6 scans ({75,300dpi}x{Color,Gray,Lineart}) using just the flatbed, I get errors on 3 scans. All of them are of the form: [pixma] XML message sent to scanner: ?xml version=1.0 encoding=utf-8 ?cmd xmlns:ivec=http://www.canon.com/ns/cmd/2008/07/common/;ivec:contentsivec:operationEndJob/ivec:operationivec:param_set servicetype=scanivec:jobID0001/ivec:jobID/ivec:param_set/ivec:contents/cmd [pixma] XML response back from scanner: ?xml version=1.0 encoding=utf-8 ?^M cmd xmlns:ivec=http://www.canon.com/ns/cmd/2008/07/common/;^M ivec:contents^M ivec:operationEndJobResponse/ivec:operation^M ivec:param_set servicetype=scan^M ivec:responseOK/ivec:response^M ivec:response_detail/^M ivec:jobID0001/ivec:jobID^M /ivec:param_set^M /ivec:contents^M /cmd [pixma] pixma_read_image() failed ETIMEDOUT [pixma] Reader task terminated: ETIMEDOUT [pixma] read_image():reader task closed the pipe:0 bytes received, 26857248 bytes expected scanimage: sane_read: Error during device I/O [pixma] pixma_close(): Canon PIXMA MX890 Series I'll try to dig a little more in the mp150_scan() function, but let me know if there's some specific chunk of code I should focus on. Thanks, --- Henry Ptasinski henry at logout.com