[sane-devel] scanbd with sane backend - howto read buttons?
Button support is entirely dependent on which sane backend is in use. Not all backends support buttons, even if they are on the scanner. allan On Fri, Sep 20, 2013 at 1:35 AM, Ilya V. Ivanchenko wrote: > Is there a way to query button states in command line from sane or scanbd > with sane backend? > > I want to see that I can read buttons first, then attempt again to configure > scanbd with sane backend. So far I failed to get any response to buttons via > sane backend. > > I checked "scanimage -h | grep button", and it reports only > --wait-for-button (which is just to pause the scan until user presses a > button on the scanner). > > The only hint I've got is "scanimage -A | grep button" which returns > "--monitor-button[=(yes|no)] [no] [read-only]". > > Both manpage and scanimage --help are mum on the topic. Google is of no help > either. > > -- > Ilya > > -- > 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] New scanner Canon MF4770N Multi function
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] scanbd with sane backend - howto read buttons?
That probably means that my scanner's sane backend does not support buttons (its epkowa, Epson GT-1500). However scanbuttond supports it (with a patch to backends/epson_vphoto.c). How one would port buttons support from scanbuttond to sane backend? I may have enough spare time to roll a patch, but not enough to dig out all inner workings of both scanbuttonbd and sane. -- Ilya From: m. allan noah To: Ilya V. Ivanchenko Cc: "sane-devel at lists.alioth.debian.org" Sent: Friday, September 20, 2013 4:20 AM Subject: Re: [sane-devel] scanbd with sane backend - howto read buttons? Button support is entirely dependent on which sane backend is in use. Not all backends support buttons, even if they are on the scanner. allan On Fri, Sep 20, 2013 at 1:35 AM, Ilya V. Ivanchenko wrote: > Is there a way to query button states in command line from sane or scanbd > with sane backend? > > I want to see that I can read buttons first, then attempt again to configure > scanbd with sane backend. So far I failed to get any response to buttons via > sane backend. > > I checked "scanimage -h | grep button", and it reports only > --wait-for-button (which is just to pause the scan until user presses a > button on the scanner). > > The only hint I've got is "scanimage -A | grep button" which returns > "--monitor-button[=(yes|no)] [no] [read-only]". > > Both manpage and scanimage --help are mum on the topic. Google is of no help > either. > > -- > Ilya > > -- > 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" -- next part -- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20130920/26965797/attachment.html>
[sane-devel] New scanner Canon MF4770N Multi function
Hi Rolf, If the scanner is stopping scanning on a paper-end detector in the ADF (which I suspect it is, although I can't be sure), then it might stop at any arbitrary point even in preview mode. I only get the underrun warning when requesting a preview from the ADF. It could be as you say and the scanner is designed to scan a maximum? of 11" from the ADF. I will try your change and see what happens, though and I will try the ADF with shorter paper to see what happens. I suspect that what sane gets is arbitrarily determined by the physical length of the paper. I did try the buttons on the scanner. When in "remote" mode for computer scanning, none of the buttons seem to cause a USB interrupt. They all "double beep" which indicates that press is invalid. I'm not sure which buttons would be expected to work in this context. Here is a good picture of the panel: http://bimg2.mlstatic.com/impresora-multifuncional-laser-canon-image-class-mf4770n_MLV-F-4579386679_072013.jpg If you have a chance, could you have a look and let me know which buttons are customarily used? There are no Colour/Grey/Scan buttons as such. The OK buttom might have served this purpose, but it is inactive in scan mode. There are only two which might seem to fit this bill on the far right hand side: "Scan>PC1" and "Scan>PC2" which I think is intended for network scanning, a setup that I have not tried. I will let you know tonight. Cheers and thanks again for your help, Ralph > > From: Rolf Bensch >To: littlesincanada >Cc: sane-devel at lists.alioth.debian.org >Sent: Friday, September 20, 2013 7:47:02 AM >Subject: Re: [sane-devel] New scanner Canon MF4770N Multi function > > >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 -- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20130920/f3049ff9/attachment-0001.html>
[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] > 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
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] >>? ? ? ? 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 -- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20130920/f28b0884/attachment.html>
[sane-devel] New scanner Canon MF4770N Multi function
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] > >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 >