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

Matthias Peter Walther MatthiasPeterW at aol.com
Tue Mar 18 23:31:55 UTC 2014


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]  00000000:00 40 00 00 00 00 00 00  00 00 00 00 00 00 00 00
> [pixma]  00000010:00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
> [pixma]
>     --button-1 <int> [1] [read-only]
>         Button 1
>     --button-2 <int> [0] [read-only]
>         Button 2
>     --original <int> [0] [read-only]
>         Type of original to scan
>     --target <int> [4] [read-only]
>         Target operation type
>     --scan-resolution <int> [0] [read-only]
>         Scan resolution
>
> Please report your results.
>
> Cheers,
> Rolf

-------------- next part --------------
[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 MX370 Series at libusb:002:019
[pixma] pixma_find_scanners() found 1 devices
[pixma] pixma_collect_devices() found Canon PIXMA MX370 Series at libusb:002:019
[pixma] pixma_open(): Canon PIXMA MX370 Series
[pixma] INTR T=3.759 len=32
[pixma]  00000000:00 00 00 01 00 00 00 00  00 00 00 00 00 00 00 00 
[pixma]  00000010:00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 
[pixma] 
[pixma] INTR T=4.015 len=32
[pixma]  00000000:00 00 00 01 00 00 00 00  00 00 00 00 00 00 00 00 
[pixma]  00000010:00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 
[pixma] 
[pixma] pixma_close(): Canon PIXMA MX370 Series

All options specific to device `pixma:04A91759_61B4A4':
  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 <int> [0] [read-only]
        Button 1
    --button-2 <int> [0] [read-only]
        Button 2
    --original <int> [0] [read-only]
        Type of original to scan
    --target <int> [0] [read-only]
        Target operation type
    --scan-resolution <int> [0] [read-only]
        Scan resolution
  Extras:
    --threshold auto|0..100% (in steps of 1) [inactive]
        Select minimum-brightness to get a white point
    --threshold-curve auto|0..127 (in steps of 1) [inactive]
        Dynamic threshold curve, from light to dark, normally 50-65



More information about the sane-devel mailing list